this.settings = settings;\r
this.mainForm = mainForm;\r
octopusIDSelector1.IDChangedEvent = IdChangedEvent;\r
- octopusIDSelector1.Properties = new OctopusConfiguration() {\r
+ octopusIDSelector1.Parameters = new OctopusParameters() {\r
+ UserName = "Hangalámondó",\r
Configuration = new OctopusMetadata() {\r
Server = new Connection() {\r
Address = settings.getAddress(),\r
using NAudio.CoreAudioApi;\r
using System.Windows.Forms;\r
using System.IO;\r
-using System.Threading;\r
\r
namespace AudioRecorder {\r
public delegate void RefreshPanelDelegate();\r
{\r
"title": "NLE",\r
- "active": false,\r
+ "active": true,\r
"startInTray": false,\r
"enableCustomMetadataId": true,\r
"player": {\r
"address": "http://10.10.1.27/services/rest/octopus/",\r
"timeout": 1000\r
},\r
- "project": {\r
+ "projectSettings": {\r
"templateRoot": {\r
- "address": "file://10.10.1.100/BRAVOOS/.MAESTRO/PROJECT",\r
+ "address": "ftp://10.10.1.100/.MAESTRO",\r
"userName": "mediacube",\r
"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
},\r
"projectRoot": {\r
- "address": "file://10.10.1.100/BRAVOOS/OCTOPUS",\r
+ "address": "ftp://10.10.1.100/OCTOPUS",\r
"userName": "mediacube",\r
"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
},\r
"templateName": "ALAPTIMELINE.ezp",\r
- "projectName": "%ID%-%TEXT%.ezp",\r
- "destinationFormat": "%IDROOT%-%TEXT%/PROJECT",\r
+ "projectName": "PROJECT/%ID%-%TEXT%.ezp",\r
+ "projectFormat": "%IDROOT%-%TEXT%",\r
"disableProject": false,\r
"disableSourceOpen": false\r
}\r
{\r
"title": "Lebony betöltő",\r
- "active": true,\r
+ "active": false,\r
"startInTray": false,\r
"enableCustomMetadataId": true,\r
"player": {\r
{\r
"title": "SxS",\r
- "active": true,\r
+ "active": false,\r
"startInTray": false,\r
"enableCustomMetadataId": true,\r
"player": {\r
/// </summary>\r
private void InitializeComponent() {\r
this.components = new System.ComponentModel.Container();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaestroForm));\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.groupSource = new System.Windows.Forms.GroupBox();\r
this.dgSource = new System.Windows.Forms.DataGridView();\r
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);\r
this.dgSource.BackgroundColor = System.Drawing.Color.White;\r
this.dgSource.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
this.dgSource.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised;\r
- dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;\r
- dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;\r
- dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
- dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
- dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
- this.dgSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;\r
+ dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;\r
+ dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;\r
+ dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
+ dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
+ dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+ this.dgSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;\r
this.dgSource.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
this.dgSource.DataSource = this.bindingSource;\r
- dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;\r
- dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;\r
- dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
- dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black;\r
- dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
- this.dgSource.DefaultCellStyle = dataGridViewCellStyle2;\r
+ dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window;\r
+ dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText;\r
+ dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+ dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Black;\r
+ dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+ this.dgSource.DefaultCellStyle = dataGridViewCellStyle12;\r
this.dgSource.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dgSource.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
this.dgSource.EnableHeadersVisualStyles = false;\r
this.dgSource.Location = new System.Drawing.Point(10, 47);\r
this.dgSource.Name = "dgSource";\r
this.dgSource.RowHeadersVisible = false;\r
- dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.dgSource.RowsDefaultCellStyle = dataGridViewCellStyle3;\r
+ dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.dgSource.RowsDefaultCellStyle = dataGridViewCellStyle13;\r
this.dgSource.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dgSource.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
this.dgSource.Size = new System.Drawing.Size(330, 159);\r
this.columnOutput,\r
this.columnKillDate});\r
this.dgJobs.DataSource = this.bindingSourceJobs;\r
- dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;\r
- dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;\r
- dataGridViewCellStyle6.NullValue = null;\r
- dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
- dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.Black;\r
- dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
- this.dgJobs.DefaultCellStyle = dataGridViewCellStyle6;\r
+ dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window;\r
+ dataGridViewCellStyle16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText;\r
+ dataGridViewCellStyle16.NullValue = null;\r
+ dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+ dataGridViewCellStyle16.SelectionForeColor = System.Drawing.Color.Black;\r
+ dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+ this.dgJobs.DefaultCellStyle = dataGridViewCellStyle16;\r
this.dgJobs.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dgJobs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
this.dgJobs.EnableHeadersVisualStyles = false;\r
this.dgJobs.Location = new System.Drawing.Point(3, 3);\r
this.dgJobs.Name = "dgJobs";\r
this.dgJobs.RowHeadersVisible = false;\r
- dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.dgJobs.RowsDefaultCellStyle = dataGridViewCellStyle7;\r
+ dataGridViewCellStyle17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.dgJobs.RowsDefaultCellStyle = dataGridViewCellStyle17;\r
this.dgJobs.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dgJobs.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
this.dgJobs.Size = new System.Drawing.Size(988, 90);\r
// \r
this.columnID.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;\r
this.columnID.DataPropertyName = "ID";\r
- dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.columnID.DefaultCellStyle = dataGridViewCellStyle4;\r
+ dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.columnID.DefaultCellStyle = dataGridViewCellStyle14;\r
this.columnID.HeaderText = "ID";\r
this.columnID.Name = "columnID";\r
this.columnID.Width = 44;\r
// \r
this.columnStatus.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;\r
this.columnStatus.DataPropertyName = "Status";\r
- dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.columnStatus.DefaultCellStyle = dataGridViewCellStyle5;\r
+ dataGridViewCellStyle15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.columnStatus.DefaultCellStyle = dataGridViewCellStyle15;\r
this.columnStatus.HeaderText = "Status";\r
this.columnStatus.Name = "columnStatus";\r
this.columnStatus.Width = 66;\r
this.dgMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {\r
this.dataGridViewTextBoxColumn1,\r
this.dataGridViewTextBoxColumn2});\r
- dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
- dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window;\r
- dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Red;\r
- dataGridViewCellStyle9.NullValue = null;\r
- dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
- dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.Red;\r
- dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
- this.dgMessages.DefaultCellStyle = dataGridViewCellStyle9;\r
+ dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window;\r
+ dataGridViewCellStyle19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ dataGridViewCellStyle19.ForeColor = System.Drawing.Color.Red;\r
+ dataGridViewCellStyle19.NullValue = null;\r
+ dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+ dataGridViewCellStyle19.SelectionForeColor = System.Drawing.Color.Red;\r
+ dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+ this.dgMessages.DefaultCellStyle = dataGridViewCellStyle19;\r
this.dgMessages.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dgMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
this.dgMessages.EnableHeadersVisualStyles = false;\r
this.dgMessages.Name = "dgMessages";\r
this.dgMessages.ReadOnly = true;\r
this.dgMessages.RowHeadersVisible = false;\r
- dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.dgMessages.RowsDefaultCellStyle = dataGridViewCellStyle10;\r
+ dataGridViewCellStyle20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.dgMessages.RowsDefaultCellStyle = dataGridViewCellStyle20;\r
this.dgMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dgMessages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
this.dgMessages.Size = new System.Drawing.Size(988, 90);\r
// \r
this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;\r
this.dataGridViewTextBoxColumn2.DataPropertyName = "Message";\r
- dataGridViewCellStyle8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
- this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle8;\r
+ dataGridViewCellStyle18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+ this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle18;\r
this.dataGridViewTextBoxColumn2.HeaderText = "Üzenet";\r
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";\r
this.dataGridViewTextBoxColumn2.ReadOnly = true;\r
tabMetadata.TabPages.Remove(tpOctopus);\r
return;\r
}\r
- octopusIDSelector.Properties = new OctopusConfiguration() {\r
+ octopusIDSelector.Parameters = new OctopusParameters() {\r
Configuration = octopusConfiguration,\r
- MessageBus = errorMessageBus\r
+ UserName = TrayApplicationContext.UserName,\r
+ MessageBus = errorMessageBus,\r
};\r
octopusIDSelector.IDChangedEvent += OnOctopusIDSelected;\r
}\r
private void OnChecked(CheckBox checkBox, Target target) {\r
if (checkBox.Checked) {\r
List<ITargetProcessor> processors = CreateProcessors(target, checkBox);\r
- foreach (ITargetProcessor processor in processors) {\r
- if (processor.Parameters.TargetConfig.Reference != null) {\r
- foreach (String reference in processor.Parameters.TargetConfig.Reference) {\r
- var key = currentProcessors.Keys.Where(c => c.Text.Equals(reference)).SingleOrDefault();\r
- var referencedProcessor = currentProcessors[key]?.Where(p => p.Input.Equals(processor.Input)).SingleOrDefault();\r
- if (referencedProcessor != null)\r
- processor.AddReference(referencedProcessor);\r
+ if (processors != null && processors.Count > 0) {\r
+ foreach (ITargetProcessor processor in processors) {\r
+ if (processor.Parameters.TargetConfig.Reference != null) {\r
+ foreach (String reference in processor.Parameters.TargetConfig.Reference) {\r
+ var key = currentProcessors.Keys.Where(c => c.Text.Equals(reference)).SingleOrDefault();\r
+ var referencedProcessor = currentProcessors[key]?.Where(p => p.Input.Equals(processor.Input)).SingleOrDefault();\r
+ if (referencedProcessor != null)\r
+ processor.AddReference(referencedProcessor);\r
+ }\r
}\r
}\r
- }\r
\r
- if (processors != null && processors.Count > 0) {\r
if (currentProcessors.ContainsKey(checkBox))\r
currentProcessors[checkBox].AddRange(processors);\r
else\r
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w\r
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0\r
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACU\r
- BwAAAk1TRnQBSQFMAwEBAAGQAQABkAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA\r
+ BwAAAk1TRnQBSQFMAwEBAAGYAQABmAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA\r
AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA\r
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA\r
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm\r
AUADAAEQAwABAQEAAQEFAAGAFwAD/4EACw==\r
</value>\r
</data>\r
+ <metadata name="tsSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>951, 17</value>\r
+ </metadata>\r
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
<data name="picClearFilter.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
<metadata name="tsMetadata.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>846, 17</value>\r
</metadata>\r
+ <metadata name="tsMetadata.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>846, 17</value>\r
+ </metadata>\r
<metadata name="columnLabel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
<value>True</value>\r
</metadata>\r
public static GlobalInfo GlobalConfig { get; internal set; }\r
\r
public TrayApplicationContext() {\r
- //string x = Regex.Replace("xxx/yyy/1234-00_aaa", "_*$", "*");\r
+ //string x = Regex.Replace("xxx/yyy/1234-00_aaaANYAG/ANYAG", "[^0-9A-Za-z-._]", "*");\r
//Debug.WriteLine(x);\r
}\r
\r
throw new Exception(CONFIG_ERROR);\r
\r
GlobalConfig = LoadGlobalConfig(configFiles);\r
- if (!HasCommandlineParameter(NOLOGIN))\r
- CheckUser();\r
+ \r
+ CheckUser();\r
CreateForms(configFiles);\r
CreateTrayIcon();\r
}\r
if (userInfo.Length < 2)\r
throw new Exception(DOMAIN_QUERY_ERROR);\r
string userDomainName = userInfo[0];\r
- UserName = userInfo[1];\r
if (userDomainName.Contains("."))\r
userDomainName = userDomainName.Split('.')[0];\r
if (domainName.ToLower().Equals(userDomainName.ToLower()))\r
if (String.IsNullOrEmpty(domainName))\r
throw new Exception(SYSCONFIG_ERROR);\r
else {\r
- string userName = WindowsIdentity.GetCurrent().Name;\r
- if (IsDomainUser(userName, domainName))\r
+ UserName = WindowsIdentity.GetCurrent().Name;\r
+ if (IsDomainUser(UserName, domainName))\r
+ return;\r
+ UserName = GlobalConfig.UserDomain.UserName;\r
+ if (HasCommandlineParameter(NOLOGIN))\r
return;\r
- userName = GlobalConfig.UserDomain.UserName;\r
string password = GlobalConfig.UserDomain.Password;\r
LoginForm loginForm = null;\r
try {\r
using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, domainName)) {\r
while (true) {\r
- bool isValid = pc.ValidateCredentials(userName, password);\r
+ bool isValid = pc.ValidateCredentials(UserName, password);\r
if (isValid) {\r
- UserName = userName;\r
break;\r
}\r
\r
DialogResult result = loginForm.ShowDialog();\r
if (result == DialogResult.Cancel)\r
throw new Exception("Bejelentkezés nélkül a Maestro alkalmazás nem indítható el.");\r
- userName = loginForm.UserName;\r
+ UserName = loginForm.UserName;\r
password = loginForm.Password;\r
}\r
}\r
--- /dev/null
+using System;\r
+using System.Globalization;\r
+using System.IO;\r
+using System.Text;\r
+using System.Text.RegularExpressions;\r
+\r
+namespace MaestroShared.Commons {\r
+ public class PatterNameMaker {\r
+ private const string NORMALIZE_TEXT_PATTERN = "[^0-9A-Za-z-._]";\r
+ private const string PATTERN_TARGETNAME = "%TARGETNAME%";\r
+ private const string PATTERN_ID = "%ID%";\r
+ private const string PATTERN_IDROOT = "%IDROOT%";\r
+ private const string PATTERN_SOURCENAME = "%SOURCENAME%";\r
+ private const string PATTERN_TIMESTAMP = "%TIMESTAMP%";\r
+ private const string PATTERN_DATESTAMP = "%DATESTAMP%";\r
+ private const string DATETIME_FORMAT = "yyyyMMddhhmmss";\r
+ private const string PATTERN_TEXT = "%TEXT%";\r
+ private const string UNDERSCORE = "_";\r
+ private const string DATE_FORMAT_NODOTS = "yyyyMMdd";\r
+\r
+ static private string Normalize(String s) {\r
+ string normalizedString = s.Normalize(NormalizationForm.FormD);\r
+\r
+ StringBuilder stringBuilder = new StringBuilder();\r
+\r
+ for (int i = 0; i < normalizedString.Length; i++) {\r
+ Char c = normalizedString[i];\r
+ if (CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark)\r
+ stringBuilder.Append(c);\r
+ }\r
+ string result = stringBuilder.ToString();\r
+ result = Regex.Replace(result, NORMALIZE_TEXT_PATTERN, UNDERSCORE);\r
+ if (result.Length > 100)\r
+ result = result.Substring(0, 100);\r
+ return result;\r
+ }\r
+\r
+ static public string Get(string pattern, string id, string fileName, string text) {\r
+ string idRoot = id.Contains(UNDERSCORE) ? id.Split(UNDERSCORE[0])[0] : id;\r
+ string result = pattern\r
+ .Replace(PATTERN_ID, id)\r
+ .Replace(PATTERN_IDROOT, idRoot)\r
+ .Replace(PATTERN_TIMESTAMP, DateTime.Now.ToString(DATETIME_FORMAT, CultureInfo.InvariantCulture))\r
+ .Replace(PATTERN_DATESTAMP, DateTime.Now.ToString(DATE_FORMAT_NODOTS, CultureInfo.InvariantCulture));\r
+\r
+ if (!String.IsNullOrEmpty(fileName))\r
+ result = result.Replace(PATTERN_SOURCENAME, Normalize(Path.GetFileNameWithoutExtension(fileName)));\r
+\r
+ if (!String.IsNullOrEmpty(text))\r
+ result = result.Replace(PATTERN_TEXT, Normalize(text));\r
+ return result; \r
+ }\r
+\r
+\r
+ }\r
+}\r
public string DeviceIDMorpheus { get; set; }\r
public string PathMorpheusMetadata { get; set; }\r
public bool DisableFileVersioning { get; set; }\r
+ public bool DisableOverride { get; set; }\r
public bool SendEmailOnError { get; set; }\r
public string ErrorEmailRecipient { get; set; }\r
public string ErrorEmailPattern { get; set; }\r
public Connection Server { get; set; }\r
}\r
\r
- public class Project {\r
+ public class ProjectSettings {\r
public Connection TemplateRoot { get; set; }\r
public Connection ProjectRoot { get; set; }\r
public string TemplateName { get; set; }\r
public string ProjectName { get; set; }\r
- public string DestinationFormat { get; set; }\r
+ public string ProjectFormat { get; set; }\r
public bool DisableProject { get; set; }\r
public bool DisableSourceOpen { get; set; }\r
+ public bool IsValid {\r
+ get {\r
+ return TemplateRoot != null && TemplateRoot.Address != null &&\r
+ ProjectRoot != null && ProjectRoot.Address != null &&\r
+ !String.IsNullOrEmpty(TemplateName) &&\r
+ !String.IsNullOrEmpty(ProjectName) &&\r
+ !String.IsNullOrEmpty(ProjectFormat);\r
+ }\r
+ }\r
}\r
\r
public class OctopusMetadata : MetadataProvider {\r
public bool DisablePlaceHolderCheck { get; set; }\r
public bool DisableStoryCheck { get; set; }\r
- public Connection Local { get; set; }\r
+ public ProjectSettings ProjectSettings { get; set; }\r
}\r
\r
public class TrafficMetadata : MetadataProvider {\r
<Compile Include="Commons\MorpheusXML.cs" />\r
<Compile Include="Commons\NexioXML.cs" />\r
<Compile Include="Commons\ObjectExtensions.cs" />\r
+ <Compile Include="Commons\PatterNameMaker.cs" />\r
<Compile Include="Commons\Win32File.cs" />\r
<Compile Include="Configuration\ConfigurationInfo.cs" />\r
<Compile Include="Configuration\KeysJsonConverter.cs" />\r
targetFTP.SetWorkingDirectory(path);\r
}\r
\r
+ protected override string Slash(string path) {\r
+ return path.Replace(BACKSLASH, SLASH);\r
+ }\r
+\r
protected FtpClient CreateClient(Connection connection) {\r
Uri address = connection.Address;\r
FtpClient result = new FtpClient() {\r
return result;\r
}\r
\r
- protected override string DetermineWorkingDirectory(Connection connection) {\r
+ protected override string SearchDirectory(string path, string pattern) {\r
string result = null;\r
- if (!String.IsNullOrEmpty(Parameters.TargetConfig.SubFolderFormat)) {\r
- string name = GetDynamicName(Parameters.TargetConfig.SubFolderFormat);\r
- if (Parameters.TargetConfig.SubFolderFormat.Contains(PATTERN_TEXT)) {\r
- string pattern = name.Split(HYPHEN[0])[0] + HYPHEN;\r
- targetFTP.SetWorkingDirectory(connection.Address.LocalPath);\r
- FtpListItem item = targetFTP.GetListing()?.Where(i => i.Type.Equals(FtpFileSystemObjectType.Directory) && i.Name.StartsWith(pattern)).FirstOrDefault();\r
- if (item != null)\r
- name = item.Name;\r
- targetFTP.SetWorkingDirectory(SLASH);\r
- }\r
- result = Path.Combine(connection.Address.LocalPath, name);\r
- } else\r
- result = connection.Address.LocalPath;\r
+ EnsureDirectoryExistence(path);\r
+ //targetFTP.SetWorkingDirectory(path);\r
+ FtpListItem item = targetFTP.GetListing()?.Where(i => i.Type.Equals(FtpFileSystemObjectType.Directory) && i.Name.StartsWith(pattern)).FirstOrDefault();\r
+ if (item != null)\r
+ result = item.Name;\r
+ targetFTP.SetWorkingDirectory(SLASH);\r
return result;\r
}\r
\r
this.Parameters = parameters;\r
}\r
\r
- protected void NotifyPropertyChanged([CallerMemberName] String propertyName = "") {\r
+ protected void NotifyPropertyChanged([CallerMemberName] string propertyName = "") {\r
parent?.SafeCall(() => {\r
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\r
});\r
using Model;\r
using System.Text;\r
using System.Globalization;\r
-using System.Text.RegularExpressions;\r
using MaestroShared.Configuration;\r
using MaestroShared.Target;\r
using MaestroShared.Metadata;\r
private const string STATUS_FOLDER = ".STATUS";\r
private const string KILLDATE_FILE = "{0}.{1}.killdate";\r
private const string METADATA_FILE = "{0}.json";\r
- private const string DEFAULT_EXTENSION = ".MXF";\r
private const string NORMALIZE_TEXT_PATTERN = "[^0-9A-Za-z-._/]";\r
private const string DATE_FORMAT = "yyyy.MM.dd";\r
private const string PROGRAMME = "PROGRAMME";\r
protected const string HYPHEN = "-";\r
protected const string PATTERN_TEXT = "%TEXT%";\r
protected const string SLASH = "/";\r
+ protected const string BACKSLASH = @"\";\r
+ private const string STAR = "*";\r
protected FileInfo inputFile;\r
protected string workingDir;\r
\r
}\r
\r
private void CreateOutput(string workingDir) {\r
- Output = "/".Equals(workingDir) ? OutputName : Path.Combine(workingDir, OutputName);\r
- Output = Output.Replace(@"\", "/");\r
+ Output = SLASH.Equals(workingDir) ? OutputName : Path.Combine(workingDir, OutputName);\r
}\r
\r
private void HandleFileExists(string currentFile) {\r
- if (FileExists(currentFile) && Parameters.TargetConfig.DisableFileVersioning) {\r
+ if (FileExists(currentFile) && (Parameters.TargetConfig.DisableFileVersioning || Parameters.TargetConfig.DisableOverride)) {\r
if (Parameters.TargetConfig.NexioServer) {\r
Status = REVOKED;\r
ShowNexioFileExistsMessage();\r
\r
private void SendEmail(string to, string messagePattern) {\r
try {\r
- string message = messagePattern.Replace(PATTERN_TARGETNAME, OutputName);\r
+ string message = GetDynamicText(PATTERN_TARGETNAME);\r
Parameters.MediaCubeApi.Notify(to, message);\r
}\r
catch (Exception e) {\r
}\r
}\r
\r
- protected virtual string DetermineWorkingDirectory(Connection connection) {\r
+ protected virtual string SearchDirectory(string path, string pattern) {\r
string result = null;\r
+ string[] dirs = Directory.GetDirectories(path, pattern);\r
+ if (dirs.Length > 0)\r
+ result = dirs[0];\r
+ return result;\r
+ }\r
+\r
+ protected virtual string Slash(string path) {\r
+ return path;\r
+ }\r
+\r
+ protected string DetermineWorkingDirectory(Connection connection) {\r
+ string result = Slash(connection.Address.LocalPath);\r
if (!String.IsNullOrEmpty(Parameters.TargetConfig.SubFolderFormat)) {\r
- string name = GetDynamicName(Parameters.TargetConfig.SubFolderFormat);\r
- if (Parameters.TargetConfig.SubFolderFormat.Contains(PATTERN_TEXT)) {\r
- string pattern = name.Split(HYPHEN[0])[0] + HYPHENSTAR;\r
- string[] dirs = Directory.GetDirectories(connection.Address.LocalPath, pattern);\r
- if (dirs.Length > 0)\r
- name = dirs[0];\r
+ string subFolderName = Slash(GetDynamicText(Parameters.TargetConfig.SubFolderFormat));\r
+ string pattern = subFolderName;\r
+ string searchPath = result;\r
+ if (pattern.Contains(SLASH)) {\r
+ string[] segments = pattern.Split(SLASH[0]);\r
+ pattern = segments[segments.Length - 1];\r
+ searchPath = Slash(Path.Combine(result, subFolderName.Substring(0, subFolderName.Length - pattern.Length - 1)));\r
}\r
- result = Path.Combine(connection.Address.LocalPath, name);\r
- } else\r
- result = connection.Address.LocalPath;\r
- return result;\r
+ int p = pattern.IndexOf(HYPHEN);\r
+ int o = pattern.IndexOf(UNDERSCORE);\r
+ if (p > -1 || o > -1) {\r
+ if (p < o && p > -1)\r
+ pattern = pattern.Substring(0, p);\r
+ else\r
+ pattern = pattern.Substring(0, o);\r
+\r
+ pattern += STAR;\r
+ string searchResult = SearchDirectory(searchPath, pattern);\r
+ if (searchResult == null)\r
+ result = Slash(Path.Combine(result, subFolderName));\r
+ else\r
+ result = Slash(Path.Combine(result, searchResult));\r
+ } else\r
+ result = Slash(Path.Combine(connection.Address.LocalPath, subFolderName));\r
+ }\r
+\r
+ return result.Replace(BACKSLASH, SLASH);\r
}\r
\r
private DateTime GetKillDate() {\r
return stringBuilder.ToString();\r
}\r
\r
- protected string GetDynamicName(string text) {\r
- string idRoot = ID.Contains(UNDERSCORE) ? ID.Split(UNDERSCORE[0])[0] : ID;\r
- string result = text\r
- .Replace(PATTERN_ID, ID)\r
- .Replace(PATTERN_IDROOT, idRoot)\r
- .Replace(PATTERN_SOURCENAME, Path.GetFileNameWithoutExtension(InputName))\r
- .Replace(PATTERN_TIMESTAMP, DateTime.Now.ToString(DATETIME_FORMAT, CultureInfo.InvariantCulture))\r
- .Replace(PATTERN_DATESTAMP, DateTime.Now.ToString(DATE_FORMAT_NODOTS, CultureInfo.InvariantCulture));\r
-\r
- if (!String.IsNullOrEmpty(Parameters.MetadataText))\r
- result = result.Replace(PATTERN_TEXT, HYPHEN + RemoveDiacritics(Parameters.MetadataText));\r
-\r
- // replace hungarian and special characters\r
- result = Regex.Replace(result, NORMALIZE_TEXT_PATTERN, UNDERSCORE);\r
- if (result.Length > 100)\r
- result = result.Substring(0, 100);\r
- return result;\r
+ protected string GetDynamicText(string pattern) {\r
+ return PatterNameMaker.Get(pattern, ID, InputName, Parameters.MetadataText);\r
}\r
\r
- protected virtual string CreateOutputFileName() {\r
- string nameWithoutExtension = GetDynamicName(Parameters.TargetConfig.OutputFormat);\r
- string extension = InputName.Contains(DOT) ? InputName.Substring(InputName.LastIndexOf(DOT)) : DEFAULT_EXTENSION;\r
+ private string CreateOutputFileName() {\r
+ string nameWithoutExtension = GetDynamicText(Parameters.TargetConfig.OutputFormat);\r
+ string extension = Path.GetExtension(InputName);\r
extension = extension.ToUpper();\r
string result = String.Format(FILENAME, nameWithoutExtension, extension);\r
if (!Parameters.TargetConfig.DisableFileVersioning) {\r
version++;\r
}\r
}\r
- return result.ToUpper();\r
+ return result.ToUpper().Replace(BACKSLASH, SLASH);\r
}\r
\r
protected virtual void EnsureDirectoryExistence(string path) {\r
using System;\r
-using System.Drawing;\r
using System.Windows.Forms;\r
\r
namespace OctopusClient {\r
class CheckableTreeView : TreeView {\r
+ public delegate void OnNodeDoubleClick(object sender, TreeNodeMouseClickEventArgs args);\r
+\r
+ public OnNodeDoubleClick NodeDoubleClick;\r
+\r
protected override void WndProc(ref Message m) {\r
// Suppress WM_LBUTTONDBLCLK\r
- if (m.Msg == 0x203) { m.Result = IntPtr.Zero; } else base.WndProc(ref m);\r
+ if (m.Msg == 0x203) {\r
+ var point = PointToClient(Cursor.Position);\r
+ TreeNode node = GetNodeAt(point);\r
+ TreeNodeMouseClickEventArgs args = new TreeNodeMouseClickEventArgs(node, MouseButtons.Left, 2, point.X, point.Y);\r
+ NodeDoubleClick?.Invoke(this, args);\r
+ m.Result = IntPtr.Zero;\r
+ } else\r
+ base.WndProc(ref m);\r
}\r
\r
- //protected override void OnDrawNode(DrawTreeNodeEventArgs e) {\r
- // TreeNodeStates state = e.State;\r
- // Font font = e.Node.NodeFont ?? e.Node.TreeView.Font;\r
- // Color fore = e.Node.ForeColor;\r
- // if (fore == Color.Empty) fore = e.Node.TreeView.ForeColor;\r
- // if (e.Node == e.Node.TreeView.SelectedNode) {\r
- // fore = SystemColors.ControlText;\r
- // using (SolidBrush brush = new SolidBrush(Color.Gainsboro)) {\r
- // e.Graphics.FillRectangle(brush, e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height);\r
- // }\r
-\r
- // //e.Graphics.FillRectangle(SystemBrushes.Highlight, e.Bounds);\r
- // ControlPaint.DrawFocusRectangle(e.Graphics, e.Bounds, fore, SystemColors.Highlight);\r
- // TextRenderer.DrawText(e.Graphics, e.Node.Text, font, e.Bounds, fore, TextFormatFlags.GlyphOverhangPadding);\r
- // } else {\r
- // e.Graphics.FillRectangle(SystemBrushes.Window, e.Bounds);\r
- // TextRenderer.DrawText(e.Graphics, e.Node.Text, font, e.Bounds, fore, TextFormatFlags.GlyphOverhangPadding);\r
- // }\r
- //}\r
}\r
\r
}\r
<SubType>Component</SubType>\r
</Compile>\r
<Compile Include="OctopusAPI.cs" />\r
- <Compile Include="OctopusConfiguration.cs" />\r
<Compile Include="OctopusIDSelector.cs">\r
<SubType>UserControl</SubType>\r
</Compile>\r
<Compile Include="OctopusIDSelector.Designer.cs">\r
<DependentUpon>OctopusIDSelector.cs</DependentUpon>\r
</Compile>\r
+ <Compile Include="OctopusParameters.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
<Compile Include="Resources.Designer.cs">\r
<AutoGen>True</AutoGen>\r
this.treeOctopus.Name = "treeOctopus";\r
this.treeOctopus.Size = new System.Drawing.Size(300, 322);\r
this.treeOctopus.TabIndex = 5;\r
+ this.treeOctopus.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeOctopus_NodeMouseClick);\r
+ this.treeOctopus.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeOctopus_NodeMouseDoubleClick);\r
this.treeOctopus.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeContent_KeyDown);\r
- this.treeOctopus.MouseDown += new System.Windows.Forms.MouseEventHandler(this.treeOctopus_MouseDown);\r
// \r
// pSearch\r
// \r
using System.Runtime.InteropServices;\r
using LinkDotNet.MessageHandling.Contracts;\r
using System.Drawing;\r
+using MaestroShared.Configuration;\r
+using System.IO;\r
+using MaestroShared.Targets;\r
+using MaestroShared.Target;\r
\r
namespace OctopusClient {\r
public delegate void OnSelectedIDChanged(string id, string name, string text);\r
private TreeNode selectedNode;\r
private OctopusAPI client;\r
public OnSelectedIDChanged IDChangedEvent { get; set; }\r
- private OctopusConfiguration properties;\r
+ private OctopusParameters parameters;\r
private bool refreshDisabled;\r
\r
- public OctopusConfiguration Properties {\r
+ public OctopusParameters Parameters {\r
set {\r
- properties = value;\r
+ parameters = value;\r
client = new OctopusAPI(value.Configuration.Server.Address.OriginalString, value.Configuration.Server.UserName, value.Configuration.Server.Password, value.Configuration.Server.Timeout, value.MessageBus);\r
rbRundown.Checked = true;\r
RefreshFolders();\r
InitializeComponent();\r
InitializeControls();\r
treeOctopus.AfterCheck += OnTreeAfterCheck;\r
- treeOctopus.AfterSelect += OnAfterSelect;\r
- }\r
-\r
- public TreeNode previousSelectedNode = null;\r
-\r
- void OnAfterSelect(object sender, TreeViewEventArgs e) {\r
- if (previousSelectedNode != null) {\r
- previousSelectedNode.BackColor = treeOctopus.BackColor;\r
- previousSelectedNode.ForeColor = treeOctopus.ForeColor;\r
- }\r
- treeOctopus.SelectedNode.BackColor = Color.Gainsboro;\r
- treeOctopus.SelectedNode.ForeColor = Color.Black;\r
- previousSelectedNode = treeOctopus.SelectedNode;\r
- treeOctopus.Invalidate(treeOctopus.SelectedNode.Bounds, true);\r
+ treeOctopus.DrawMode = TreeViewDrawMode.OwnerDrawText;\r
+ treeOctopus.DrawNode += OnDrawNode;\r
+ treeOctopus.NodeDoubleClick += treeOctopus_NodeDoubleClick;\r
}\r
\r
void OnDrawNode(object sender, DrawTreeNodeEventArgs e) {\r
Graphics g = e.Graphics;\r
if ((e.State & TreeNodeStates.Selected) == TreeNodeStates.Selected) {\r
using (SolidBrush brush = new SolidBrush(Color.Gainsboro)) {\r
- e.Graphics.FillRectangle(brush, e.Bounds.X + 1, e.Bounds.Y + 1, e.Bounds.Width, e.Bounds.Height);\r
+ e.Graphics.FillRectangle(brush, e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height);\r
+ }\r
+ using (Pen pen = new Pen(Color.Black)) {\r
+ pen.Width = 1;\r
+ e.Graphics.DrawLine(pen, e.Bounds.X, e.Bounds.Y + 2, e.Bounds.X, e.Bounds.Y + e.Bounds.Height - 4);\r
}\r
}\r
TextRenderer.DrawText(e.Graphics, e.Node.Text, treeOctopus.Font, e.Bounds, treeOctopus.ForeColor, TextFormatFlags.Left | TextFormatFlags.Top);\r
TreeNode storyNode = treeOctopus.Nodes.Add(ID, label);\r
storyNode.Tag = story;\r
\r
- if (properties.Configuration.DisableStoryCheck)\r
+ if (parameters.Configuration.DisableStoryCheck)\r
HideCheckBox(treeOctopus, storyNode);\r
else {\r
if (lookupStoryId != null && lookupStoryId.Equals(story.ID))\r
foreach (MosObject mosObject in mosObjects) {\r
TreeNode placeHolderNode = storyNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ObjID}"));\r
placeHolderNode.Tag = story;\r
- if (properties.Configuration.DisablePlaceHolderCheck)\r
+ if (parameters.Configuration.DisablePlaceHolderCheck)\r
HideCheckBox(treeOctopus, placeHolderNode);\r
else {\r
if (lookupPlaceHolderId != null && lookupPlaceHolderId.Equals(mosObject.ObjID)) {\r
private void OnTreeAfterCheck(object sender, TreeViewEventArgs e) {\r
//logger.Debug("Handling {0} {1} {2}", e.Node.Name, e.Node.Text, e.Node.Checked);\r
\r
- if (properties.Configuration.DisableStoryCheck && e.Node.Level == 0) {\r
+ if (parameters.Configuration.DisableStoryCheck && e.Node.Level == 0) {\r
if (e.Node.Checked) {\r
e.Node.Checked = false;\r
HideCheckBox(treeOctopus, e.Node);\r
return;\r
}\r
\r
- if (properties.Configuration.DisablePlaceHolderCheck && e.Node.Level == 1) {\r
+ if (parameters.Configuration.DisablePlaceHolderCheck && e.Node.Level == 1) {\r
if (e.Node.Checked) {\r
e.Node.Checked = false;\r
HideCheckBox(treeOctopus, e.Node);\r
LookupByStory(txtFilter.Text);\r
}\r
\r
- private void treeOctopus_MouseDown(object sender, MouseEventArgs e) {\r
- treeOctopus.SelectedNode = treeOctopus.GetNodeAt(e.X, e.Y);\r
- if (e.Button != MouseButtons.Left)\r
+ private void treeOctopus_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) {\r
+ }\r
+\r
+ private void treeOctopus_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) {\r
+ }\r
+\r
+ private void treeOctopus_NodeDoubleClick(object sender, TreeNodeMouseClickEventArgs e) {\r
+ if (e.X < e.Node.Bounds.X + 5)\r
return;\r
+ Open(e.Node);\r
+ }\r
\r
+ private void Open(TreeNode node) {\r
+ if (MessageBox.Show("Megnyissam vágásra?", null, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)\r
+ return;\r
+ ProjectSettings projectConfiguration = parameters?.Configuration?.ProjectSettings;\r
+ if (projectConfiguration == null) {\r
+ MessageBox.Show("Nem található a 'projectSetings' beállítás a konfigurációs állományban.", null, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ return;\r
+ }\r
+ if (!projectConfiguration.IsValid) {\r
+ MessageBox.Show("A 'projectSetings' beállítás hiányos a konfigurációs állományban.", null, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ return;\r
+ }\r
+ //string source = Path.Combine(projectConfiguration.TemplateRoot.Address.LocalPath, projectConfiguration.TemplateName);\r
+ //if (!File.Exists(source)) {\r
+ // MessageBox.Show($"Az '{source}' állomány nem létezik.", null, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ // return;\r
+ //}\r
+ Story story = node.Tag as Story;\r
+\r
+ TargetProcessorParameter processorParameter = new TargetProcessorParameter() {\r
+ SourceConfig = new Source() {\r
+ Local = projectConfiguration.TemplateRoot\r
+ },\r
+ TargetConfig = new Target() {\r
+ Remote = projectConfiguration.ProjectRoot,\r
+ OutputFormat = projectConfiguration.ProjectName,\r
+ SubFolderFormat = projectConfiguration.ProjectFormat,\r
+ DisableFileVersioning = true,\r
+ DisableOverride = true\r
+ },\r
+ ID = node.Name,\r
+ MetadataText = String.IsNullOrEmpty(story.Format) ? story.Name : String.Format($"{story.Name}_{story.Format}"),\r
+ InputFileName = projectConfiguration.TemplateName,\r
+ UserName = parameters.UserName,\r
+ };\r
+\r
+ ITargetProcessor result = new FXPTargetProcessor();\r
+ result.Initialize(null, processorParameter);\r
+ result.Execute();\r
+\r
+ //Patter \r
\r
}\r
+\r
+\r
}\r
\r
public class OctopusAPIMessage : IMessage {\r
using MaestroShared.Configuration;\r
\r
namespace OctopusClient {\r
- public class OctopusConfiguration {\r
+ public class OctopusParameters {\r
public OctopusMetadata Configuration { get; set; }\r
+ public string UserName { get; set; }\r
public IMessageBus MessageBus { get; set; }\r
}\r
}\r