git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Thu, 23 Nov 2017 16:06:42 +0000 (16:06 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Thu, 23 Nov 2017 16:06:42 +0000 (16:06 +0000)
21 files changed:
client/AudioRecorder/FileNameForm.cs
client/AudioRecorder/MainForm.cs
client/Maestro/Configuration/configuration-nle.json
client/Maestro/Configuration/configuration-playout-ingest.json
client/Maestro/Configuration/configuration-sxs.json
client/Maestro/MaestroForm.Designer.cs
client/Maestro/MaestroForm.Metadata.cs
client/Maestro/MaestroForm.Target.cs
client/Maestro/MaestroForm.resx
client/Maestro/Program.cs
client/MaestroShared/Commons/PatterNameMaker.cs [new file with mode: 0644]
client/MaestroShared/Configuration/ConfigurationInfo.cs
client/MaestroShared/MaestroShared.csproj
client/MaestroShared/Targets/FTPTargetProcessor.cs
client/MaestroShared/Targets/TargetProcessor.cs
client/MaestroShared/Targets/UNCTargetProcessor.cs
client/OctopusClient/CheckableTreeView.cs
client/OctopusClient/OctopusClient.csproj
client/OctopusClient/OctopusIDSelector.Designer.cs
client/OctopusClient/OctopusIDSelector.cs
client/OctopusClient/OctopusParameters.cs [moved from client/OctopusClient/OctopusConfiguration.cs with 71% similarity]

index 7f16074c790496f9c8e23cdb021bfbd53216ae45..ee798766f4efa9ab9986bb94b04f2cfb3c866bf6 100644 (file)
@@ -16,7 +16,8 @@ namespace AudioRecorder {
             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
index a645dceedd2feae4f7940cb53b702b02056ad515..76ae5b82e838d84821f05ca72eed0929c09a663c 100644 (file)
@@ -5,7 +5,6 @@ using System.Drawing;
 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
index 448d676bbbce96f7a4ffbff8a7dca60c4bceff54..c9fd6245832ccb8bd0b941d32b3be50e09358adf 100644 (file)
@@ -1,6 +1,6 @@
 {\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
index aa818ef78d9a56e12fce43f666f94ee12d06375c..ddd13040318565787876b4f4db0d6b43d9a535d9 100644 (file)
@@ -1,6 +1,6 @@
 {\r
   "title": "Lebony betöltő",\r
-  "active": true,\r
+  "active": false,\r
   "startInTray": false,\r
   "enableCustomMetadataId": true,\r
   "player": {\r
index d5a2187bb507ca59e674965a188d463789db252a..c8fcc10ad784f0e52ff142341ac381f60f48d704 100644 (file)
@@ -1,6 +1,6 @@
 {\r
   "title": "SxS",\r
-  "active": true,\r
+  "active": false,\r
   "startInTray": false,\r
   "enableCustomMetadataId": true,\r
   "player": {\r
index 1adb1e04f5c88c97430d7bbbe9390bcdb6e9e639..4b77ea2517bb4a83188fc4456bd0e2b4e81ac43e 100644 (file)
@@ -26,17 +26,17 @@ namespace Maestro {
         /// </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
@@ -159,32 +159,32 @@ namespace Maestro {
             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
@@ -706,15 +706,15 @@ namespace Maestro {
             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
@@ -722,8 +722,8 @@ namespace Maestro {
             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
@@ -744,8 +744,8 @@ namespace Maestro {
             // \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
@@ -762,8 +762,8 @@ namespace Maestro {
             // \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
@@ -831,15 +831,15 @@ namespace Maestro {
             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
@@ -848,8 +848,8 @@ namespace Maestro {
             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
@@ -868,8 +868,8 @@ namespace Maestro {
             // \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
index ec03942d22ae085f35f14816f3ddaba8fec62318..640c3f13e6ef8ac29e6cb75e9a1eacef55d163fa 100644 (file)
@@ -80,9 +80,10 @@ namespace Maestro {
                 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
index 6b8361d3aab5a57ff3d310cfea15c39775c6886f..72cdd087a7f0840373f51ec7da6041f1284394d2 100644 (file)
@@ -46,18 +46,18 @@ namespace Maestro {
         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
index 14f8d31f6304889f369c27abce1fe012fae85655..401351b853dcce0299ccfe2322848bdd3b8536b7 100644 (file)
         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
index 8e677d04ee67f28e04ea2c01c1f2cb4f779162e1..0aa1d4f64029925414647f37f6ba01aa4435a0bf 100644 (file)
@@ -91,7 +91,7 @@ namespace Maestro {
         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
@@ -112,8 +112,8 @@ namespace Maestro {
                 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
@@ -144,7 +144,6 @@ namespace Maestro {
             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
@@ -158,18 +157,19 @@ namespace Maestro {
             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
@@ -181,7 +181,7 @@ namespace Maestro {
                             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
diff --git a/client/MaestroShared/Commons/PatterNameMaker.cs b/client/MaestroShared/Commons/PatterNameMaker.cs
new file mode 100644 (file)
index 0000000..9927cd5
--- /dev/null
@@ -0,0 +1,56 @@
+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
index 1c5daf7996231fd8e3431b8619b3186c48cd2cdf..df62d60862f2f6ed3e05c7a085e9e0f31a804601 100644 (file)
@@ -69,6 +69,7 @@ namespace MaestroShared.Configuration {
         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
@@ -107,20 +108,29 @@ namespace MaestroShared.Configuration {
         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
index d0282625935f229a682e191ce61e889a065c58db..3c08b76a185844e10e803ae3bb374bbd2542262e 100644 (file)
@@ -83,6 +83,7 @@
     <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
index 0d7cddd414b91c34bfd9288c1eb8f3891268c6fe..cced4b4bb3f062a381c36613beb22d82cbcde1cc 100644 (file)
@@ -108,6 +108,10 @@ namespace MaestroShared.Targets {
             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
@@ -122,21 +126,14 @@ namespace MaestroShared.Targets {
             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
index dbff9690cdd93403148f5c2d387007f00c5c7e67..f3399ef6495556bc5fca67f28cca194b8bfb8d15 100644 (file)
@@ -36,7 +36,7 @@ namespace MaestroShared.Targets {
             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
index 94a054aa0491706cc63af91dcaf4dc4ed39f2231..5e64ef2a85296ccb649ddd64acd6b5c326d3eba7 100644 (file)
@@ -5,7 +5,6 @@ using System.Windows.Forms;
 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
@@ -24,7 +23,6 @@ namespace MaestroShared.Targets {
         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
@@ -47,6 +45,8 @@ namespace MaestroShared.Targets {
         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
@@ -109,12 +109,11 @@ namespace MaestroShared.Targets {
         }\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
@@ -216,7 +215,7 @@ namespace MaestroShared.Targets {
 \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
@@ -244,20 +243,48 @@ namespace MaestroShared.Targets {
             }\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
@@ -343,28 +370,13 @@ namespace MaestroShared.Targets {
             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
@@ -376,7 +388,7 @@ namespace MaestroShared.Targets {
                     version++;\r
                 }\r
             }\r
-            return result.ToUpper();\r
+            return result.ToUpper().Replace(BACKSLASH, SLASH);\r
         }\r
 \r
         protected virtual void EnsureDirectoryExistence(string path) {\r
index 8a5a112439da9dae944b308b7595ac1537b18b97..60773a376a12686379fa1fced4f68eec48fb8d54 100644 (file)
@@ -1,33 +1,24 @@
 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
index 77eb85b9aa4a87d7ed53e0c409911ba362de7ddb..7a16e2754bf5efe8c08385bbb0a2f1128e686641 100644 (file)
       <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
index af3b5c4b82ada6c2f0b42b5d48ec17201be92588..d2026605d504ef839e07d67ee5df78a5c874f8f6 100644 (file)
@@ -47,8 +47,9 @@
             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
index 1aad376f55bbc94873887bba7157e66449804deb..ac5964f6f938bdf4394dd74a9fb0a0e3ab3cc026 100644 (file)
@@ -6,6 +6,10 @@ using System.Collections.Generic;
 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
@@ -18,12 +22,12 @@ namespace OctopusClient {
         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
@@ -57,27 +61,20 @@ namespace OctopusClient {
             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
@@ -136,7 +133,7 @@ namespace OctopusClient {
                 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
@@ -149,7 +146,7 @@ namespace OctopusClient {
                 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
@@ -165,7 +162,7 @@ namespace OctopusClient {
         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
@@ -173,7 +170,7 @@ namespace OctopusClient {
                 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
@@ -389,13 +386,63 @@ namespace OctopusClient {
                 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
similarity index 71%
rename from client/OctopusClient/OctopusConfiguration.cs
rename to client/OctopusClient/OctopusParameters.cs
index d212548ffca89d50043eb5d0b80ecef24700d510..797d287b0248724954603fb973c75e719f0842c3 100644 (file)
@@ -2,8 +2,9 @@
 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