From 37b47e212c877695cefe8b39cb5bed60f87ededb Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Tue, 5 Dec 2017 09:57:00 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30789 --- client/AudioRecorder/AudioRecorder.csproj | 13 +- client/AudioRecorder/Form1.Designer.cs | 114 ----------- client/AudioRecorder/Form1.cs | 21 -- ...afika.json => -configuration-grafika.json} | 0 ...rchive.json => configuration-archive.json} | 0 ...ration-sxs.json => configuration-sxs.json} | 0 client/Maestro/Maestro.csproj | 6 +- client/Maestro/MaestroForm.Designer.cs | 98 +++++---- client/Maestro/MaestroForm.Metadata.cs | 74 ++++--- client/Maestro/MaestroForm.Source.cs | 3 +- client/Maestro/MaestroForm.Target.cs | 53 +++-- client/Maestro/MaestroForm.resx | 2 +- client/Maestro/Properties/AssemblyInfo.cs | 4 +- .../Configuration/ConfigurationInfo.cs | 1 - client/MaestroShared/MaestroShared.csproj | 15 ++ .../MaestroShared/Metadata/ArchiveMetadata.cs | 2 +- .../Properties/Resources.Designer.cs | 52 ++++- .../MaestroShared/Properties/Resources.resx | 15 ++ .../ic_playlist_add_check_black_24dp_1x.png | Bin 0 -> 122 bytes ...laylist_add_check_black_24dp_1x_green1.png | Bin 0 -> 2417 bytes .../Resources/ic_receipt_black_24dp_1x.png | Bin 0 -> 105 bytes .../ic_receipt_black_24dp_1x_green.png | Bin 0 -> 2417 bytes .../Resources/ic_search_black_24dp_1x.png | Bin 0 -> 249 bytes client/MediaCube.sln | 24 ++- .../MetadataIDSelector.Designer.cs | 189 ++++++++++++++++++ client/MetadataSelector/MetadataIDSelector.cs | 129 ++++++++++++ .../MetadataIDSelector.resx} | 11 + .../MetadataSelector/MetadataSelector.csproj | 90 +++++++++ .../Properties/AssemblyInfo.cs | 36 ++++ .../OctopusIDSelector.Designer.cs | 115 ++++++----- .../TrafficIDSelector.Designer.cs | 92 ++++----- client/PlanAIRClient/TrafficIDSelector.cs | 2 +- 32 files changed, 808 insertions(+), 353 deletions(-) delete mode 100644 client/AudioRecorder/Form1.Designer.cs delete mode 100644 client/AudioRecorder/Form1.cs rename client/Maestro/Configuration/{configuration-grafika.json => -configuration-grafika.json} (100%) rename client/Maestro/Configuration/{-configuration-archive.json => configuration-archive.json} (100%) rename client/Maestro/Configuration/{-configuration-sxs.json => configuration-sxs.json} (100%) create mode 100644 client/MaestroShared/Resources/ic_playlist_add_check_black_24dp_1x.png create mode 100644 client/MaestroShared/Resources/ic_playlist_add_check_black_24dp_1x_green1.png create mode 100644 client/MaestroShared/Resources/ic_receipt_black_24dp_1x.png create mode 100644 client/MaestroShared/Resources/ic_receipt_black_24dp_1x_green.png create mode 100644 client/MaestroShared/Resources/ic_search_black_24dp_1x.png create mode 100644 client/MetadataSelector/MetadataIDSelector.Designer.cs create mode 100644 client/MetadataSelector/MetadataIDSelector.cs rename client/{AudioRecorder/Form1.resx => MetadataSelector/MetadataIDSelector.resx} (85%) create mode 100644 client/MetadataSelector/MetadataSelector.csproj create mode 100644 client/MetadataSelector/Properties/AssemblyInfo.cs diff --git a/client/AudioRecorder/AudioRecorder.csproj b/client/AudioRecorder/AudioRecorder.csproj index 13438689..409678af 100644 --- a/client/AudioRecorder/AudioRecorder.csproj +++ b/client/AudioRecorder/AudioRecorder.csproj @@ -129,12 +129,6 @@ OctopusIDSelectorForm.cs - - Form - - - Form1.cs - @@ -169,9 +163,6 @@ OctopusIDSelectorForm.cs - - Form1.cs - MainForm.cs @@ -220,6 +211,10 @@ {d4417174-f21e-4ce2-ae5c-8eb30c9a9625} MaestroShared + + {8cb8266d-2229-47e2-b06d-54fde82cbdc4} + MetadataSelector + {8cc7c930-9dbf-487b-aed5-776937a649d5} OctopusClient diff --git a/client/AudioRecorder/Form1.Designer.cs b/client/AudioRecorder/Form1.Designer.cs deleted file mode 100644 index 7f4d80d6..00000000 --- a/client/AudioRecorder/Form1.Designer.cs +++ /dev/null @@ -1,114 +0,0 @@ -namespace AudioRecorder { - partial class Form1 { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() { - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.flowLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.checkBox1); - this.flowLayoutPanel1.Controls.Add(this.checkBox2); - this.flowLayoutPanel1.Controls.Add(this.checkBox3); - this.flowLayoutPanel1.Controls.Add(this.textBox1); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(305, 100); - this.flowLayoutPanel1.TabIndex = 0; - // - // checkBox1 - // - this.checkBox1.Appearance = System.Windows.Forms.Appearance.Button; - this.checkBox1.AutoSize = true; - this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.checkBox1.Location = new System.Drawing.Point(3, 3); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(71, 23); - this.checkBox1.TabIndex = 0; - this.checkBox1.Text = "checkBox1"; - this.checkBox1.UseVisualStyleBackColor = true; - // - // checkBox2 - // - this.checkBox2.Appearance = System.Windows.Forms.Appearance.Button; - this.checkBox2.AutoSize = true; - this.checkBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.checkBox2.Location = new System.Drawing.Point(80, 3); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(71, 23); - this.checkBox2.TabIndex = 1; - this.checkBox2.Text = "checkBox2"; - this.checkBox2.UseVisualStyleBackColor = true; - this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); - // - // checkBox3 - // - this.checkBox3.Appearance = System.Windows.Forms.Appearance.Button; - this.checkBox3.AutoSize = true; - this.checkBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.flowLayoutPanel1.SetFlowBreak(this.checkBox3, true); - this.checkBox3.Location = new System.Drawing.Point(157, 3); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(71, 23); - this.checkBox3.TabIndex = 2; - this.checkBox3.Text = "checkBox3"; - this.checkBox3.UseVisualStyleBackColor = true; - // - // textBox1 - // - this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.textBox1.Location = new System.Drawing.Point(3, 32); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(243, 20); - this.textBox1.TabIndex = 3; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(305, 346); - this.Controls.Add(this.flowLayoutPanel1); - this.Name = "Form1"; - this.Text = "Form1"; - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.CheckBox checkBox1; - private System.Windows.Forms.CheckBox checkBox2; - private System.Windows.Forms.CheckBox checkBox3; - private System.Windows.Forms.TextBox textBox1; - } -} \ No newline at end of file diff --git a/client/AudioRecorder/Form1.cs b/client/AudioRecorder/Form1.cs deleted file mode 100644 index 071752da..00000000 --- a/client/AudioRecorder/Form1.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace AudioRecorder { - public partial class Form1 : Form { - public Form1() { - InitializeComponent(); - } - - private void checkBox2_CheckedChanged(object sender, EventArgs e) { - - } - } -} diff --git a/client/Maestro/Configuration/configuration-grafika.json b/client/Maestro/Configuration/-configuration-grafika.json similarity index 100% rename from client/Maestro/Configuration/configuration-grafika.json rename to client/Maestro/Configuration/-configuration-grafika.json diff --git a/client/Maestro/Configuration/-configuration-archive.json b/client/Maestro/Configuration/configuration-archive.json similarity index 100% rename from client/Maestro/Configuration/-configuration-archive.json rename to client/Maestro/Configuration/configuration-archive.json diff --git a/client/Maestro/Configuration/-configuration-sxs.json b/client/Maestro/Configuration/configuration-sxs.json similarity index 100% rename from client/Maestro/Configuration/-configuration-sxs.json rename to client/Maestro/Configuration/configuration-sxs.json diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index 139ee95d..c55cd4e6 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -252,7 +252,7 @@ Always - + Always @@ -264,7 +264,7 @@ Always - + Always @@ -318,7 +318,7 @@ PreserveNewest - + Always diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index 01de42aa..9229c050 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -61,12 +61,12 @@ namespace Maestro { this.tpTraffic = new System.Windows.Forms.TabPage(); this.trafficIDSelector = new TrafficClient.TrafficIDSelector(); this.pMetadataDisplay = new System.Windows.Forms.TableLayoutPanel(); - this.btnLookupMetadata = new System.Windows.Forms.Button(); - this.labelSelectedMetadata = new System.Windows.Forms.Label(); - this.textSelectedMetadata = new System.Windows.Forms.TextBox(); this.tsMetadata = new System.Windows.Forms.ToolStrip(); this.btnEditMetadata = new System.Windows.Forms.ToolStripButton(); this.btnDefineSegments = new System.Windows.Forms.ToolStripButton(); + this.btnLookupMetadata = new System.Windows.Forms.Button(); + this.labelSelectedMetadata = new System.Windows.Forms.Label(); + this.textSelectedMetadata = new System.Windows.Forms.TextBox(); this.groupTarget = new System.Windows.Forms.GroupBox(); this.panelActions = new System.Windows.Forms.TableLayoutPanel(); this.pExecute = new System.Windows.Forms.Panel(); @@ -92,6 +92,7 @@ namespace Maestro { this.dgMessages = new System.Windows.Forms.DataGridView(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewProgressColumn1 = new Maestro.Commons.DataGridViewProgressColumn(); this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); this.groupSource.SuspendLayout(); @@ -476,10 +477,10 @@ namespace Maestro { this.pMetadataDisplay.ColumnCount = 2; this.pMetadataDisplay.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.pMetadataDisplay.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.pMetadataDisplay.Controls.Add(this.tsMetadata, 0, 0); this.pMetadataDisplay.Controls.Add(this.btnLookupMetadata, 1, 2); this.pMetadataDisplay.Controls.Add(this.labelSelectedMetadata, 0, 1); this.pMetadataDisplay.Controls.Add(this.textSelectedMetadata, 0, 2); - this.pMetadataDisplay.Controls.Add(this.tsMetadata, 0, 0); this.pMetadataDisplay.Dock = System.Windows.Forms.DockStyle.Bottom; this.pMetadataDisplay.Location = new System.Drawing.Point(10, 370); this.pMetadataDisplay.Margin = new System.Windows.Forms.Padding(0); @@ -491,6 +492,45 @@ namespace Maestro { this.pMetadataDisplay.Size = new System.Drawing.Size(330, 91); this.pMetadataDisplay.TabIndex = 4; // + // tsMetadata + // + this.pMetadataDisplay.SetColumnSpan(this.tsMetadata, 2); + this.tsMetadata.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.tsMetadata.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnEditMetadata, + this.btnDefineSegments}); + this.tsMetadata.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; + this.tsMetadata.Location = new System.Drawing.Point(0, 0); + this.tsMetadata.Name = "tsMetadata"; + this.tsMetadata.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.tsMetadata.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.tsMetadata.Size = new System.Drawing.Size(330, 31); + this.tsMetadata.TabIndex = 17; + // + // btnEditMetadata + // + this.btnEditMetadata.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btnEditMetadata.Image = global::Maestro.Properties.Resources.ic_receipt_black_24dp_1x; + this.btnEditMetadata.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.btnEditMetadata.ImageTransparentColor = System.Drawing.Color.GreenYellow; + this.btnEditMetadata.Name = "btnEditMetadata"; + this.btnEditMetadata.Size = new System.Drawing.Size(28, 28); + this.btnEditMetadata.Text = "toolStripButton2"; + this.btnEditMetadata.ToolTipText = "Metaadat"; + this.btnEditMetadata.Click += new System.EventHandler(this.OnEditMetadata); + // + // btnDefineSegments + // + this.btnDefineSegments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btnDefineSegments.Image = global::Maestro.Properties.Resources.ic_playlist_add_check_black_24dp_1x; + this.btnDefineSegments.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.btnDefineSegments.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btnDefineSegments.Name = "btnDefineSegments"; + this.btnDefineSegments.Size = new System.Drawing.Size(28, 28); + this.btnDefineSegments.Text = "toolStripButton3"; + this.btnDefineSegments.ToolTipText = "Szegmensek"; + this.btnDefineSegments.Click += new System.EventHandler(this.OnDefineSegments); + // // btnLookupMetadata // this.btnLookupMetadata.BackColor = System.Drawing.Color.Transparent; @@ -531,46 +571,7 @@ namespace Maestro { this.textSelectedMetadata.Size = new System.Drawing.Size(288, 26); this.textSelectedMetadata.TabIndex = 12; this.textSelectedMetadata.TextChanged += new System.EventHandler(this.OnMetadataIDChanged); - this.textSelectedMetadata.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textSelectedMetadata_KeyDown); - // - // tsMetadata - // - this.pMetadataDisplay.SetColumnSpan(this.tsMetadata, 2); - this.tsMetadata.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.tsMetadata.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.btnEditMetadata, - this.btnDefineSegments}); - this.tsMetadata.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; - this.tsMetadata.Location = new System.Drawing.Point(0, 0); - this.tsMetadata.Name = "tsMetadata"; - this.tsMetadata.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.tsMetadata.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.tsMetadata.Size = new System.Drawing.Size(330, 31); - this.tsMetadata.TabIndex = 17; - // - // btnEditMetadata - // - this.btnEditMetadata.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.btnEditMetadata.Image = global::Maestro.Properties.Resources.ic_receipt_black_24dp_1x; - this.btnEditMetadata.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; - this.btnEditMetadata.ImageTransparentColor = System.Drawing.Color.GreenYellow; - this.btnEditMetadata.Name = "btnEditMetadata"; - this.btnEditMetadata.Size = new System.Drawing.Size(28, 28); - this.btnEditMetadata.Text = "toolStripButton2"; - this.btnEditMetadata.ToolTipText = "Metaadat"; - this.btnEditMetadata.Click += new System.EventHandler(this.OnEditMetadata); - // - // btnDefineSegments - // - this.btnDefineSegments.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.btnDefineSegments.Image = global::Maestro.Properties.Resources.ic_playlist_add_check_black_24dp_1x; - this.btnDefineSegments.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; - this.btnDefineSegments.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btnDefineSegments.Name = "btnDefineSegments"; - this.btnDefineSegments.Size = new System.Drawing.Size(28, 28); - this.btnDefineSegments.Text = "toolStripButton3"; - this.btnDefineSegments.ToolTipText = "Szegmensek"; - this.btnDefineSegments.Click += new System.EventHandler(this.OnDefineSegments); + this.textSelectedMetadata.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnSelectedMetadataKeyDown); // // groupTarget // @@ -901,6 +902,14 @@ namespace Maestro { this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; this.dataGridViewTextBoxColumn2.ReadOnly = true; // + // dataGridViewProgressColumn1 + // + this.dataGridViewProgressColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.dataGridViewProgressColumn1.DataPropertyName = "Progress"; + this.dataGridViewProgressColumn1.HeaderText = ""; + this.dataGridViewProgressColumn1.MinimumWidth = 100; + this.dataGridViewProgressColumn1.Name = "dataGridViewProgressColumn1"; + // // systemMessageBindingSource // this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage); @@ -1029,6 +1038,7 @@ namespace Maestro { private DataGridViewTextBoxColumn columnOutput; private DataGridViewTextBoxColumn columnKillDate; private DataGridViewTextBoxColumn Message; + private Commons.DataGridViewProgressColumn dataGridViewProgressColumn1; } } diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index 73e069b6..18f2f45c 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -44,6 +44,14 @@ namespace Maestro { } } + public ArchiveMetadata ArchiveMetadata { + get => archiveMetadata; + set { + archiveMetadata = value; + btnEditMetadata.ToolTipText = archiveMetadata == null ? "Metaadat" :archiveMetadata.ToString(); + } + } + private void InitializeMetadata() { InitializeOctopusSelector(); InitializeTrafficSelector(); @@ -95,12 +103,12 @@ namespace Maestro { } private void OnEditMetadata(object sender, EventArgs e) { - if (archiveMetadata == null) - archiveMetadata = GetArchiveMetadata(); + if (ArchiveMetadata == null) + ArchiveMetadata = GetArchiveMetadata(); //if (archiveMetadata == null || !archiveMetadata.IsFilled) { //MC metaadta esetén nincs cím - if (archiveMetadata == null) { + if (ArchiveMetadata == null) { MessageBox.Show("Nem található archív metaadat!"); return; } @@ -110,13 +118,13 @@ namespace Maestro { DialogResult result = form.ShowDialog(); if (result == DialogResult.OK && String.IsNullOrEmpty(textSelectedMetadata.Text)) { - ArchiveMetadata saved = archiveMetadata; + ArchiveMetadata saved = ArchiveMetadata; if (String.IsNullOrEmpty(textSelectedMetadata.Text)) - textSelectedMetadata.Text = archiveMetadata.mediaHouseId; + textSelectedMetadata.Text = ArchiveMetadata.mediaHouseId; else - textSelectedMetadata.Text = archiveMetadata.itemHouseId; - archiveMetadata = saved; - SelectedMetadata.MetadataText = archiveMetadata.itemTitle; + textSelectedMetadata.Text = ArchiveMetadata.itemHouseId; + ArchiveMetadata = saved; + SelectedMetadata.MetadataText = ArchiveMetadata.itemTitle; } UpdateEditArchiveMetadataStatus(); } @@ -162,10 +170,10 @@ namespace Maestro { if (movieSegments == null) movieSegments = new BindingList(); bool readOnly = true; - if (archiveMetadata == null) + if (ArchiveMetadata == null) MsgBox.Error("A metaadatok nem elérhetők, a szegmens definiálás nem engedélyezett."); else { - readOnly = archiveMetadata.ok; + readOnly = ArchiveMetadata.ok; MsgBox.Warning("Az anyag már el van fogadva, a szegmens módosítás nem kerül mentésre. A szegmensek módosításához vissza kell vonni az anyag elfogadását az adástervező rendszerben."); } OpenFile(SelectedSource.FileInfo, true, readOnly); @@ -181,14 +189,14 @@ namespace Maestro { } private void UpdateDefineSegmentsStatus() { - if(movieSegments == null || movieSegments.Count == 0) + if (movieSegments == null || movieSegments.Count == 0) btnDefineSegments.Image = Properties.Resources.ic_playlist_add_check_black_24dp_1x; else btnDefineSegments.Image = Properties.Resources.ic_playlist_add_check_black_24dp_1x_green; } private void UpdateEditArchiveMetadataStatus() { - if (archiveMetadata == null || !archiveMetadata.IsFilled) + if (ArchiveMetadata == null || !ArchiveMetadata.IsFilled) btnEditMetadata.Image = Properties.Resources.ic_receipt_black_24dp_1x; else btnEditMetadata.Image = Properties.Resources.ic_receipt_black_24dp_1x_green; @@ -334,23 +342,25 @@ namespace Maestro { } } - switch (SelectedMetadata?.Kind) { - case MetadataType.OctopusStory: - case MetadataType.OctopusPlaceHolder: - archiveMetadata = GetArchiveMetadata(); - break; - case MetadataType.TrafficAD: - case MetadataType.TrafficMaterial: - case MetadataType.TrafficPromo: - archiveMetadata = GetArchiveMetadata(); - movieSegments = null; - movieSegments = QuerySegments(); - break; - default: - movieSegments = null; - archiveMetadata = null; - break; - } + //switch (SelectedMetadata?.Kind) { + // case MetadataType.OctopusStory: + // case MetadataType.OctopusPlaceHolder: + // ArchiveMetadata = GetArchiveMetadata(); + // break; + // case MetadataType.TrafficAD: + // case MetadataType.TrafficMaterial: + // case MetadataType.TrafficPromo: + // ArchiveMetadata = GetArchiveMetadata(); + // movieSegments = null; + // movieSegments = QuerySegments(); + // break; + // default: + // movieSegments = null; + // ArchiveMetadata = null; + // break; + //} + movieSegments = null; + ArchiveMetadata = null; UpdateProcessorButtonsEnabled(); UpdateDefineSegmentEnabled(); @@ -360,8 +370,8 @@ namespace Maestro { private void OnOctopusIDSelected(string id, string name, string text) { trafficIDSelector.ClearSelection(); - archiveMetadata = null; if (id == null) { + ArchiveMetadata = null; SelectedMetadata = null; return; } @@ -376,8 +386,8 @@ namespace Maestro { private void OnTrafficIDSelected(string id, int variantID, string text) { octopusIDSelector.ClearSelection(); - archiveMetadata = null; if (id == null) { + ArchiveMetadata = null; SelectedMetadata = null; return; } @@ -485,7 +495,7 @@ namespace Maestro { btnLookupMetadata.Enabled = metadataType != MetadataType.None && metadataType != MetadataType.MediaCube; } - private void textSelectedMetadata_KeyDown(object sender, KeyEventArgs e) { + private void OnSelectedMetadataKeyDown(object sender, KeyEventArgs e) { if (e.KeyCode != Keys.Return || !btnLookupMetadata.Enabled) return; Lookup(SelectedMetadata.ID); diff --git a/client/Maestro/MaestroForm.Source.cs b/client/Maestro/MaestroForm.Source.cs index 4657a1f2..42eb5ef9 100644 --- a/client/Maestro/MaestroForm.Source.cs +++ b/client/Maestro/MaestroForm.Source.cs @@ -28,13 +28,14 @@ namespace Maestro { return selectedSource; } set { + if (selectedSource != null) + ArchiveMetadata = null; selectedSource = value; if (selectedSource == null) { selectedSourceItems.ForEach(i => i.IsChecked = false); selectedSourceItems.Clear(); } textSelectedSource.Text = selectedSource?.Name; - archiveMetadata = null; movieSegments = null; UpdateProcessorButtonsEnabled(); UpdateDefineSegmentEnabled(); diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index 1b487155..1174a290 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -89,7 +89,14 @@ namespace Maestro { result = null; break; } - TargetProcessorParameter processorParameter = CreateProcessorParameter(target, sourceItem, createDate); + TargetProcessorParameter processorParameter = null; + try { + processorParameter = CreateProcessorParameter(target, sourceItem, createDate); + } + catch (Exception e) { + result = null; + break; + } ITargetProcessor processor = TargetProcessor.Create(target.Processor); processor.Initialize(this, processorParameter); if (result == null) @@ -134,10 +141,16 @@ namespace Maestro { } private bool EnsureMetadata(Target target) { - if ((target.SaveArchiveMetadata || target.SaveMorpheusMetadata || target.NexioServer) && (archiveMetadata == null || !archiveMetadata.IsFilled)) { - archiveMetadata = GetArchiveMetadata(); + bool force = true.Equals(target.OutputFormat?.Contains("%")); + force |= true.Equals(target.SubFolderFormat?.Contains("%")); + force |= true.Equals(target.SuccessEmailPattern?.Contains("%")) && target.SendEmailOnSuccess; + force |= true.Equals(target.ErrorEmailPattern?.Contains("%")) && target.SendEmailOnError; + force |= target.SuccessEmailPattern == null ? false : target.SuccessEmailPattern.Contains("%"); + force |= target.SaveArchiveMetadata || target.SaveMorpheusMetadata || target.NexioServer; + if (force && (ArchiveMetadata == null || !ArchiveMetadata.IsFilled)) { + ArchiveMetadata = GetArchiveMetadata(); UpdateEditArchiveMetadataStatus(); - if (archiveMetadata == null) { + if (ArchiveMetadata == null) { MessageBox.Show(String.Format("A {0} folyamat nem futtatható kísérő adatok nélkül.", target.Label)); return false; } @@ -148,22 +161,22 @@ namespace Maestro { private TargetProcessorParameter CreateProcessorParameter(Target target, ISourceItem sourceItem, DateTime createDate) { FileSystemSource source = bindingSource.DataSource as FileSystemSource; - TargetProcessorParameter result = new TargetProcessorParameter() { - SourcePathOverride = (source == null || source.Path.Equals(Configuration.Source.Local.Address.LocalPath)) ? null : source.Path, - MediaCubeApi = mediaCubeApi, - SourceConfig = Configuration.Source, - TargetConfig = target, - ID = textSelectedMetadata.Text, - MetadataText = SelectedMetadata?.MetadataText, - InputFileName = sourceItem.Name, - MovieSegments = movieSegments == null ? null : movieSegments.ToList(), - ArchiveMetadata = ArchiveMetadata.DeepClone(archiveMetadata), - VariantID = selectedMetadata == null ? 0 : selectedMetadata.VariantID, - MetadataKind = selectedMetadata == null ? MetadataType.None : selectedMetadata.Kind, - UserName = TrayApplicationContext.UserName, - MessageBus = MessageBus, - CreateDate = createDate - }; + TargetProcessorParameter result = new TargetProcessorParameter(); + result.SourcePathOverride = (source == null || source.Path.Equals(Configuration.Source.Local.Address.LocalPath)) ? null : source.Path; + result.MediaCubeApi = mediaCubeApi; + result.SourceConfig = Configuration.Source; + result.TargetConfig = target; + result.ID = textSelectedMetadata.Text; + result.MetadataText = SelectedMetadata?.MetadataText; + result.InputFileName = sourceItem.Name; + result.MovieSegments = movieSegments == null ? null : movieSegments.ToList(); + result.ArchiveMetadata = ArchiveMetadata.DeepClone(ArchiveMetadata); + result.VariantID = selectedMetadata == null ? 0 : selectedMetadata.VariantID; + result.MetadataKind = selectedMetadata == null ? MetadataType.None : selectedMetadata.Kind; + result.UserName = TrayApplicationContext.UserName; + result.MessageBus = MessageBus; + result.CreateDate = createDate; + result.ArchiveMetadata.userName = result.UserName; if (SelectedMetadata.Kind == MetadataType.MediaCube && result.ArchiveMetadata != null) { result.ArchiveMetadata.itemHouseId = PatternNameMaker.Get(result.ArchiveMetadata.itemHouseId, result.ID, result.InputFileName, null, null, result.MetadataText); diff --git a/client/Maestro/MaestroForm.resx b/client/Maestro/MaestroForm.resx index aad7e19c..851c96f8 100644 --- a/client/Maestro/MaestroForm.resx +++ b/client/Maestro/MaestroForm.resx @@ -128,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAS - CAAAAk1TRnQBSQFMAgEBAgEAAeABAAHgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAASgBAQEoAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index d4db9ec8..ab744b7e 100644 --- a/client/Maestro/Properties/AssemblyInfo.cs +++ b/client/Maestro/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.6.3")] -[assembly: AssemblyFileVersion("2.0.6.3")] +[assembly: AssemblyVersion("2.0.6.4")] +[assembly: AssemblyFileVersion("2.0.6.4")] diff --git a/client/MaestroShared/Configuration/ConfigurationInfo.cs b/client/MaestroShared/Configuration/ConfigurationInfo.cs index 379ff105..419cfea6 100644 --- a/client/MaestroShared/Configuration/ConfigurationInfo.cs +++ b/client/MaestroShared/Configuration/ConfigurationInfo.cs @@ -69,7 +69,6 @@ namespace MaestroShared.Configuration { public string Label { get; set; } public string Processor { get; set; } public string OutputFormat { get; set; } - public bool FileNameOverride { get; set; } public int KillDateDays { get; set; } public Connection Remote { get; set; } public bool SaveSegments { get; set; } diff --git a/client/MaestroShared/MaestroShared.csproj b/client/MaestroShared/MaestroShared.csproj index 3e9f5286..2fce5a6a 100644 --- a/client/MaestroShared/MaestroShared.csproj +++ b/client/MaestroShared/MaestroShared.csproj @@ -168,5 +168,20 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/MaestroShared/Metadata/ArchiveMetadata.cs b/client/MaestroShared/Metadata/ArchiveMetadata.cs index bacae55d..fb4585e4 100644 --- a/client/MaestroShared/Metadata/ArchiveMetadata.cs +++ b/client/MaestroShared/Metadata/ArchiveMetadata.cs @@ -19,7 +19,7 @@ namespace MaestroShared.Metadata { public string userName { get; set; } public override string ToString() { - return JsonConvert.SerializeObject(this); + return JsonConvert.SerializeObject(this, Formatting.Indented); //return String.Format("{{\n \"Anyag azonosító\": \"{0}\",\n, \"Anyag cím\": \"{1}\",\n \"Anyag leírása\": \"{2}\",\n \"Média azonosító\": \"{3}\",\n \"Média cím\": \"{4}\",\n \"Média leírás\": \"{5}\" \n}}", // StuffID, StuffTitle, StuffDescription, MediaID, MediaTitle, MediaDescription); } diff --git a/client/MaestroShared/Properties/Resources.Designer.cs b/client/MaestroShared/Properties/Resources.Designer.cs index fdfa5f1d..e2bf6c44 100644 --- a/client/MaestroShared/Properties/Resources.Designer.cs +++ b/client/MaestroShared/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace MaestroShared.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -120,6 +120,56 @@ namespace MaestroShared.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ic_playlist_add_check_black_24dp_1x { + get { + object obj = ResourceManager.GetObject("ic_playlist_add_check_black_24dp_1x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ic_playlist_add_check_black_24dp_1x_green { + get { + object obj = ResourceManager.GetObject("ic_playlist_add_check_black_24dp_1x_green", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ic_receipt_black_24dp_1x { + get { + object obj = ResourceManager.GetObject("ic_receipt_black_24dp_1x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ic_receipt_black_24dp_1x_green { + get { + object obj = ResourceManager.GetObject("ic_receipt_black_24dp_1x_green", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap ic_search_black_24dp_1x { + get { + object obj = ResourceManager.GetObject("ic_search_black_24dp_1x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/client/MaestroShared/Properties/Resources.resx b/client/MaestroShared/Properties/Resources.resx index 895f6dbd..d084ffe4 100644 --- a/client/MaestroShared/Properties/Resources.resx +++ b/client/MaestroShared/Properties/Resources.resx @@ -130,12 +130,27 @@ ..\Resources\ic_pause_black_24dp_2x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_playlist_add_check_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_playlist_add_check_black_24dp_1x_green1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ic_play_arrow_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ic_play_arrow_black_24dp_2x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_receipt_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_receipt_black_24dp_1x_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_search_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ic_stop_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/client/MaestroShared/Resources/ic_playlist_add_check_black_24dp_1x.png b/client/MaestroShared/Resources/ic_playlist_add_check_black_24dp_1x.png new file mode 100644 index 0000000000000000000000000000000000000000..416490774d7064fd48305d40e9124de6ea0d2512 GIT binary patch literal 122 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4i*Lm2CurW#S9D#j-D=#Ar*|t3Q|2y|8FRs zlxkZjFXK_{%6y@L?a~xwlY~+)W`QJ)<7*ExE@N3Z$HV!`3j&A`CG;OXk;vd$@?2>_fIB%uHR literal 0 HcmV?d00001 diff --git a/client/MaestroShared/Resources/ic_playlist_add_check_black_24dp_1x_green1.png b/client/MaestroShared/Resources/ic_playlist_add_check_black_24dp_1x_green1.png new file mode 100644 index 0000000000000000000000000000000000000000..e0729642e42aeb2609d9fc9faaee24ddb340e51c GIT binary patch literal 2417 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4mJh`h6m-gKNuJoI14-?iy0XBj({-ZRBb+K z1_n-LPZ!4!kK>FIoX@{8{{R1JJp zSh@!p0@4^P^Is0xAY{YW*j-?S$-^U=7yt^}(8CZHuCZf$1TzGe;UGYAK0r4NWC$!+ zkX;S~BwGLi$dFIoX@{8{{R1iUn&PGuD6vK{O?7WJjX}5#ut$yKC$& zu!bBm_zkv*O!oh%^U5$wFf4#cPy&!GKnWsR0GeCCg3Hy&-XsQq;t!j;f%5?_7m*4E z&IhA$00X0OKoH=}$wMX|&^(ecEC5w9uz;n64F{k~ABI;yVyFSJK{O?7n0X)?rADI# czz8C0gO=bqb2gTzcY@6IboFyt=akR{05M*%(*OVf literal 0 HcmV?d00001 diff --git a/client/MaestroShared/Resources/ic_search_black_24dp_1x.png b/client/MaestroShared/Resources/ic_search_black_24dp_1x.png new file mode 100644 index 0000000000000000000000000000000000000000..6b16343235c2729720113158598c891fd041949f GIT binary patch literal 249 zcmV|r4fyyw@M>+ir$LGPVo;#@wk2g)LvA~nWu7_00000NkvXXu0mjfU?OPG literal 0 HcmV?d00001 diff --git a/client/MediaCube.sln b/client/MediaCube.sln index dd22d6c8..806f4aaf 100644 --- a/client/MediaCube.sln +++ b/client/MediaCube.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.15 +VisualStudioVersion = 15.0.27004.2010 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DxPlay", "DxPlay\DxPlay.csproj", "{0B44B3D7-52D7-4C0E-9B1C-F48CEEDA36FE}" EndProject @@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MXFFileParser", "MXFFilePar EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaestroShared", "MaestroShared\MaestroShared.csproj", "{D4417174-F21E-4CE2-AE5C-8EB30C9A9625}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetadataSelector", "MetadataSelector\MetadataSelector.csproj", "{8CB8266D-2229-47E2-B06D-54FDE82CBDC4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -152,12 +154,27 @@ Global {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x64.Build.0 = Release|x64 {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x86.ActiveCfg = Release|Any CPU {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x86.Build.0 = Release|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Debug|x64.ActiveCfg = Debug|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Debug|x64.Build.0 = Debug|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Debug|x86.ActiveCfg = Debug|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Debug|x86.Build.0 = Debug|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Release|Any CPU.Build.0 = Release|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Release|x64.ActiveCfg = Release|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Release|x64.Build.0 = Release|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Release|x86.ActiveCfg = Release|Any CPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8F7E7365-1678-4775-B9E4-B3993FC028E2} + EndGlobalSection GlobalSection(TeamFoundationVersionControl) = preSolution - SccNumberOfProjects = 11 + SccNumberOfProjects = 12 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = https://tfs.userrendszerhaz.hu/tfs/defaultcollection SccLocalPath0 = . @@ -191,5 +208,8 @@ Global SccProjectUniqueName10 = MaestroShared\\MaestroShared.csproj SccProjectName10 = MaestroShared SccLocalPath10 = MaestroShared + SccProjectUniqueName11 = MetadataSelector\\MetadataSelector.csproj + SccProjectName11 = MetadataSelector + SccLocalPath11 = MetadataSelector EndGlobalSection EndGlobal diff --git a/client/MetadataSelector/MetadataIDSelector.Designer.cs b/client/MetadataSelector/MetadataIDSelector.Designer.cs new file mode 100644 index 00000000..e1e19610 --- /dev/null +++ b/client/MetadataSelector/MetadataIDSelector.Designer.cs @@ -0,0 +1,189 @@ +namespace MaestroShared.Controls { + partial class MetadataSelector { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MetadataSelector)); + this.tabMetadata = new System.Windows.Forms.TabControl(); + this.tpOctopus = new System.Windows.Forms.TabPage(); + this.octopusIDSelector = new OctopusClient.OctopusIDSelector(); + this.tpTraffic = new System.Windows.Forms.TabPage(); + this.trafficIDSelector = new TrafficClient.TrafficIDSelector(); + this.pMetadataDisplay = new System.Windows.Forms.TableLayoutPanel(); + this.btnLookupMetadata = new System.Windows.Forms.Button(); + this.labelSelectedMetadata = new System.Windows.Forms.Label(); + this.textSelectedMetadata = new System.Windows.Forms.TextBox(); + this.tabMetadata.SuspendLayout(); + this.tpOctopus.SuspendLayout(); + this.tpTraffic.SuspendLayout(); + this.pMetadataDisplay.SuspendLayout(); + this.SuspendLayout(); + // + // tabMetadata + // + this.tabMetadata.Controls.Add(this.tpOctopus); + this.tabMetadata.Controls.Add(this.tpTraffic); + this.tabMetadata.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.tabMetadata.Location = new System.Drawing.Point(0, 0); + this.tabMetadata.Name = "tabMetadata"; + this.tabMetadata.SelectedIndex = 0; + this.tabMetadata.Size = new System.Drawing.Size(373, 456); + this.tabMetadata.TabIndex = 3; + // + // tpOctopus + // + this.tpOctopus.BackColor = System.Drawing.Color.Transparent; + this.tpOctopus.Controls.Add(this.octopusIDSelector); + this.tpOctopus.Location = new System.Drawing.Point(4, 24); + this.tpOctopus.Name = "tpOctopus"; + this.tpOctopus.Padding = new System.Windows.Forms.Padding(3); + this.tpOctopus.Size = new System.Drawing.Size(365, 428); + this.tpOctopus.TabIndex = 0; + this.tpOctopus.Text = "Octopus"; + // + // octopusIDSelector + // + this.octopusIDSelector.BackColor = System.Drawing.Color.Transparent; + this.octopusIDSelector.Dock = System.Windows.Forms.DockStyle.Fill; + this.octopusIDSelector.IDChangedEvent = null; + this.octopusIDSelector.Location = new System.Drawing.Point(3, 3); + this.octopusIDSelector.Name = "octopusIDSelector"; + this.octopusIDSelector.Size = new System.Drawing.Size(359, 422); + this.octopusIDSelector.TabIndex = 0; + // + // tpTraffic + // + this.tpTraffic.BackColor = System.Drawing.Color.Transparent; + this.tpTraffic.Controls.Add(this.trafficIDSelector); + this.tpTraffic.Location = new System.Drawing.Point(4, 24); + this.tpTraffic.Name = "tpTraffic"; + this.tpTraffic.Padding = new System.Windows.Forms.Padding(3); + this.tpTraffic.Size = new System.Drawing.Size(365, 428); + this.tpTraffic.TabIndex = 1; + this.tpTraffic.Text = "Traffic"; + // + // trafficIDSelector + // + this.trafficIDSelector.AutoSize = true; + this.trafficIDSelector.BackColor = System.Drawing.Color.Transparent; + this.trafficIDSelector.Dock = System.Windows.Forms.DockStyle.Fill; + this.trafficIDSelector.IDChangedEvent = null; + this.trafficIDSelector.Location = new System.Drawing.Point(3, 3); + this.trafficIDSelector.Name = "trafficIDSelector"; + this.trafficIDSelector.Size = new System.Drawing.Size(359, 422); + this.trafficIDSelector.TabIndex = 0; + // + // pMetadataDisplay + // + this.pMetadataDisplay.AutoSize = true; + this.pMetadataDisplay.ColumnCount = 2; + this.pMetadataDisplay.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.pMetadataDisplay.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.pMetadataDisplay.Controls.Add(this.btnLookupMetadata, 1, 1); + this.pMetadataDisplay.Controls.Add(this.labelSelectedMetadata, 0, 0); + this.pMetadataDisplay.Controls.Add(this.textSelectedMetadata, 0, 1); + this.pMetadataDisplay.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pMetadataDisplay.Location = new System.Drawing.Point(0, 456); + this.pMetadataDisplay.Margin = new System.Windows.Forms.Padding(0); + this.pMetadataDisplay.Name = "pMetadataDisplay"; + this.pMetadataDisplay.RowCount = 2; + this.pMetadataDisplay.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.pMetadataDisplay.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.pMetadataDisplay.Size = new System.Drawing.Size(373, 57); + this.pMetadataDisplay.TabIndex = 5; + // + // btnLookupMetadata + // + this.btnLookupMetadata.BackColor = System.Drawing.Color.Transparent; + this.btnLookupMetadata.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnLookupMetadata.Dock = System.Windows.Forms.DockStyle.Top; + this.btnLookupMetadata.Enabled = false; + this.btnLookupMetadata.FlatAppearance.BorderSize = 0; + this.btnLookupMetadata.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLookupMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.btnLookupMetadata.Image = ((System.Drawing.Image)(resources.GetObject("btnLookupMetadata.Image"))); + this.btnLookupMetadata.Location = new System.Drawing.Point(340, 28); + this.btnLookupMetadata.Name = "btnLookupMetadata"; + this.btnLookupMetadata.Size = new System.Drawing.Size(30, 26); + this.btnLookupMetadata.TabIndex = 16; + this.btnLookupMetadata.UseVisualStyleBackColor = false; + this.btnLookupMetadata.Click += new System.EventHandler(this.OnLookupByMetadata); + // + // labelSelectedMetadata + // + this.labelSelectedMetadata.AutoSize = true; + this.labelSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.labelSelectedMetadata.Location = new System.Drawing.Point(3, 0); + this.labelSelectedMetadata.Name = "labelSelectedMetadata"; + this.labelSelectedMetadata.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5); + this.labelSelectedMetadata.Size = new System.Drawing.Size(331, 25); + this.labelSelectedMetadata.TabIndex = 13; + this.labelSelectedMetadata.Text = "Kiválasztott metaadat"; + // + // textSelectedMetadata + // + this.textSelectedMetadata.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.textSelectedMetadata.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.textSelectedMetadata.Dock = System.Windows.Forms.DockStyle.Fill; + this.textSelectedMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.textSelectedMetadata.Location = new System.Drawing.Point(3, 28); + this.textSelectedMetadata.Name = "textSelectedMetadata"; + this.textSelectedMetadata.Size = new System.Drawing.Size(331, 26); + this.textSelectedMetadata.TabIndex = 12; + this.textSelectedMetadata.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textSelectedMetadata_KeyDown); + // + // MetadataSelector + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tabMetadata); + this.Controls.Add(this.pMetadataDisplay); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "MetadataSelector"; + this.Size = new System.Drawing.Size(373, 513); + this.tabMetadata.ResumeLayout(false); + this.tpOctopus.ResumeLayout(false); + this.tpTraffic.ResumeLayout(false); + this.tpTraffic.PerformLayout(); + this.pMetadataDisplay.ResumeLayout(false); + this.pMetadataDisplay.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TabControl tabMetadata; + private System.Windows.Forms.TabPage tpOctopus; + private System.Windows.Forms.TabPage tpTraffic; + private System.Windows.Forms.TableLayoutPanel pMetadataDisplay; + private System.Windows.Forms.Button btnLookupMetadata; + private System.Windows.Forms.Label labelSelectedMetadata; + private System.Windows.Forms.TextBox textSelectedMetadata; + private OctopusClient.OctopusIDSelector octopusIDSelector; + private TrafficClient.TrafficIDSelector trafficIDSelector; + } +} diff --git a/client/MetadataSelector/MetadataIDSelector.cs b/client/MetadataSelector/MetadataIDSelector.cs new file mode 100644 index 00000000..fd57e017 --- /dev/null +++ b/client/MetadataSelector/MetadataIDSelector.cs @@ -0,0 +1,129 @@ +using MaestroShared.Configuration; +using MaestroShared.Metadata; +using OctopusClient; +using System; +using System.Linq; +using System.Text.RegularExpressions; +using System.Windows.Forms; +using TrafficClient; + +namespace MaestroShared.Controls { + public partial class MetadataSelector : UserControl { + private const string REGEXP_TRAFFICMATERIALID = "^M{1}[0-9]{6}[A-Z]{1}$"; + private const string REGEXP_TRAFFICADID = "^R{1}[0-9]{6}[A-Z]{1}$"; + private const string REGEXP_TRAFFICPROMOID = "^P{1}[0-9]{6}[A-Z]{1}$"; + private const string REGEXP_OCTOPUSSTORYID = "^[0-9]+$"; + private const string REGEXP_OCTOPUSPLACEHOLDERID = "^[0-9]+_[0-9]+$"; + private const string REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID = "^[0-9]+_[0-9]+-[0-9]{3}$"; + + public MetadataProvider[] Providers { get; set; } + public TextBox MetadataIDText { get => textSelectedMetadata; } + public OctopusIDSelector OctopusIDSelector { get => octopusIDSelector; } + public TrafficIDSelector TrafficIDSelector { get => trafficIDSelector; } + + public MetadataSelector() { + InitializeComponent(); + } + //OnMetadataIDChanged + + private void OnLookupByMetadata(object sender, EventArgs e) { + Lookup(textSelectedMetadata.Text); + } + + public T GetMetadataProvider() { + MetadataProvider provider = Providers?.Where(m => { return m is T; }).FirstOrDefault(); + T result = default(T); + try { + result = (T)Convert.ChangeType(provider, typeof(T)); + } + finally { } + return result; + } + + private void Lookup(string id) { + MetadataProvider config = null; + MetadataType metadataType = GuessMetadataType(id); + switch (metadataType) { + case MetadataType.TrafficMaterial: + config = GetMetadataProvider(); + if (config == null) + return; + tabMetadata.SelectedIndex = tabMetadata.TabCount > 1 ? 1 : 0; + trafficIDSelector.LookupByMaterialID(id); + break; + case MetadataType.TrafficPromo: + config = GetMetadataProvider(); + if (config == null) + return; + tabMetadata.SelectedIndex = tabMetadata.TabCount > 1 ? 1 : 0; + trafficIDSelector.LookupByPromoID(id); + break; + case MetadataType.TrafficAD: + config = GetMetadataProvider(); + if (config == null) + return; + tabMetadata.SelectedIndex = tabMetadata.TabCount > 1 ? 1 : 0; + trafficIDSelector.LookupByADID(id); + break; + case MetadataType.OctopusPlaceHolder: + config = GetMetadataProvider(); + if (config == null) + return; + tabMetadata.SelectedIndex = 0; + octopusIDSelector.LookupByPlaceHolder(id); + break; + case MetadataType.OctopusStory: + config = GetMetadataProvider(); + if (config == null) + return; + tabMetadata.SelectedIndex = 0; + octopusIDSelector.LookupByStory(id); + break; + } + } + + private void UpdateLookupByMetadataEnabled() { + MetadataType metadataType = GuessMetadataType(textSelectedMetadata.Text); + btnLookupMetadata.Enabled = metadataType != MetadataType.None && metadataType != MetadataType.MediaCube; + } + + private void textSelectedMetadata_KeyDown(object sender, KeyEventArgs e) { + if (e.KeyCode != Keys.Return || !btnLookupMetadata.Enabled) + return; + Lookup(textSelectedMetadata.Text); + } + + private MetadataType GuessMetadataType(string id) { + if (String.IsNullOrEmpty(id)) + return MetadataType.None; + Match match = null; + + match = Regex.Match(id, REGEXP_TRAFFICMATERIALID); + if (match.Success) + return MetadataType.TrafficMaterial; + + match = Regex.Match(id, REGEXP_TRAFFICPROMOID); + if (match.Success) + return MetadataType.TrafficPromo; + + match = Regex.Match(id, REGEXP_TRAFFICADID); + if (match.Success) + return MetadataType.TrafficAD; + + match = Regex.Match(id, REGEXP_OCTOPUSSTORYID); + if (match.Success) + return MetadataType.OctopusStory; + + match = Regex.Match(id, REGEXP_OCTOPUSPLACEHOLDERID); + if (match.Success) + return MetadataType.OctopusPlaceHolder; + + match = Regex.Match(id, REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID); + if (match.Success) + return MetadataType.OctopusPlaceHolder; + + return MetadataType.MediaCube; + } + + } +} diff --git a/client/AudioRecorder/Form1.resx b/client/MetadataSelector/MetadataIDSelector.resx similarity index 85% rename from client/AudioRecorder/Form1.resx rename to client/MetadataSelector/MetadataIDSelector.resx index 29dcb1b3..7ca6282c 100644 --- a/client/AudioRecorder/Form1.resx +++ b/client/MetadataSelector/MetadataIDSelector.resx @@ -117,4 +117,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAQlJREFUSEvt + k00OAUEQRic4B+EMxEZC4laEe1jYi58j+VlijRXhex21m+lJjYyFeMnLpCfVVTPV1cmfTxjKjTzLx/u5 + lgP5ETU5l8+IM0lcISz5RY5kXVZkQ47lVVoRN7TFkrd5kUJHWpE+LzzQczby5TEmkrhVWDngINlIW2I0 + JXHHsHLAtLCRnseoSuLuYeXA/oADjdGSxJ3CygFzzkamJcZUErcMKwdcIjYyJUxLGl15k8T1eOGF+bYi + TAsHSs9pC19uyReyENxQK5IlyXkeZN55ZcIlYs4ZRaaFA6Xn1haSU2QvCxeJQVKSU2Qn8+5OIShC8q8V + 2cpSipCUIqUVABKXlvxnSZIXKVlUzExD9aQAAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/client/MetadataSelector/MetadataSelector.csproj b/client/MetadataSelector/MetadataSelector.csproj new file mode 100644 index 00000000..f02fadc8 --- /dev/null +++ b/client/MetadataSelector/MetadataSelector.csproj @@ -0,0 +1,90 @@ + + + + + Debug + AnyCPU + {8CB8266D-2229-47E2-B06D-54FDE82CBDC4} + Library + Properties + MetadataSelector + MetadataSelector + v4.6.1 + 512 + SAK + SAK + SAK + SAK + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll + + + ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\NLog.4.4.12\lib\net45\NLog.dll + + + ..\packages\RestSharp.105.2.3\lib\net46\RestSharp.dll + + + + + + + + + + + + + + + + UserControl + + + MetadataIDSelector.cs + + + + + + MetadataIDSelector.cs + + + + + {d4417174-f21e-4ce2-ae5c-8eb30c9a9625} + MaestroShared + + + {8CC7C930-9DBF-487B-AED5-776937A649D5} + OctopusClient + + + {A7A21311-CB0E-465F-8AD6-829FAF093F00} + TrafficClient + + + + \ No newline at end of file diff --git a/client/MetadataSelector/Properties/AssemblyInfo.cs b/client/MetadataSelector/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..0595330c --- /dev/null +++ b/client/MetadataSelector/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MetadataSelector")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MetadataSelector")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8cb8266d-2229-47e2-b06d-54fde82cbdc4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/client/OctopusClient/OctopusIDSelector.Designer.cs b/client/OctopusClient/OctopusIDSelector.Designer.cs index 17c36687..c18ea6e7 100644 --- a/client/OctopusClient/OctopusIDSelector.Designer.cs +++ b/client/OctopusClient/OctopusIDSelector.Designer.cs @@ -25,9 +25,8 @@ namespace OctopusClient { /// the contents of this method with the code editor. /// private void InitializeComponent() { - this.treeOctopus = new CheckableTreeView(); this.pSeparator = new System.Windows.Forms.Panel(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.pSearch = new System.Windows.Forms.TableLayoutPanel(); this.cbFolders = new System.Windows.Forms.ComboBox(); this.dtScheduled = new System.Windows.Forms.DateTimePicker(); this.pFolderType = new System.Windows.Forms.FlowLayoutPanel(); @@ -35,54 +34,43 @@ namespace OctopusClient { this.rbStoryFolder = new System.Windows.Forms.RadioButton(); this.txtFilter = new System.Windows.Forms.TextBox(); this.noFocusCueButton1 = new MaestroShared.Controls.NoFocusCueButton(); - this.tableLayoutPanel1.SuspendLayout(); + this.treeOctopus = new OctopusClient.CheckableTreeView(); + this.pSearch.SuspendLayout(); this.pFolderType.SuspendLayout(); this.SuspendLayout(); // - // treeOctopus - // - this.treeOctopus.BackColor = System.Drawing.Color.White; - this.treeOctopus.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.treeOctopus.CheckBoxes = true; - this.treeOctopus.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeOctopus.Location = new System.Drawing.Point(0, 80); - this.treeOctopus.Margin = new System.Windows.Forms.Padding(0); - this.treeOctopus.Name = "treeOctopus"; - this.treeOctopus.Size = new System.Drawing.Size(300, 320); - this.treeOctopus.TabIndex = 5; - this.treeOctopus.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeOctopus_NodeMouseClick); - this.treeOctopus.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeOctopus_NodeMouseDoubleClick); - this.treeOctopus.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeContent_KeyDown); - // // pSeparator // this.pSeparator.BackColor = System.Drawing.Color.White; this.pSeparator.Dock = System.Windows.Forms.DockStyle.Top; - this.pSeparator.Location = new System.Drawing.Point(0, 74); + this.pSeparator.Location = new System.Drawing.Point(0, 71); this.pSeparator.Name = "pSeparator"; this.pSeparator.Size = new System.Drawing.Size(300, 6); this.pSeparator.TabIndex = 12; // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this.cbFolders, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.dtScheduled, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.pFolderType, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.txtFilter, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.noFocusCueButton1, 2, 2); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(300, 74); - this.tableLayoutPanel1.TabIndex = 13; + // pSearch + // + this.pSearch.AutoSize = true; + this.pSearch.ColumnCount = 3; + this.pSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.pSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.pSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.pSearch.Controls.Add(this.cbFolders, 1, 2); + this.pSearch.Controls.Add(this.dtScheduled, 0, 2); + this.pSearch.Controls.Add(this.pFolderType, 0, 1); + this.pSearch.Controls.Add(this.txtFilter, 0, 0); + this.pSearch.Controls.Add(this.noFocusCueButton1, 2, 2); + this.pSearch.Dock = System.Windows.Forms.DockStyle.Top; + this.pSearch.Location = new System.Drawing.Point(0, 0); + this.pSearch.Margin = new System.Windows.Forms.Padding(0); + this.pSearch.Name = "pSearch"; + this.pSearch.Padding = new System.Windows.Forms.Padding(3); + this.pSearch.RowCount = 3; + this.pSearch.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.pSearch.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.pSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.pSearch.Size = new System.Drawing.Size(300, 71); + this.pSearch.TabIndex = 13; // // cbFolders // @@ -91,10 +79,10 @@ namespace OctopusClient { this.cbFolders.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbFolders.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.cbFolders.FormattingEnabled = true; - this.cbFolders.Location = new System.Drawing.Point(83, 49); + this.cbFolders.Location = new System.Drawing.Point(86, 49); this.cbFolders.Margin = new System.Windows.Forms.Padding(1); this.cbFolders.Name = "cbFolders"; - this.cbFolders.Size = new System.Drawing.Size(193, 21); + this.cbFolders.Size = new System.Drawing.Size(190, 21); this.cbFolders.TabIndex = 5; this.cbFolders.SelectedValueChanged += new System.EventHandler(this.OnSelectedFolderChanged); // @@ -102,7 +90,7 @@ namespace OctopusClient { // this.dtScheduled.CustomFormat = " "; this.dtScheduled.Format = System.Windows.Forms.DateTimePickerFormat.Short; - this.dtScheduled.Location = new System.Drawing.Point(1, 49); + this.dtScheduled.Location = new System.Drawing.Point(4, 49); this.dtScheduled.Margin = new System.Windows.Forms.Padding(1); this.dtScheduled.Name = "dtScheduled"; this.dtScheduled.Size = new System.Drawing.Size(80, 20); @@ -111,14 +99,15 @@ namespace OctopusClient { // // pFolderType // - this.tableLayoutPanel1.SetColumnSpan(this.pFolderType, 3); + this.pFolderType.AutoSize = true; + this.pSearch.SetColumnSpan(this.pFolderType, 3); this.pFolderType.Controls.Add(this.rbRundown); this.pFolderType.Controls.Add(this.rbStoryFolder); this.pFolderType.Dock = System.Windows.Forms.DockStyle.Top; - this.pFolderType.Location = new System.Drawing.Point(0, 22); + this.pFolderType.Location = new System.Drawing.Point(3, 25); this.pFolderType.Margin = new System.Windows.Forms.Padding(0); this.pFolderType.Name = "pFolderType"; - this.pFolderType.Size = new System.Drawing.Size(300, 26); + this.pFolderType.Size = new System.Drawing.Size(294, 23); this.pFolderType.TabIndex = 3; // // rbRundown @@ -143,7 +132,7 @@ namespace OctopusClient { this.rbStoryFolder.Appearance = System.Windows.Forms.Appearance.Button; this.rbStoryFolder.AutoSize = true; this.rbStoryFolder.Dock = System.Windows.Forms.DockStyle.Left; - this.rbStoryFolder.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.rbStoryFolder.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.rbStoryFolder.Location = new System.Drawing.Point(63, 0); this.rbStoryFolder.Margin = new System.Windows.Forms.Padding(0); this.rbStoryFolder.Name = "rbStoryFolder"; @@ -154,12 +143,12 @@ namespace OctopusClient { // // txtFilter // - this.tableLayoutPanel1.SetColumnSpan(this.txtFilter, 3); + this.pSearch.SetColumnSpan(this.txtFilter, 3); this.txtFilter.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtFilter.Location = new System.Drawing.Point(1, 1); + this.txtFilter.Location = new System.Drawing.Point(4, 4); this.txtFilter.Margin = new System.Windows.Forms.Padding(1); this.txtFilter.Name = "txtFilter"; - this.txtFilter.Size = new System.Drawing.Size(298, 20); + this.txtFilter.Size = new System.Drawing.Size(292, 20); this.txtFilter.TabIndex = 1; this.txtFilter.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnFilterKeyDown); // @@ -171,11 +160,28 @@ namespace OctopusClient { this.noFocusCueButton1.Location = new System.Drawing.Point(278, 49); this.noFocusCueButton1.Margin = new System.Windows.Forms.Padding(1); this.noFocusCueButton1.Name = "noFocusCueButton1"; - this.noFocusCueButton1.Size = new System.Drawing.Size(21, 21); + this.noFocusCueButton1.Size = new System.Drawing.Size(18, 18); this.noFocusCueButton1.TabIndex = 6; this.noFocusCueButton1.UseVisualStyleBackColor = true; this.noFocusCueButton1.Click += new System.EventHandler(this.noFocusCueButton1_Click); // + // treeOctopus + // + this.treeOctopus.BackColor = System.Drawing.Color.White; + this.treeOctopus.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.treeOctopus.CheckBoxes = true; + this.treeOctopus.DisableCheckBoxLevels = null; + this.treeOctopus.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeOctopus.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawText; + this.treeOctopus.Location = new System.Drawing.Point(0, 77); + this.treeOctopus.Margin = new System.Windows.Forms.Padding(0); + this.treeOctopus.Name = "treeOctopus"; + this.treeOctopus.Size = new System.Drawing.Size(300, 323); + this.treeOctopus.TabIndex = 5; + this.treeOctopus.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeOctopus_NodeMouseClick); + this.treeOctopus.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeOctopus_NodeMouseDoubleClick); + this.treeOctopus.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeContent_KeyDown); + // // OctopusIDSelector // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -183,21 +189,22 @@ namespace OctopusClient { this.BackColor = System.Drawing.Color.Transparent; this.Controls.Add(this.treeOctopus); this.Controls.Add(this.pSeparator); - this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.pSearch); this.Name = "OctopusIDSelector"; this.Size = new System.Drawing.Size(300, 400); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); + this.pSearch.ResumeLayout(false); + this.pSearch.PerformLayout(); this.pFolderType.ResumeLayout(false); this.pFolderType.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion private CheckableTreeView treeOctopus; private System.Windows.Forms.Panel pSeparator; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TableLayoutPanel pSearch; private System.Windows.Forms.ComboBox cbFolders; private System.Windows.Forms.DateTimePicker dtScheduled; private System.Windows.Forms.FlowLayoutPanel pFolderType; diff --git a/client/PlanAIRClient/TrafficIDSelector.Designer.cs b/client/PlanAIRClient/TrafficIDSelector.Designer.cs index b9f8ec04..aedababa 100644 --- a/client/PlanAIRClient/TrafficIDSelector.Designer.cs +++ b/client/PlanAIRClient/TrafficIDSelector.Designer.cs @@ -29,9 +29,9 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.trafficAPIBindingSource = new System.Windows.Forms.BindingSource(this.components); this.dtScheduled = new System.Windows.Forms.DateTimePicker(); this.txtFilter = new System.Windows.Forms.TextBox(); @@ -40,10 +40,10 @@ this.rbPromo = new System.Windows.Forms.RadioButton(); this.rbAD = new System.Windows.Forms.RadioButton(); this.pSearch = new System.Windows.Forms.TableLayoutPanel(); - this.noFocusCueButton1 = new MaestroShared.Controls.NoFocusCueButton(); this.chkProblematic = new System.Windows.Forms.CheckBox(); this.dgTraffic = new System.Windows.Forms.DataGridView(); this.pSeparator = new System.Windows.Forms.Panel(); + this.noFocusCueButton1 = new MaestroShared.Controls.NoFocusCueButton(); ((System.ComponentModel.ISupportInitialize)(this.trafficAPIBindingSource)).BeginInit(); this.pFolderType.SuspendLayout(); this.pSearch.SuspendLayout(); @@ -54,7 +54,7 @@ // this.dtScheduled.CustomFormat = " "; this.dtScheduled.Format = System.Windows.Forms.DateTimePickerFormat.Short; - this.dtScheduled.Location = new System.Drawing.Point(4, 48); + this.dtScheduled.Location = new System.Drawing.Point(96, 49); this.dtScheduled.Margin = new System.Windows.Forms.Padding(1); this.dtScheduled.Name = "dtScheduled"; this.dtScheduled.ShowCheckBox = true; @@ -69,13 +69,14 @@ this.txtFilter.Location = new System.Drawing.Point(4, 4); this.txtFilter.Margin = new System.Windows.Forms.Padding(1); this.txtFilter.Name = "txtFilter"; - this.txtFilter.Size = new System.Drawing.Size(324, 20); + this.txtFilter.Size = new System.Drawing.Size(292, 20); this.txtFilter.TabIndex = 0; this.txtFilter.TextChanged += new System.EventHandler(this.txtFilter_TextChanged); this.txtFilter.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtFilter_KeyDown); // // pFolderType // + this.pFolderType.AutoSize = true; this.pSearch.SetColumnSpan(this.pFolderType, 3); this.pFolderType.Controls.Add(this.rbMaterial); this.pFolderType.Controls.Add(this.rbPromo); @@ -84,7 +85,7 @@ this.pFolderType.Location = new System.Drawing.Point(3, 25); this.pFolderType.Margin = new System.Windows.Forms.Padding(0); this.pFolderType.Name = "pFolderType"; - this.pFolderType.Size = new System.Drawing.Size(326, 22); + this.pFolderType.Size = new System.Drawing.Size(294, 23); this.pFolderType.TabIndex = 2; // // rbMaterial @@ -140,10 +141,10 @@ this.pSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.pSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.pSearch.Controls.Add(this.noFocusCueButton1, 2, 2); - this.pSearch.Controls.Add(this.chkProblematic, 1, 2); + this.pSearch.Controls.Add(this.chkProblematic, 0, 1); this.pSearch.Controls.Add(this.pFolderType, 0, 1); this.pSearch.Controls.Add(this.txtFilter, 0, 0); - this.pSearch.Controls.Add(this.dtScheduled, 0, 2); + this.pSearch.Controls.Add(this.dtScheduled, 1, 2); this.pSearch.Dock = System.Windows.Forms.DockStyle.Top; this.pSearch.Location = new System.Drawing.Point(0, 0); this.pSearch.Margin = new System.Windows.Forms.Padding(0); @@ -154,29 +155,16 @@ this.pSearch.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.pSearch.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.pSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.pSearch.Size = new System.Drawing.Size(332, 73); + this.pSearch.Size = new System.Drawing.Size(300, 73); this.pSearch.TabIndex = 10; - this.pSearch.Paint += new System.Windows.Forms.PaintEventHandler(this.tableLayoutPanelSearch_Paint); - // - // noFocusCueButton1 - // - this.noFocusCueButton1.FlatAppearance.BorderSize = 0; - this.noFocusCueButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.noFocusCueButton1.Image = global::TrafficClient.Resources.ic_refresh_black_24dp_1x; - this.noFocusCueButton1.Location = new System.Drawing.Point(310, 48); - this.noFocusCueButton1.Margin = new System.Windows.Forms.Padding(1); - this.noFocusCueButton1.Name = "noFocusCueButton1"; - this.noFocusCueButton1.Size = new System.Drawing.Size(18, 21); - this.noFocusCueButton1.TabIndex = 8; - this.noFocusCueButton1.UseVisualStyleBackColor = true; - this.noFocusCueButton1.Click += new System.EventHandler(this.OnRefresh); + this.pSearch.Paint += new System.Windows.Forms.PaintEventHandler(this.OnSearchPanelPaint); // // chkProblematic // this.chkProblematic.AutoSize = true; this.chkProblematic.Checked = true; this.chkProblematic.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkProblematic.Location = new System.Drawing.Point(99, 50); + this.chkProblematic.Location = new System.Drawing.Point(4, 51); this.chkProblematic.Margin = new System.Windows.Forms.Padding(1, 3, 1, 1); this.chkProblematic.Name = "chkProblematic"; this.chkProblematic.Size = new System.Drawing.Size(90, 17); @@ -197,23 +185,23 @@ this.dgTraffic.BackgroundColor = System.Drawing.Color.White; this.dgTraffic.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgTraffic.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgTraffic.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgTraffic.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dgTraffic.DataSource = this.trafficAPIBindingSource; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgTraffic.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgTraffic.DefaultCellStyle = dataGridViewCellStyle2; this.dgTraffic.Dock = System.Windows.Forms.DockStyle.Fill; this.dgTraffic.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgTraffic.EnableHeadersVisualStyles = false; @@ -222,11 +210,11 @@ this.dgTraffic.MultiSelect = false; this.dgTraffic.Name = "dgTraffic"; this.dgTraffic.RowHeadersVisible = false; - dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - this.dgTraffic.RowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); + this.dgTraffic.RowsDefaultCellStyle = dataGridViewCellStyle3; this.dgTraffic.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.dgTraffic.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgTraffic.Size = new System.Drawing.Size(332, 321); + this.dgTraffic.Size = new System.Drawing.Size(300, 321); this.dgTraffic.TabIndex = 0; this.dgTraffic.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.OnCellContentClick); this.dgTraffic.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.OnCellDoubleClick); @@ -238,9 +226,21 @@ this.pSeparator.Dock = System.Windows.Forms.DockStyle.Top; this.pSeparator.Location = new System.Drawing.Point(0, 73); this.pSeparator.Name = "pSeparator"; - this.pSeparator.Size = new System.Drawing.Size(332, 6); + this.pSeparator.Size = new System.Drawing.Size(300, 6); this.pSeparator.TabIndex = 13; // + // noFocusCueButton1 + // + this.noFocusCueButton1.FlatAppearance.BorderSize = 0; + this.noFocusCueButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.noFocusCueButton1.Image = global::TrafficClient.Resources.ic_refresh_black_24dp_1x; + this.noFocusCueButton1.Location = new System.Drawing.Point(278, 49); + this.noFocusCueButton1.Margin = new System.Windows.Forms.Padding(1); + this.noFocusCueButton1.Name = "noFocusCueButton1"; + this.noFocusCueButton1.Size = new System.Drawing.Size(18, 18); + this.noFocusCueButton1.TabIndex = 8; + this.noFocusCueButton1.UseVisualStyleBackColor = true; + // // TrafficIDSelector // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -251,7 +251,7 @@ this.Controls.Add(this.pSeparator); this.Controls.Add(this.pSearch); this.Name = "TrafficIDSelector"; - this.Size = new System.Drawing.Size(332, 400); + this.Size = new System.Drawing.Size(300, 400); ((System.ComponentModel.ISupportInitialize)(this.trafficAPIBindingSource)).EndInit(); this.pFolderType.ResumeLayout(false); this.pFolderType.PerformLayout(); diff --git a/client/PlanAIRClient/TrafficIDSelector.cs b/client/PlanAIRClient/TrafficIDSelector.cs index 0ac82bde..bafefa4d 100644 --- a/client/PlanAIRClient/TrafficIDSelector.cs +++ b/client/PlanAIRClient/TrafficIDSelector.cs @@ -165,7 +165,7 @@ namespace TrafficClient { trafficAPIBindingSource.DataSource = null; } - private void tableLayoutPanelSearch_Paint(object sender, PaintEventArgs e) { + private void OnSearchPanelPaint(object sender, PaintEventArgs e) { ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle, Color.LightGray, ButtonBorderStyle.Solid); // dotted border } -- 2.54.0