git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 7 Aug 2018 22:50:54 +0000 (22:50 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 7 Aug 2018 22:50:54 +0000 (22:50 +0000)
46 files changed:
client/DxPlay/Configuration/dxplay.en [new file with mode: 0644]
client/DxPlay/Configuration/dxplay.json [new file with mode: 0644]
client/DxPlay/Controls/BindableToolStripMenuItem .cs [new file with mode: 0644]
client/DxPlay/Controls/Player.Designer.cs [new file with mode: 0644]
client/DxPlay/Controls/Player.cs [new file with mode: 0644]
client/DxPlay/Controls/PlayerControls.Designer.cs [new file with mode: 0644]
client/DxPlay/Controls/PlayerControls.cs [new file with mode: 0644]
client/DxPlay/Controls/PlayerControls.resx [new file with mode: 0644]
client/DxPlay/DxPlay.csproj
client/DxPlay/DxPlaySettings.cs [new file with mode: 0644]
client/DxPlay/DxPlayer.cs
client/DxPlay/DxPlayerx.cs [moved from client/DxPlay/DxPlayer - Copy.cs with 100% similarity]
client/DxPlay/Integration/Traffic.cs [new file with mode: 0644]
client/DxPlay/Model/DxPlayModel.cs [new file with mode: 0644]
client/DxPlay/PlayerForm.Designer.cs
client/DxPlay/PlayerForm.cs
client/DxPlay/PlayerForm.resx
client/DxPlay/PlayerGraph.cs
client/DxPlay/Program.cs
client/DxPlay/Properties/AssemblyInfo.cs
client/DxPlay/StringResource.Designer.cs
client/DxPlay/StringResource.resx
client/DxPlay/app.config
client/DxPlay/nlog.config
client/DxPlay/packages.config
client/IntegrationTests/App.config
client/Maestro/Configuration/-UJ-configuration-tqc-check.json [moved from client/Maestro/Configuration/UJ-configuration-tqc-check.json with 92% similarity]
client/Maestro/Configuration/configuration-nle.json [moved from client/Maestro/Configuration/-configuration-nle.json with 94% similarity]
client/Maestro/MaestroForm.Source.cs
client/Maestro/Program.cs
client/Maestro/app.config
client/MaestroShared/Configuration/ConfigurationInfo.cs
client/MaestroShared/Controls/FlatTabControl.cs [new file with mode: 0644]
client/MaestroShared/Controls/FlatTabControl.resx [new file with mode: 0644]
client/MaestroShared/Controls/Win32.cs [new file with mode: 0644]
client/MaestroShared/MaestroShared.csproj
client/MaestroShared/Properties/Resources.Designer.cs
client/MaestroShared/Properties/Resources.resx
client/MaestroShared/Resources/baseline_arrow_downward_black_18dp.png [new file with mode: 0644]
client/MaestroShared/Resources/baseline_chevron_left_black_18dp.png [new file with mode: 0644]
client/MaestroShared/Resources/baseline_chevron_right_black_18dp.png [new file with mode: 0644]
client/MaestroShared/Resources/baseline_close_black_18dp.png [new file with mode: 0644]
client/MaestroShared/Resources/baseline_ondemand_video_black_18dp.png [new file with mode: 0644]
client/MaestroShared/Resources/baseline_playlist_add_check_black_18dp.png [new file with mode: 0644]
client/MaestroShared/Resources/baseline_playlist_add_check_black_36dp.png [new file with mode: 0644]
client/MaestroShared/Resources/round_publish_black_24dp.png [new file with mode: 0644]

diff --git a/client/DxPlay/Configuration/dxplay.en b/client/DxPlay/Configuration/dxplay.en
new file mode 100644 (file)
index 0000000..3f488e8
--- /dev/null
@@ -0,0 +1,27 @@
+{\r
+  "define-segment": "Define segment",\r
+  "break-segment": "Break segment",\r
+  "position-as-tcin": "Current position as TC in",\r
+  "position-as-tcout": "Current position as TC out",\r
+  "delete-segment": "Delete segment",\r
+  "segments": "Segments",\r
+  "no-input": "NO INPUT",\r
+  "start": "START",\r
+  "length": "LENGTH",\r
+  "tc-in": "TC in",\r
+  "tc-out": "TC out",\r
+  "optional": "Optional",\r
+  "comment": "Comment",\r
+  "starting": "STARTING",\r
+  "exiting": "EXITING",\r
+  "paused": "PAUSED",\r
+  "playing": "PLAYING",\r
+  "stopped": "STOPPED",\r
+  "completed": "COMPLETED",\r
+  "pause": "Pause",\r
+  "play": "Play",\r
+  "stop": "Stop",\r
+  "missing-traffic-configuration": "Missing PlanAir connection configuration.",\r
+  "error-traffic-connect": "Could not connect to PlanAir system, using: {0}",\r
+  "missing-traffic-variant": "Missing metadata for {0} in PlanAir system."\r
+}\r
diff --git a/client/DxPlay/Configuration/dxplay.json b/client/DxPlay/Configuration/dxplay.json
new file mode 100644 (file)
index 0000000..eb24fa4
--- /dev/null
@@ -0,0 +1,17 @@
+{\r
+  "uiFileName": "dxplay.en",\r
+  "isMaximized": true,\r
+  "player": {\r
+    "autoStart": false,\r
+    "segmentEditor": true,\r
+  },\r
+  "metadata": {\r
+    "$type": "TrafficMetadata",\r
+    "server": {\r
+      "address": "Data Source=10.10.1.45;Initial Catalog=PA_Echo;Persist Security Info=True;",\r
+      "userName": "MAM",\r
+      "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ",\r
+      "timeout": 1000\r
+    }\r
+  }\r
+}\r
diff --git a/client/DxPlay/Controls/BindableToolStripMenuItem .cs b/client/DxPlay/Controls/BindableToolStripMenuItem .cs
new file mode 100644 (file)
index 0000000..34e4253
--- /dev/null
@@ -0,0 +1,35 @@
+using System.ComponentModel;\r
+using System.Windows.Forms;\r
+\r
+namespace DxPlay.Controls {\r
+    class BindableToolStripMenuItem : ToolStripMenuItem, IBindableComponent {\r
+        private BindingContext bindingContext;\r
+        private ControlBindingsCollection dataBindings;\r
+\r
+        [Browsable(false)]\r
+        public BindingContext BindingContext {\r
+            get {\r
+                if (bindingContext == null) {\r
+                    bindingContext = new BindingContext();\r
+                }\r
+                return bindingContext;\r
+            }\r
+\r
+            set {\r
+                bindingContext = value;\r
+            }\r
+        }\r
+\r
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]\r
+        public ControlBindingsCollection DataBindings {\r
+            get {\r
+                if (dataBindings == null) {\r
+                    dataBindings = new ControlBindingsCollection(this);\r
+                }\r
+                return dataBindings;\r
+\r
+            }\r
+\r
+        }\r
+    }\r
+}\r
diff --git a/client/DxPlay/Controls/Player.Designer.cs b/client/DxPlay/Controls/Player.Designer.cs
new file mode 100644 (file)
index 0000000..290f08b
--- /dev/null
@@ -0,0 +1,32 @@
+namespace DxPlay.Controls {\r
+    partial class Player {\r
+        /// <summary> \r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary> \r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing) {\r
+            if (disposing && (components != null)) {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Component Designer generated code\r
+\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent() {\r
+            components = new System.ComponentModel.Container();\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+        }\r
+\r
+        #endregion\r
+    }\r
+}\r
diff --git a/client/DxPlay/Controls/Player.cs b/client/DxPlay/Controls/Player.cs
new file mode 100644 (file)
index 0000000..20f30a0
--- /dev/null
@@ -0,0 +1,17 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Threading.Tasks;\r
+using System.Windows.Forms;\r
+\r
+namespace DxPlay.Controls {\r
+    public partial class Player : UserControl {\r
+        public Player() {\r
+            InitializeComponent();\r
+        }\r
+    }\r
+}\r
diff --git a/client/DxPlay/Controls/PlayerControls.Designer.cs b/client/DxPlay/Controls/PlayerControls.Designer.cs
new file mode 100644 (file)
index 0000000..9ca08ea
--- /dev/null
@@ -0,0 +1,274 @@
+namespace DxPlay.Controls {\r
+    partial class PlayerControls {\r
+        /// <summary> \r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary> \r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing) {\r
+            if (disposing && (components != null)) {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Component Designer generated code\r
+\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent() {\r
+            this.mainPanel = new System.Windows.Forms.TableLayoutPanel();\r
+            this.trackBar = new MaestroShared.Controls.ColorSlider();\r
+            this.timecodePanel = new System.Windows.Forms.TableLayoutPanel();\r
+            this.lbCurrentTC = new System.Windows.Forms.Label();\r
+            this.lbStartTC = new System.Windows.Forms.Label();\r
+            this.lbStart = new System.Windows.Forms.Label();\r
+            this.lbStatus = new System.Windows.Forms.Label();\r
+            this.lbDuration = new System.Windows.Forms.Label();\r
+            this.lbEndTC = new System.Windows.Forms.Label();\r
+            this.buttonsPanel = new System.Windows.Forms.FlowLayoutPanel();\r
+            this.btnPlay = new MaestroShared.Controls.NoFocusCueButton();\r
+            this.btnStop = new MaestroShared.Controls.NoFocusCueButton();\r
+            this.btnPause = new MaestroShared.Controls.NoFocusCueButton();\r
+            this.mainPanel.SuspendLayout();\r
+            this.timecodePanel.SuspendLayout();\r
+            this.buttonsPanel.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // mainPanel\r
+            // \r
+            this.mainPanel.AutoSize = true;\r
+            this.mainPanel.ColumnCount = 1;\r
+            this.mainPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
+            this.mainPanel.Controls.Add(this.trackBar, 0, 1);\r
+            this.mainPanel.Controls.Add(this.timecodePanel, 0, 0);\r
+            this.mainPanel.Controls.Add(this.buttonsPanel, 0, 2);\r
+            this.mainPanel.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.mainPanel.Location = new System.Drawing.Point(0, 0);\r
+            this.mainPanel.Margin = new System.Windows.Forms.Padding(0);\r
+            this.mainPanel.Name = "mainPanel";\r
+            this.mainPanel.RowCount = 3;\r
+            this.mainPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+            this.mainPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+            this.mainPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+            this.mainPanel.Size = new System.Drawing.Size(835, 116);\r
+            this.mainPanel.TabIndex = 0;\r
+            // \r
+            // trackBar\r
+            // \r
+            this.trackBar.BackColor = System.Drawing.Color.Transparent;\r
+            this.trackBar.BarInnerColor = System.Drawing.Color.Transparent;\r
+            this.trackBar.BarOuterColor = System.Drawing.Color.Black;\r
+            this.trackBar.BarPenColor = System.Drawing.Color.Black;\r
+            this.trackBar.BorderRoundRectSize = new System.Drawing.Size(8, 8);\r
+            this.trackBar.Cursor = System.Windows.Forms.Cursors.Hand;\r
+            this.trackBar.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.trackBar.ElapsedInnerColor = System.Drawing.Color.Black;\r
+            this.trackBar.ElapsedOuterColor = System.Drawing.Color.DarkGray;\r
+            this.trackBar.LargeChange = ((uint)(0u));\r
+            this.trackBar.Location = new System.Drawing.Point(3, 43);\r
+            this.trackBar.Maximum = 1;\r
+            this.trackBar.Name = "trackBar";\r
+            this.trackBar.Size = new System.Drawing.Size(829, 10);\r
+            this.trackBar.SmallChange = ((uint)(1u));\r
+            this.trackBar.TabIndex = 19;\r
+            this.trackBar.Text = "colorSlider1";\r
+            this.trackBar.ThumbInnerColor = System.Drawing.Color.Black;\r
+            this.trackBar.ThumbOuterColor = System.Drawing.Color.Silver;\r
+            this.trackBar.ThumbPenColor = System.Drawing.Color.Black;\r
+            this.trackBar.ThumbRoundRectSize = new System.Drawing.Size(8, 8);\r
+            this.trackBar.ThumbSize = 10;\r
+            this.trackBar.Value = 0;\r
+            // \r
+            // timecodePanel\r
+            // \r
+            this.timecodePanel.AutoSize = true;\r
+            this.timecodePanel.ColumnCount = 3;\r
+            this.timecodePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));\r
+            this.timecodePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));\r
+            this.timecodePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));\r
+            this.timecodePanel.Controls.Add(this.lbCurrentTC, 0, 1);\r
+            this.timecodePanel.Controls.Add(this.lbStartTC, 0, 1);\r
+            this.timecodePanel.Controls.Add(this.lbStart, 0, 0);\r
+            this.timecodePanel.Controls.Add(this.lbStatus, 1, 0);\r
+            this.timecodePanel.Controls.Add(this.lbDuration, 2, 0);\r
+            this.timecodePanel.Controls.Add(this.lbEndTC, 2, 1);\r
+            this.timecodePanel.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.timecodePanel.Location = new System.Drawing.Point(0, 0);\r
+            this.timecodePanel.Margin = new System.Windows.Forms.Padding(0);\r
+            this.timecodePanel.Name = "timecodePanel";\r
+            this.timecodePanel.RowCount = 2;\r
+            this.timecodePanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+            this.timecodePanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
+            this.timecodePanel.Size = new System.Drawing.Size(835, 40);\r
+            this.timecodePanel.TabIndex = 0;\r
+            // \r
+            // lbCurrentTC\r
+            // \r
+            this.lbCurrentTC.BackColor = System.Drawing.SystemColors.Control;\r
+            this.lbCurrentTC.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.lbCurrentTC.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.lbCurrentTC.Location = new System.Drawing.Point(170, 13);\r
+            this.lbCurrentTC.Name = "lbCurrentTC";\r
+            this.lbCurrentTC.Size = new System.Drawing.Size(495, 27);\r
+            this.lbCurrentTC.TabIndex = 25;\r
+            this.lbCurrentTC.Text = "00:00:00.00";\r
+            this.lbCurrentTC.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\r
+            // \r
+            // lbStartTC\r
+            // \r
+            this.lbStartTC.BackColor = System.Drawing.SystemColors.Control;\r
+            this.lbStartTC.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.lbStartTC.Font = new System.Drawing.Font("Calibri", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.lbStartTC.ForeColor = System.Drawing.SystemColors.WindowText;\r
+            this.lbStartTC.Location = new System.Drawing.Point(3, 13);\r
+            this.lbStartTC.Name = "lbStartTC";\r
+            this.lbStartTC.Size = new System.Drawing.Size(161, 17);\r
+            this.lbStartTC.TabIndex = 23;\r
+            this.lbStartTC.Text = "00:00:00.00";\r
+            // \r
+            // lbStart\r
+            // \r
+            this.lbStart.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.lbStart.Font = new System.Drawing.Font("Calibri", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.lbStart.Location = new System.Drawing.Point(3, 0);\r
+            this.lbStart.Name = "lbStart";\r
+            this.lbStart.Size = new System.Drawing.Size(161, 13);\r
+            this.lbStart.TabIndex = 19;\r
+            this.lbStart.Text = "START";\r
+            this.lbStart.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
+            // \r
+            // lbStatus\r
+            // \r
+            this.lbStatus.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.lbStatus.Font = new System.Drawing.Font("Calibri", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.lbStatus.Location = new System.Drawing.Point(170, 0);\r
+            this.lbStatus.Name = "lbStatus";\r
+            this.lbStatus.Size = new System.Drawing.Size(495, 13);\r
+            this.lbStatus.TabIndex = 21;\r
+            this.lbStatus.Text = "NO INPUT";\r
+            this.lbStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\r
+            // \r
+            // lbDuration\r
+            // \r
+            this.lbDuration.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.lbDuration.Font = new System.Drawing.Font("Calibri", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.lbDuration.Location = new System.Drawing.Point(671, 0);\r
+            this.lbDuration.Name = "lbDuration";\r
+            this.lbDuration.Size = new System.Drawing.Size(161, 13);\r
+            this.lbDuration.TabIndex = 22;\r
+            this.lbDuration.Text = "DURATION";\r
+            this.lbDuration.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            // \r
+            // lbEndTC\r
+            // \r
+            this.lbEndTC.BackColor = System.Drawing.SystemColors.Control;\r
+            this.lbEndTC.Dock = System.Windows.Forms.DockStyle.Top;\r
+            this.lbEndTC.Font = new System.Drawing.Font("Calibri", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.lbEndTC.ForeColor = System.Drawing.SystemColors.WindowText;\r
+            this.lbEndTC.Location = new System.Drawing.Point(671, 13);\r
+            this.lbEndTC.Name = "lbEndTC";\r
+            this.lbEndTC.Size = new System.Drawing.Size(161, 17);\r
+            this.lbEndTC.TabIndex = 24;\r
+            this.lbEndTC.Text = "00:00:00.00";\r
+            this.lbEndTC.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
+            // \r
+            // buttonsPanel\r
+            // \r
+            this.buttonsPanel.AutoSize = true;\r
+            this.buttonsPanel.Controls.Add(this.btnPlay);\r
+            this.buttonsPanel.Controls.Add(this.btnStop);\r
+            this.buttonsPanel.Controls.Add(this.btnPause);\r
+            this.buttonsPanel.Location = new System.Drawing.Point(0, 56);\r
+            this.buttonsPanel.Margin = new System.Windows.Forms.Padding(0);\r
+            this.buttonsPanel.Name = "buttonsPanel";\r
+            this.buttonsPanel.Size = new System.Drawing.Size(180, 60);\r
+            this.buttonsPanel.TabIndex = 20;\r
+            // \r
+            // btnPlay\r
+            // \r
+            this.btnPlay.AutoSize = true;\r
+            this.btnPlay.BackColor = System.Drawing.Color.Transparent;\r
+            this.btnPlay.FlatAppearance.BorderSize = 0;\r
+            this.btnPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btnPlay.Image = global::DxPlay.Properties.Resources.ic_play_arrow_black_24dp_2x;\r
+            this.btnPlay.Location = new System.Drawing.Point(3, 3);\r
+            this.btnPlay.Name = "btnPlay";\r
+            this.btnPlay.Size = new System.Drawing.Size(54, 54);\r
+            this.btnPlay.TabIndex = 17;\r
+            this.btnPlay.TabStop = false;\r
+            this.btnPlay.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
+            this.btnPlay.UseVisualStyleBackColor = false;\r
+            // \r
+            // btnStop\r
+            // \r
+            this.btnStop.AutoSize = true;\r
+            this.btnStop.BackColor = System.Drawing.Color.Transparent;\r
+            this.btnStop.FlatAppearance.BorderSize = 0;\r
+            this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btnStop.Image = global::DxPlay.Properties.Resources.ic_stop_black_24dp_2x;\r
+            this.btnStop.Location = new System.Drawing.Point(63, 3);\r
+            this.btnStop.Name = "btnStop";\r
+            this.btnStop.Size = new System.Drawing.Size(54, 54);\r
+            this.btnStop.TabIndex = 19;\r
+            this.btnStop.TabStop = false;\r
+            this.btnStop.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
+            this.btnStop.UseVisualStyleBackColor = false;\r
+            // \r
+            // btnPause\r
+            // \r
+            this.btnPause.AutoSize = true;\r
+            this.btnPause.BackColor = System.Drawing.Color.Transparent;\r
+            this.btnPause.FlatAppearance.BorderSize = 0;\r
+            this.btnPause.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.btnPause.Image = global::DxPlay.Properties.Resources.ic_pause_black_24dp_2x;\r
+            this.btnPause.Location = new System.Drawing.Point(123, 3);\r
+            this.btnPause.Name = "btnPause";\r
+            this.btnPause.Size = new System.Drawing.Size(54, 54);\r
+            this.btnPause.TabIndex = 18;\r
+            this.btnPause.TabStop = false;\r
+            this.btnPause.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
+            this.btnPause.UseVisualStyleBackColor = false;\r
+            // \r
+            // PlayerControls\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.AutoSize = true;\r
+            this.Controls.Add(this.mainPanel);\r
+            this.Margin = new System.Windows.Forms.Padding(0);\r
+            this.Name = "PlayerControls";\r
+            this.Size = new System.Drawing.Size(835, 116);\r
+            this.mainPanel.ResumeLayout(false);\r
+            this.mainPanel.PerformLayout();\r
+            this.timecodePanel.ResumeLayout(false);\r
+            this.buttonsPanel.ResumeLayout(false);\r
+            this.buttonsPanel.PerformLayout();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private System.Windows.Forms.TableLayoutPanel mainPanel;\r
+        private System.Windows.Forms.TableLayoutPanel timecodePanel;\r
+        private System.Windows.Forms.Label lbStart;\r
+        private System.Windows.Forms.Label lbStatus;\r
+        private System.Windows.Forms.Label lbDuration;\r
+        private System.Windows.Forms.Label lbStartTC;\r
+        private System.Windows.Forms.Label lbEndTC;\r
+        private System.Windows.Forms.Label lbCurrentTC;\r
+        private MaestroShared.Controls.ColorSlider trackBar;\r
+        private System.Windows.Forms.FlowLayoutPanel buttonsPanel;\r
+        private MaestroShared.Controls.NoFocusCueButton btnPlay;\r
+        private MaestroShared.Controls.NoFocusCueButton btnStop;\r
+        private MaestroShared.Controls.NoFocusCueButton btnPause;\r
+    }\r
+}\r
diff --git a/client/DxPlay/Controls/PlayerControls.cs b/client/DxPlay/Controls/PlayerControls.cs
new file mode 100644 (file)
index 0000000..6fa4226
--- /dev/null
@@ -0,0 +1,22 @@
+using MaestroShared.Controls;\r
+using System.Windows.Forms;\r
+\r
+namespace DxPlay.Controls {\r
+    public partial class PlayerControls : UserControl {\r
+        public PlayerControls() {\r
+            InitializeComponent();\r
+        }\r
+\r
+        public Label Start { get => lbStart; }\r
+        public Label Status { get => lbStatus; }\r
+        public Label Duration { get => lbDuration; }\r
+        public Label StartTC { get => lbStartTC; }\r
+        public Label EndTC { get => lbEndTC; }\r
+        public Label CurrentTC { get => lbCurrentTC; }\r
+        public ColorSlider TrackBar { get => trackBar; }\r
+        public NoFocusCueButton Play { get => btnPlay; }\r
+        public NoFocusCueButton Stop { get => btnStop; }\r
+        public NoFocusCueButton Pause { get => btnPause; }\r
+\r
+    }\r
+}\r
diff --git a/client/DxPlay/Controls/PlayerControls.resx b/client/DxPlay/Controls/PlayerControls.resx
new file mode 100644 (file)
index 0000000..29dcb1b
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+</root>
\ No newline at end of file
index 00defee432bc093e10d7989e383bbc4c277ead55..730e8fa9419e2b598ba701ae16bd47123e0c8497 100644 (file)
     <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\r
     <IsWebBootstrapper>false</IsWebBootstrapper>\r
     <TargetFrameworkProfile />\r
+    <SccProjectName>SAK</SccProjectName>\r
+    <SccLocalPath>SAK</SccLocalPath>\r
+    <SccAuxPath>SAK</SccAuxPath>\r
+    <SccProvider>SAK</SccProvider>\r
     <PublishUrl>publish\</PublishUrl>\r
     <Install>true</Install>\r
     <InstallFrom>Disk</InstallFrom>\r
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r
     <UseApplicationTrust>false</UseApplicationTrust>\r
     <BootstrapperEnabled>true</BootstrapperEnabled>\r
-    <SccProjectName>SAK</SccProjectName>\r
-    <SccLocalPath>SAK</SccLocalPath>\r
-    <SccAuxPath>SAK</SccAuxPath>\r
-    <SccProvider>SAK</SccProvider>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <OutputPath>bin\Debug\</OutputPath>\r
       <SpecificVersion>False</SpecificVersion>\r
       <HintPath>lib\DirectShowLib.dll</HintPath>\r
     </Reference>\r
+    <Reference Include="LinkDotNet.MessageHandling, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+      <HintPath>..\packages\LinkDotNet.MessageBus.0.1.1\lib\LinkDotNet.MessageHandling.dll</HintPath>\r
+    </Reference>\r
+    <Reference Include="LinkDotNet.MessageHandling.Contracts, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
+      <HintPath>..\packages\LinkDotNet.MessageBus.Contracts.0.1.1\lib\LinkDotNet.MessageHandling.Contracts.dll</HintPath>\r
+    </Reference>\r
     <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">\r
       <HintPath>..\packages\NLog.4.4.12\lib\net45\NLog.dll</HintPath>\r
     </Reference>\r
     <Reference Include="System">\r
       <Name>System</Name>\r
     </Reference>\r
+    <Reference Include="System.ComponentModel.Composition" />\r
     <Reference Include="System.Data">\r
       <Name>System.Data</Name>\r
     </Reference>\r
     <Reference Include="System.Drawing">\r
       <Name>System.Drawing</Name>\r
     </Reference>\r
+    <Reference Include="System.IO.Compression.FileSystem" />\r
+    <Reference Include="System.Numerics" />\r
     <Reference Include="System.Windows.Forms">\r
       <Name>System.Windows.Forms</Name>\r
     </Reference>\r
     <Reference Include="System.Xml">\r
       <Name>System.XML</Name>\r
     </Reference>\r
+    <Reference Include="System.Xml.Linq" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <Compile Include="DxPlayer - Copy.cs" />\r
+    <Compile Include="Controls\BindableToolStripMenuItem .cs">\r
+      <SubType>Component</SubType>\r
+    </Compile>\r
+    <Compile Include="Controls\Player.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="Controls\Player.Designer.cs">\r
+      <DependentUpon>Player.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="Controls\PlayerControls.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="Controls\PlayerControls.Designer.cs">\r
+      <DependentUpon>PlayerControls.cs</DependentUpon>\r
+    </Compile>\r
+    <Compile Include="DxPlaySettings.cs" />\r
+    <Compile Include="DxPlayerx.cs" />\r
     <Compile Include="DxPlayer.cs" />\r
     <Compile Include="FilterGraphTools.cs" />\r
     <Compile Include="FlexibleMessageBox.cs" />\r
+    <Compile Include="Integration\Traffic.cs" />\r
     <Compile Include="InterceptKeys.cs" />\r
     <Compile Include="LAVInterfaces.cs" />\r
     <Compile Include="MediaDescription.cs" />\r
       <SubType>Component</SubType>\r
     </Compile>\r
     <Compile Include="Messages.cs" />\r
+    <Compile Include="Model\DxPlayModel.cs" />\r
     <Compile Include="NativeMethods.cs" />\r
     <Compile Include="PlayerGraph.cs" />\r
     <Compile Include="Program.cs" />\r
     </Compile>\r
     <Content Include="DirectShowLib.dll" />\r
     <Content Include="maestro.ico" />\r
+    <None Include="Configuration\dxplay.en">\r
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
+    </None>\r
+    <None Include="Configuration\dxplay.json">\r
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
+    </None>\r
     <None Include="Resources\ic_stop_black_24dp_2x.png" />\r
     <None Include="Resources\ic_play_arrow_black_24dp_2x.png" />\r
     <None Include="Resources\ic_pause_black_24dp_2x.png" />\r
     <None Include="Resources\ic_stop_black_24dp_1x.png" />\r
     <None Include="Resources\ic_play_arrow_black_24dp_1x.png" />\r
     <None Include="Resources\ic_pause_black_24dp_1x.png" />\r
+    <EmbeddedResource Include="Controls\PlayerControls.resx">\r
+      <DependentUpon>PlayerControls.cs</DependentUpon>\r
+    </EmbeddedResource>\r
     <EmbeddedResource Include="StringResource.resx">\r
       <Generator>ResXFileCodeGenerator</Generator>\r
       <LastGenOutput>StringResource.Designer.cs</LastGenOutput>\r
     </None>\r
     <EmbeddedResource Include="PlayerForm.resx">\r
       <DependentUpon>PlayerForm.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
     </EmbeddedResource>\r
     <None Include="readme.txt" />\r
   </ItemGroup>\r
       <Project>{bf494ee9-1e70-44e8-8942-dd726510a766}</Project>\r
       <Name>MXFFileParser</Name>\r
     </ProjectReference>\r
+    <ProjectReference Include="..\PlanAIRClient\TrafficClient.csproj">\r
+      <Project>{a7a21311-cb0e-465f-8ad6-829faf093f00}</Project>\r
+      <Name>TrafficClient</Name>\r
+    </ProjectReference>\r
   </ItemGroup>\r
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
   <PropertyGroup>\r
diff --git a/client/DxPlay/DxPlaySettings.cs b/client/DxPlay/DxPlaySettings.cs
new file mode 100644 (file)
index 0000000..c18c407
--- /dev/null
@@ -0,0 +1,13 @@
+using MaestroShared.Configuration;\r
+using MaestroShared.Metadata;\r
+using System.ComponentModel;\r
+\r
+namespace DxPlay {\r
+    public class DxPlaySettings : UISettings {\r
+        public Player Player { get; set; }\r
+        public MetadataProvider Metadata { get; set; }\r
+        public BindingList<MovieSegment> Segments { get; set; }\r
+        public bool IsStandalone { get; set; }\r
+        public bool IsMaximized { get; set; }\r
+    }\r
+}\r
index 061994fcfd948f02350e578ce1f0a386238ca518..f13bb1a83bf5ddd16ea3a495cb13c4525f66b4fa 100644 (file)
@@ -14,8 +14,18 @@ using System.Collections.Generic;
 using Myriadbits.MXF;\r
 using MaestroShared.Metadata;\r
 using NLog;\r
+using MaestroShared.Configuration;\r
 \r
 namespace DxPlay {\r
+    public delegate void DxPlayEvent();\r
+\r
+    public enum GraphState {\r
+        Stopped,\r
+        Completed,\r
+        Paused,\r
+        Playing,\r
+        Exiting\r
+    }\r
 \r
     internal class DxPlayer : ISampleGrabberCB, IDisposable {\r
         private static readonly Logger logger = LogManager.GetCurrentClassLogger();\r
@@ -24,45 +34,34 @@ namespace DxPlay {
         private static extern void CopyMemory(IntPtr Destination, IntPtr Source, [MarshalAs(UnmanagedType.U4)] uint Length);\r
 \r
         private const int MEDIATIME_REFERENCE = 10000000;\r
+        private bool isDisposed;\r
 \r
-        public enum GraphState {\r
-            Stopped,\r
-            Completed,\r
-            Paused,\r
-            Playing,\r
-            Exiting\r
-        }\r
 \r
-        public Dictionary<GraphState, string> stateHunStringValues = new Dictionary<GraphState, string>();\r
+        public Dictionary<GraphState, string> stringValues = new Dictionary<GraphState, string>();\r
         public MediaDescription MediaDescription { get; internal set; }\r
         public Timecode CurrentTC { get; internal set; }\r
         public GraphState State { get; internal set; }\r
         private ManualResetEvent m_mre;\r
         private BackgroundWorker tcWorker;\r
         public event DxPlayEvent PlayEvent;\r
-        public delegate void DxPlayEvent();\r
         private Thread m_eventThread = null;\r
         private object tcLock = new object();\r
         Bitmap m_Bitmap = null;\r
         public bool IsError { get; set; }\r
         private int m_stride;\r
 \r
-        public void Dispose() {\r
-            CloseInterfaces();\r
-        }\r
-\r
-        ~DxPlayer() {\r
-            CloseInterfaces();\r
-        }\r
 \r
         Control playerWindow;\r
-        private object ppUnk;\r
         private PlayerGraph graph;\r
 \r
         // Play an avi file into a window.  Allow for snapshots.\r
         // (Control to show video in, Avi file to play\r
-        public DxPlayer(Control hWin, ref MediaDescription mediaDesc) {\r
-            FillTheHunStringvalues();\r
+        public DxPlayer(Control hWin, ref MediaDescription mediaDesc, UISettings properties) {\r
+            stringValues.Add(GraphState.Exiting, properties.Resource("exiting", StringResource.KILEPES));\r
+            stringValues.Add(GraphState.Paused, properties.Resource("paused", StringResource.SZUNETELTETETT));\r
+            stringValues.Add(GraphState.Playing, properties.Resource("playing", StringResource.LEJATSZAS));\r
+            stringValues.Add(GraphState.Stopped, properties.Resource("stopped", StringResource.MEGALLITVA));\r
+            stringValues.Add(GraphState.Completed, properties.Resource("completed", StringResource.VEGE));\r
             State = GraphState.Stopped;\r
             try {\r
                 int hr;\r
@@ -70,7 +69,7 @@ namespace DxPlay {
                 MediaDescription = mediaDesc;\r
                 // Set up the graph\r
                 playerWindow = hWin;\r
-\r
+                playerWindow.Invalidate();\r
                 SetupGraph();\r
 \r
                 hWin.Hide();\r
@@ -78,7 +77,7 @@ namespace DxPlay {
 \r
                 // Get the event handle the graph will use to signal\r
                 // when events occur\r
-                Debug.WriteLine("GetEventHandle");\r
+                logger.Debug("GetEventHandle");\r
                 hr = graph.MediaEvent.GetEventHandle(out hEvent);\r
                 DsError.ThrowExceptionForHR(hr);\r
 \r
@@ -87,7 +86,6 @@ namespace DxPlay {
                 m_mre.SafeWaitHandle = new SafeWaitHandle(hEvent, true);\r
 \r
                 // Create a new thread to wait for events\r
-                Debug.WriteLine("m_eventThread.Start()");\r
                 m_eventThread = new Thread(new ThreadStart(EventWait));\r
                 m_eventThread.Name = "Media Event Thread";\r
                 m_eventThread.Start();\r
@@ -121,14 +119,13 @@ namespace DxPlay {
             SetTimeCodes();\r
             logger.Debug("ConfigureVideoWindow");\r
             ConfigureVideoWindow();\r
+            RenderFirstFrame();\r
         }\r
 \r
-        private void FillTheHunStringvalues() {\r
-            stateHunStringValues.Add(GraphState.Exiting, StringResource.KILEPES);\r
-            stateHunStringValues.Add(GraphState.Paused, StringResource.SZUNETELTETETT);\r
-            stateHunStringValues.Add(GraphState.Playing, StringResource.LEJATSZAS);\r
-            stateHunStringValues.Add(GraphState.Stopped, StringResource.MEGALLITVA);\r
-            stateHunStringValues.Add(GraphState.Completed, StringResource.VEGE);\r
+        private void RenderFirstFrame() {\r
+            graph.MediaControl.Run();\r
+            graph.MediaSeeking.SetPositions(1, AMSeekingSeekingFlags.AbsolutePositioning, null, AMSeekingSeekingFlags.NoPositioning);\r
+            graph.MediaControl.Pause();\r
         }\r
 \r
         private void TcWorker_DoWork(object sender, DoWorkEventArgs e) {\r
@@ -166,14 +163,17 @@ namespace DxPlay {
 \r
         // Pause the capture graph.\r
         public void Stop() {\r
-            // Can only Stop when playing or paused\r
-            if (State == GraphState.Playing || State == GraphState.Paused || State == GraphState.Completed) {\r
-                int hr = graph.MediaControl.Stop();\r
-                DsError.ThrowExceptionForHR(hr);\r
-                State = GraphState.Stopped;\r
-            }\r
+            //// Can only Stop when playing or paused\r
+            //if (State == GraphState.Playing || State == GraphState.Paused || State == GraphState.Completed) {\r
+            //    int hr = graph.MediaControl.Stop();\r
+            //    DsError.ThrowExceptionForHR(hr);\r
+            //    State = GraphState.Stopped;\r
+            //}\r
+            //Rewind();\r
+            //PlayEvent?.Invoke();\r
+\r
+            Pause();\r
             Rewind();\r
-            PlayEvent?.Invoke();\r
         }\r
 \r
         // Reset the clip back to the beginning\r
@@ -204,7 +204,7 @@ namespace DxPlay {
                 corrected = true;\r
             }\r
 \r
-            Debug.WriteLine("Seeking requested frame {0} got frame {1}, media position {2}, frame length {3}, corrected {4}", value, reachedFrames, requestedPosition, avgTimePerFrame, corrected);\r
+            logger.Debug("Seeking requested frame {0} got frame {1}, media position {2}, frame length {3}, corrected {4}", value, reachedFrames, requestedPosition, avgTimePerFrame, corrected);\r
         }\r
 \r
         private void UpdateTC() {\r
@@ -216,7 +216,7 @@ namespace DxPlay {
             int frames = ReferenceTimeToFrames(currentPosition);\r
             if (CurrentTC.ZeroBasedFrames != frames) {\r
                 CurrentTC.Set(frames);\r
-                //Debug.WriteLine("Current frame is {0} ({1}), media position is {2}, AVG frame time is {3}", frames, CurrentTC.ToString(), currentPosition, AvgTimePerFrame);\r
+                //logger.Debug("Current frame is {0} ({1}), media position is {2}, AVG frame time is {3}", frames, CurrentTC.ToString(), currentPosition, AvgTimePerFrame);\r
             }\r
             PlayEvent?.Invoke();\r
 \r
@@ -346,12 +346,14 @@ namespace DxPlay {
         }\r
 \r
         // Shut down capture\r
-        private void CloseInterfaces() {\r
-            Debug.WriteLine("CloseInterfaces");\r
-            GC.SuppressFinalize(this);\r
-            if (tcWorker != null)\r
-                tcWorker.CancelAsync();\r
+        public void Dispose() {\r
             lock (this) {\r
+                if (isDisposed)\r
+                    return;\r
+                logger.Debug("Dispose");\r
+                GC.SuppressFinalize(this);\r
+                if (tcWorker != null)\r
+                    tcWorker.CancelAsync();\r
                 if (State != GraphState.Exiting) {\r
                     State = GraphState.Exiting;\r
 \r
@@ -361,10 +363,13 @@ namespace DxPlay {
                     }\r
                 }\r
 \r
-                if (graph != null)\r
+                if (graph != null) {\r
                     graph.Dispose();\r
+                    graph = null;\r
+                }\r
             }\r
             GC.Collect();\r
+            isDisposed = true;\r
             //if (m_eventThread != null)\r
             //    m_eventThread.Join();\r
         }\r
@@ -377,7 +382,7 @@ namespace DxPlay {
         public int BufferCB(double SampleTime, IntPtr pBuffer, int BufferLen) {\r
             return 0;\r
             int frames = (int)Math.Abs(SampleTime * MediaDescription.FrameRate);\r
-            //Debug.WriteLine("BufferCB frames {0}, sample time {1}", frames, SampleTime);\r
+            //logger.Debug("BufferCB frames {0}, sample time {1}", frames, SampleTime);\r
             Font font = new Font("Tahoma", 30);\r
             string display = frames.ToString();\r
             SizeF size = new SizeF(100, 100);\r
@@ -443,7 +448,7 @@ namespace DxPlay {
                             hr = graph.MediaEvent.GetEvent(out ec, out p1, out p2, 0)\r
                             ) {\r
                             // Write the event name to the debug window\r
-                            Debug.WriteLine(ec.ToString());\r
+                            logger.Debug("EVENT:" + ec.ToString());\r
 \r
                             // If the clip is finished playing\r
                             if (ec == EventCode.Complete) {\r
@@ -466,7 +471,7 @@ namespace DxPlay {
                         }\r
                     } else {\r
                         // We are shutting down\r
-                        Debug.WriteLine("Shutdown");\r
+                        logger.Debug("Shutdown");\r
                         break;\r
                     }\r
                 }\r
diff --git a/client/DxPlay/Integration/Traffic.cs b/client/DxPlay/Integration/Traffic.cs
new file mode 100644 (file)
index 0000000..f3e65ec
--- /dev/null
@@ -0,0 +1,62 @@
+\r
+using LinkDotNet.MessageHandling.Contracts;\r
+using TrafficClient;\r
+using LinkDotNet.MessageHandling;\r
+using MaestroShared.Configuration;\r
+using System;\r
+using System.Linq;\r
+using MaestroShared.Metadata;\r
+using System.Collections.Generic;\r
+using NLog;\r
+\r
+namespace DxPlay.Integration {\r
+    public class Traffic {\r
+        private static readonly Logger logger = LogManager.GetCurrentClassLogger();\r
+        private IMessageBus messageBus = new MessageBus();\r
+        private readonly DxPlaySettings settings;\r
+        private readonly string id;\r
+        private readonly Connection connection;\r
+        public TrafficAPI Api { get; private set; }\r
+\r
+        public Traffic(DxPlaySettings settings, string id) {\r
+            messageBus.Subscribe<TrafficAPIMessage>(OnMessage);\r
+            connection = settings?.Metadata?.Server;\r
+            if (connection == null)\r
+                throw new Exception(settings.Resource("missing-traffic-configuration", StringResource.MISSING_TRAFFIC_CONFIGURATION));\r
+            Api = new TrafficAPI(connection.Address.OriginalString, connection.UserName, connection.Password, connection.Timeout, messageBus);\r
+            this.settings = settings;\r
+            this.id = id;\r
+        }\r
+\r
+        private void OnMessage(IMessage message) {\r
+            string msg = string.Format(settings.Resource("error-traffic-connect", StringResource.ERROR_TRAFFIC_CONNECT), connection.Address.OriginalString);\r
+            throw new Exception(msg);\r
+            //MessageBox.Show(msg, "Connection error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+        }\r
+\r
+        public List<MovieSegment> LoadSegments() {\r
+            var metadataType = MetadataTypeUtil.Guess(id);\r
+            List<MovieSegment> result = null;\r
+\r
+            switch (metadataType) {\r
+                case MetadataType.TrafficMaterial: {\r
+                        var trafficItem = Api.GetMaterials(id, false).FirstOrDefault();\r
+                        if (trafficItem == null)\r
+                            throw new Exception(string.Format(settings.Resource("missing-traffic-variant", StringResource.MISSING_TRAFFIC_VARIANT), id));\r
+                        result = Api.GetMaterialSegments(trafficItem.VariantID);\r
+                        break;\r
+                    }\r
+                case MetadataType.TrafficPromo: {\r
+                        result = Api.GetPromoSegments(id);\r
+                        break;\r
+                    }\r
+                case MetadataType.TrafficAD: {\r
+                        result = Api.GetADSegments(id);\r
+                        break;\r
+                    }\r
+            }\r
+            return result;\r
+        }\r
+\r
+    }\r
+}\r
diff --git a/client/DxPlay/Model/DxPlayModel.cs b/client/DxPlay/Model/DxPlayModel.cs
new file mode 100644 (file)
index 0000000..57fa05d
--- /dev/null
@@ -0,0 +1,79 @@
+using DxPlay.Integration;\r
+using MaestroShared.Metadata;\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Runtime.CompilerServices;\r
+\r
+namespace DxPlay.Model {\r
+    public class DxPlayModel {\r
+        public event PropertyChangedEventHandler PropertyChanged;\r
+        private readonly DxPlaySettings settings;\r
+        private Traffic traffic;\r
+\r
+        public DxPlayModel(DxPlaySettings settings) {\r
+            this.settings = settings;\r
+            IsSegmentEditorEnabled = true.Equals(settings?.Player?.SegmentEditor);\r
+            IsMenuVisible = true.Equals(settings?.IsStandalone);\r
+            Segments = settings.Segments ?? new BindingList<MovieSegment>();\r
+        }\r
+\r
+        private void Notify([CallerMemberName] String propertyName = "") {\r
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\r
+        }\r
+\r
+        private bool isSegmentEditorEnabled;\r
+        public bool IsSegmentEditorEnabled {\r
+            get {\r
+                return isSegmentEditorEnabled;\r
+            }\r
+            set {\r
+                if (value != isSegmentEditorEnabled) {\r
+                    isSegmentEditorEnabled = value;\r
+                    Notify();\r
+                }\r
+            }\r
+        }\r
+\r
+        private bool isMenuVisible;\r
+        public bool IsMenuVisible {\r
+            get {\r
+                return isMenuVisible;\r
+            }\r
+            set {\r
+                if (value != isMenuVisible) {\r
+                    isMenuVisible = value;\r
+                    Notify();\r
+                }\r
+            }\r
+        }\r
+\r
+        private bool isApproveEnabled;\r
+        public bool IsApproveEnabled {\r
+            get {\r
+                return isApproveEnabled;\r
+            }\r
+            set {\r
+                if (value != isApproveEnabled) {\r
+                    isApproveEnabled = value;\r
+                    Notify();\r
+                }\r
+            }\r
+        }\r
+\r
+        public BindingList<MovieSegment> Segments { get; private set; }\r
+\r
+        internal void InitializeSegments(string id) {\r
+            Segments.Clear();\r
+            try {\r
+                traffic = new Traffic(settings, id);\r
+                List<MovieSegment> segments = traffic.LoadSegments();\r
+                if (segments != null)\r
+                    segments.ForEach(s => Segments.Add(s));\r
+            } catch (Exception) {\r
+                IsSegmentEditorEnabled = false;\r
+                throw;\r
+            }\r
+        }\r
+    }\r
+}\r
index 355089a5274e02d79748e4524ad0e3849410c128..9e1cefff40ac63676041c79df7b1607026da1b21 100644 (file)
@@ -5,15 +5,6 @@ using System.Windows.Forms;
 namespace DxPlay {\r
     partial class PlayerForm : Form {\r
         private Panel pVideo;\r
-        private NoFocusCueButton btnPlay;\r
-        private NoFocusCueButton btnPause;\r
-        private TextBox lbCurrentTC;\r
-        private NoFocusCueButton btnStop;\r
-        private TextBox lbStartTC;\r
-        private TextBox lbEndTC;\r
-        private Panel panel3;\r
-        private Label lbDuration;\r
-        private Label lbStart;\r
 \r
         /// <summary>\r
         /// Clean up any resources being used.\r
@@ -41,22 +32,6 @@ namespace DxPlay {
             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlayerForm));\r
             this.pVideo = new System.Windows.Forms.Panel();\r
-            this.lbCurrentTC = new System.Windows.Forms.TextBox();\r
-            this.lbStartTC = new System.Windows.Forms.TextBox();\r
-            this.lbEndTC = new System.Windows.Forms.TextBox();\r
-            this.panel3 = new System.Windows.Forms.Panel();\r
-            this.lbStatus = new System.Windows.Forms.Label();\r
-            this.trackBar1 = new MaestroShared.Controls.ColorSlider();\r
-            this.lbDuration = new System.Windows.Forms.Label();\r
-            this.lbStart = new System.Windows.Forms.Label();\r
-            this.splitContainer1 = new System.Windows.Forms.SplitContainer();\r
-            this.panelPlayer = new System.Windows.Forms.Panel();\r
-            this.pControls = new System.Windows.Forms.FlowLayoutPanel();\r
-            this.btnPlay = new MaestroShared.Controls.NoFocusCueButton();\r
-            this.btnStop = new MaestroShared.Controls.NoFocusCueButton();\r
-            this.btnPause = new MaestroShared.Controls.NoFocusCueButton();\r
-            this.dgSegments = new System.Windows.Forms.DataGridView();\r
-            this.bsSegments = new System.Windows.Forms.BindingSource(this.components);\r
             this.menuButtonSegmentActions = new DxPlay.MenuButton();\r
             this.ctxmSegmentActions = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             this.defineOneSegmentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
@@ -64,282 +39,70 @@ namespace DxPlay {
             this.deleteSegmentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.actualPositionToIntroToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.actualPositionToOutroToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
-            this.panel3.SuspendLayout();\r
-            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();\r
-            this.splitContainer1.Panel1.SuspendLayout();\r
-            this.splitContainer1.Panel2.SuspendLayout();\r
-            this.splitContainer1.SuspendLayout();\r
+            this.mainSplit = new System.Windows.Forms.SplitContainer();\r
+            this.panelPlayer = new System.Windows.Forms.Panel();\r
+            this.marginPanel = new System.Windows.Forms.Panel();\r
+            this.tabEditor = new System.Windows.Forms.TabControl();\r
+            this.tpMetadata = new System.Windows.Forms.TabPage();\r
+            this.trafficBrowser = new TrafficClient.TrafficIDSelector();\r
+            this.tpSegments = new System.Windows.Forms.TabPage();\r
+            this.dgSegments = new System.Windows.Forms.DataGridView();\r
+            this.bsSegments = new System.Windows.Forms.BindingSource(this.components);\r
+            this.segmentActions = new System.Windows.Forms.ToolStrip();\r
+            this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();\r
+            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\r
+            this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();\r
+            this.imagesTabEdit = new System.Windows.Forms.ImageList(this.components);\r
+            this.mainMenu = new System.Windows.Forms.MenuStrip();\r
+            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
+            this.menuOpenFile = new DxPlay.Controls.BindableToolStripMenuItem();\r
+            this.menuApprove = new DxPlay.Controls.BindableToolStripMenuItem();\r
+            this.playerControls = new DxPlay.Controls.PlayerControls();\r
+            this.pVideo.SuspendLayout();\r
+            this.ctxmSegmentActions.SuspendLayout();\r
+            ((System.ComponentModel.ISupportInitialize)(this.mainSplit)).BeginInit();\r
+            this.mainSplit.Panel1.SuspendLayout();\r
+            this.mainSplit.Panel2.SuspendLayout();\r
+            this.mainSplit.SuspendLayout();\r
             this.panelPlayer.SuspendLayout();\r
-            this.pControls.SuspendLayout();\r
+            this.marginPanel.SuspendLayout();\r
+            this.tabEditor.SuspendLayout();\r
+            this.tpMetadata.SuspendLayout();\r
+            this.tpSegments.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.dgSegments)).BeginInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.bsSegments)).BeginInit();\r
-            this.ctxmSegmentActions.SuspendLayout();\r
+            this.segmentActions.SuspendLayout();\r
+            this.mainMenu.SuspendLayout();\r
             this.SuspendLayout();\r
             // \r
             // pVideo\r
             // \r
             this.pVideo.BackColor = System.Drawing.Color.Black;\r
+            this.pVideo.Controls.Add(this.menuButtonSegmentActions);\r
             this.pVideo.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.pVideo.Location = new System.Drawing.Point(0, 0);\r
             this.pVideo.Name = "pVideo";\r
-            this.pVideo.Size = new System.Drawing.Size(675, 433);\r
+            this.pVideo.Size = new System.Drawing.Size(689, 489);\r
             this.pVideo.TabIndex = 10;\r
             this.pVideo.TabStop = true;\r
             this.pVideo.SizeChanged += new System.EventHandler(this.panel1_SizeChanged);\r
             this.pVideo.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);\r
             // \r
-            // lbCurrentTC\r
-            // \r
-            this.lbCurrentTC.Anchor = System.Windows.Forms.AnchorStyles.Bottom;\r
-            this.lbCurrentTC.BackColor = System.Drawing.Color.White;\r
-            this.lbCurrentTC.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.lbCurrentTC.Font = new System.Drawing.Font("Calibri", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.lbCurrentTC.Location = new System.Drawing.Point(284, 12);\r
-            this.lbCurrentTC.Name = "lbCurrentTC";\r
-            this.lbCurrentTC.ReadOnly = true;\r
-            this.lbCurrentTC.Size = new System.Drawing.Size(108, 27);\r
-            this.lbCurrentTC.TabIndex = 15;\r
-            this.lbCurrentTC.TabStop = false;\r
-            this.lbCurrentTC.Text = "00:00:00.00";\r
-            // \r
-            // lbStartTC\r
-            // \r
-            this.lbStartTC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));\r
-            this.lbStartTC.BackColor = System.Drawing.Color.White;\r
-            this.lbStartTC.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.lbStartTC.Font = new System.Drawing.Font("Calibri", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.lbStartTC.ForeColor = System.Drawing.SystemColors.WindowText;\r
-            this.lbStartTC.Location = new System.Drawing.Point(6, 21);\r
-            this.lbStartTC.Name = "lbStartTC";\r
-            this.lbStartTC.ReadOnly = true;\r
-            this.lbStartTC.Size = new System.Drawing.Size(66, 17);\r
-            this.lbStartTC.TabIndex = 16;\r
-            this.lbStartTC.TabStop = false;\r
-            this.lbStartTC.Text = "00:00:00.00";\r
-            // \r
-            // lbEndTC\r
-            // \r
-            this.lbEndTC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\r
-            this.lbEndTC.BackColor = System.Drawing.Color.White;\r
-            this.lbEndTC.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.lbEndTC.Font = new System.Drawing.Font("Calibri", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.lbEndTC.ForeColor = System.Drawing.SystemColors.WindowText;\r
-            this.lbEndTC.Location = new System.Drawing.Point(605, 24);\r
-            this.lbEndTC.Name = "lbEndTC";\r
-            this.lbEndTC.ReadOnly = true;\r
-            this.lbEndTC.Size = new System.Drawing.Size(65, 17);\r
-            this.lbEndTC.TabIndex = 17;\r
-            this.lbEndTC.TabStop = false;\r
-            this.lbEndTC.Text = "00:00:00.00";\r
-            this.lbEndTC.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;\r
-            // \r
-            // panel3\r
-            // \r
-            this.panel3.Controls.Add(this.lbStatus);\r
-            this.panel3.Controls.Add(this.trackBar1);\r
-            this.panel3.Controls.Add(this.lbDuration);\r
-            this.panel3.Controls.Add(this.lbStart);\r
-            this.panel3.Controls.Add(this.lbStartTC);\r
-            this.panel3.Controls.Add(this.lbEndTC);\r
-            this.panel3.Controls.Add(this.lbCurrentTC);\r
-            this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;\r
-            this.panel3.Location = new System.Drawing.Point(0, 433);\r
-            this.panel3.Name = "panel3";\r
-            this.panel3.Size = new System.Drawing.Size(675, 51);\r
-            this.panel3.TabIndex = 19;\r
-            // \r
-            // lbStatus\r
-            // \r
-            this.lbStatus.Anchor = System.Windows.Forms.AnchorStyles.Bottom;\r
-            this.lbStatus.Font = new System.Drawing.Font("Calibri", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.lbStatus.Location = new System.Drawing.Point(281, 4);\r
-            this.lbStatus.Name = "lbStatus";\r
-            this.lbStatus.Size = new System.Drawing.Size(111, 13);\r
-            this.lbStatus.TabIndex = 20;\r
-            this.lbStatus.Text = "NO INPUT";\r
-            this.lbStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\r
-            // \r
-            // trackBar1\r
-            // \r
-            this.trackBar1.BackColor = System.Drawing.Color.Transparent;\r
-            this.trackBar1.BarInnerColor = System.Drawing.Color.Transparent;\r
-            this.trackBar1.BarOuterColor = System.Drawing.Color.Black;\r
-            this.trackBar1.BarPenColor = System.Drawing.Color.Black;\r
-            this.trackBar1.BorderRoundRectSize = new System.Drawing.Size(8, 8);\r
-            this.trackBar1.Cursor = System.Windows.Forms.Cursors.Hand;\r
-            this.trackBar1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
-            this.trackBar1.ElapsedInnerColor = System.Drawing.Color.Black;\r
-            this.trackBar1.ElapsedOuterColor = System.Drawing.Color.DarkGray;\r
-            this.trackBar1.LargeChange = ((uint)(0u));\r
-            this.trackBar1.Location = new System.Drawing.Point(0, 41);\r
-            this.trackBar1.Maximum = 1;\r
-            this.trackBar1.Name = "trackBar1";\r
-            this.trackBar1.Size = new System.Drawing.Size(675, 10);\r
-            this.trackBar1.SmallChange = ((uint)(1u));\r
-            this.trackBar1.TabIndex = 18;\r
-            this.trackBar1.Text = "colorSlider1";\r
-            this.trackBar1.ThumbInnerColor = System.Drawing.Color.Black;\r
-            this.trackBar1.ThumbOuterColor = System.Drawing.Color.Silver;\r
-            this.trackBar1.ThumbPenColor = System.Drawing.Color.Black;\r
-            this.trackBar1.ThumbRoundRectSize = new System.Drawing.Size(8, 8);\r
-            this.trackBar1.ThumbSize = 10;\r
-            this.trackBar1.Value = 0;\r
-            this.trackBar1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.trackBar1_MouseDown);\r
-            this.trackBar1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.trackBar1_MouseUp);\r
-            // \r
-            // lbDuration\r
-            // \r
-            this.lbDuration.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\r
-            this.lbDuration.Font = new System.Drawing.Font("Calibri", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.lbDuration.Location = new System.Drawing.Point(605, 5);\r
-            this.lbDuration.Name = "lbDuration";\r
-            this.lbDuration.Size = new System.Drawing.Size(68, 13);\r
-            this.lbDuration.TabIndex = 19;\r
-            this.lbDuration.Text = "DURATION";\r
-            this.lbDuration.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
-            // \r
-            // lbStart\r
-            // \r
-            this.lbStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));\r
-            this.lbStart.Font = new System.Drawing.Font("Calibri", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.lbStart.Location = new System.Drawing.Point(3, 5);\r
-            this.lbStart.Name = "lbStart";\r
-            this.lbStart.Size = new System.Drawing.Size(69, 13);\r
-            this.lbStart.TabIndex = 18;\r
-            this.lbStart.Text = "START";\r
-            this.lbStart.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
-            // \r
-            // splitContainer1\r
-            // \r
-            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.splitContainer1.Location = new System.Drawing.Point(0, 0);\r
-            this.splitContainer1.Name = "splitContainer1";\r
-            // \r
-            // splitContainer1.Panel1\r
-            // \r
-            this.splitContainer1.Panel1.Controls.Add(this.panelPlayer);\r
-            // \r
-            // splitContainer1.Panel2\r
-            // \r
-            this.splitContainer1.Panel2.Controls.Add(this.dgSegments);\r
-            this.splitContainer1.Panel2.Controls.Add(this.menuButtonSegmentActions);\r
-            this.splitContainer1.Size = new System.Drawing.Size(936, 544);\r
-            this.splitContainer1.SplitterDistance = 675;\r
-            this.splitContainer1.TabIndex = 20;\r
-            // \r
-            // panelPlayer\r
-            // \r
-            this.panelPlayer.Controls.Add(this.pVideo);\r
-            this.panelPlayer.Controls.Add(this.panel3);\r
-            this.panelPlayer.Controls.Add(this.pControls);\r
-            this.panelPlayer.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.panelPlayer.Location = new System.Drawing.Point(0, 0);\r
-            this.panelPlayer.Name = "panelPlayer";\r
-            this.panelPlayer.Size = new System.Drawing.Size(675, 544);\r
-            this.panelPlayer.TabIndex = 0;\r
-            // \r
-            // pControls\r
-            // \r
-            this.pControls.AutoSize = true;\r
-            this.pControls.Controls.Add(this.btnPlay);\r
-            this.pControls.Controls.Add(this.btnStop);\r
-            this.pControls.Controls.Add(this.btnPause);\r
-            this.pControls.Dock = System.Windows.Forms.DockStyle.Bottom;\r
-            this.pControls.Location = new System.Drawing.Point(0, 484);\r
-            this.pControls.Name = "pControls";\r
-            this.pControls.Size = new System.Drawing.Size(675, 60);\r
-            this.pControls.TabIndex = 20;\r
-            // \r
-            // btnPlay\r
-            // \r
-            this.btnPlay.AutoSize = true;\r
-            this.btnPlay.BackColor = System.Drawing.Color.Transparent;\r
-            this.btnPlay.FlatAppearance.BorderSize = 0;\r
-            this.btnPlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btnPlay.Image = global::DxPlay.Properties.Resources.ic_play_arrow_black_24dp_2x;\r
-            this.btnPlay.Location = new System.Drawing.Point(3, 3);\r
-            this.btnPlay.Name = "btnPlay";\r
-            this.btnPlay.Size = new System.Drawing.Size(54, 54);\r
-            this.btnPlay.TabIndex = 1;\r
-            this.btnPlay.TabStop = false;\r
-            this.btnPlay.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
-            this.btnPlay.UseVisualStyleBackColor = false;\r
-            this.btnPlay.Click += new System.EventHandler(this.btnPlay_Click);\r
-            // \r
-            // btnStop\r
-            // \r
-            this.btnStop.AutoSize = true;\r
-            this.btnStop.BackColor = System.Drawing.Color.Transparent;\r
-            this.btnStop.FlatAppearance.BorderSize = 0;\r
-            this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btnStop.Image = global::DxPlay.Properties.Resources.ic_stop_black_24dp_2x;\r
-            this.btnStop.Location = new System.Drawing.Point(63, 3);\r
-            this.btnStop.Name = "btnStop";\r
-            this.btnStop.Size = new System.Drawing.Size(54, 54);\r
-            this.btnStop.TabIndex = 16;\r
-            this.btnStop.TabStop = false;\r
-            this.btnStop.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
-            this.btnStop.UseVisualStyleBackColor = false;\r
-            this.btnStop.Click += new System.EventHandler(this.btnStop_Click);\r
-            // \r
-            // btnPause\r
-            // \r
-            this.btnPause.AutoSize = true;\r
-            this.btnPause.BackColor = System.Drawing.Color.Transparent;\r
-            this.btnPause.FlatAppearance.BorderSize = 0;\r
-            this.btnPause.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.btnPause.Image = global::DxPlay.Properties.Resources.ic_pause_black_24dp_2x;\r
-            this.btnPause.Location = new System.Drawing.Point(123, 3);\r
-            this.btnPause.Name = "btnPause";\r
-            this.btnPause.Size = new System.Drawing.Size(54, 54);\r
-            this.btnPause.TabIndex = 11;\r
-            this.btnPause.TabStop = false;\r
-            this.btnPause.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
-            this.btnPause.UseVisualStyleBackColor = false;\r
-            this.btnPause.Click += new System.EventHandler(this.btnPause_Click);\r
-            // \r
-            // dgSegments\r
-            // \r
-            this.dgSegments.AllowUserToAddRows = false;\r
-            this.dgSegments.AllowUserToOrderColumns = true;\r
-            this.dgSegments.AllowUserToResizeRows = false;\r
-            this.dgSegments.AutoGenerateColumns = false;\r
-            this.dgSegments.BackgroundColor = System.Drawing.Color.White;\r
-            this.dgSegments.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
-            this.dgSegments.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
-            this.dgSegments.DataSource = this.bsSegments;\r
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;\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.Color.Black;\r
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black;\r
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
-            this.dgSegments.DefaultCellStyle = dataGridViewCellStyle1;\r
-            this.dgSegments.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.dgSegments.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;\r
-            this.dgSegments.Location = new System.Drawing.Point(0, 23);\r
-            this.dgSegments.MultiSelect = false;\r
-            this.dgSegments.Name = "dgSegments";\r
-            this.dgSegments.RowHeadersVisible = false;\r
-            this.dgSegments.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
-            this.dgSegments.Size = new System.Drawing.Size(257, 521);\r
-            this.dgSegments.TabIndex = 1;\r
-            this.dgSegments.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgSegments_CellContentClick);\r
-            this.dgSegments.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgSegments_CellMouseDoubleClick);\r
-            this.dgSegments.ColumnAdded += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgSegments_ColumnAdded);\r
-            // \r
             // menuButtonSegmentActions\r
             // \r
             this.menuButtonSegmentActions.BackColor = System.Drawing.Color.White;\r
-            this.menuButtonSegmentActions.Dock = System.Windows.Forms.DockStyle.Top;\r
-            this.menuButtonSegmentActions.Location = new System.Drawing.Point(0, 0);\r
+            this.menuButtonSegmentActions.Location = new System.Drawing.Point(389, 462);\r
             this.menuButtonSegmentActions.Menu = this.ctxmSegmentActions;\r
             this.menuButtonSegmentActions.Name = "menuButtonSegmentActions";\r
-            this.menuButtonSegmentActions.Size = new System.Drawing.Size(257, 23);\r
+            this.menuButtonSegmentActions.Size = new System.Drawing.Size(297, 23);\r
             this.menuButtonSegmentActions.TabIndex = 0;\r
             this.menuButtonSegmentActions.Text = "Segment actions";\r
             this.menuButtonSegmentActions.UseVisualStyleBackColor = false;\r
+            this.menuButtonSegmentActions.Visible = false;\r
             // \r
             // ctxmSegmentActions\r
             // \r
@@ -387,13 +150,269 @@ namespace DxPlay {
             this.actualPositionToOutroToolStripMenuItem.Text = "Actual position to TCOut";\r
             this.actualPositionToOutroToolStripMenuItem.Click += new System.EventHandler(this.OnActualPositionToTCOutToolStripMenuItem1Click);\r
             // \r
+            // mainSplit\r
+            // \r
+            this.mainSplit.BackColor = System.Drawing.Color.DimGray;\r
+            this.mainSplit.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.mainSplit.Location = new System.Drawing.Point(0, 24);\r
+            this.mainSplit.Name = "mainSplit";\r
+            // \r
+            // mainSplit.Panel1\r
+            // \r
+            this.mainSplit.Panel1.Controls.Add(this.panelPlayer);\r
+            // \r
+            // mainSplit.Panel2\r
+            // \r
+            this.mainSplit.Panel2.Controls.Add(this.marginPanel);\r
+            this.mainSplit.Size = new System.Drawing.Size(990, 489);\r
+            this.mainSplit.SplitterDistance = 689;\r
+            this.mainSplit.TabIndex = 20;\r
+            // \r
+            // panelPlayer\r
+            // \r
+            this.panelPlayer.Controls.Add(this.pVideo);\r
+            this.panelPlayer.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.panelPlayer.Location = new System.Drawing.Point(0, 0);\r
+            this.panelPlayer.Name = "panelPlayer";\r
+            this.panelPlayer.Size = new System.Drawing.Size(689, 489);\r
+            this.panelPlayer.TabIndex = 0;\r
+            // \r
+            // marginPanel\r
+            // \r
+            this.marginPanel.BackColor = System.Drawing.SystemColors.ControlDark;\r
+            this.marginPanel.Controls.Add(this.tabEditor);\r
+            this.marginPanel.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.marginPanel.Location = new System.Drawing.Point(0, 0);\r
+            this.marginPanel.Name = "marginPanel";\r
+            this.marginPanel.Padding = new System.Windows.Forms.Padding(4);\r
+            this.marginPanel.Size = new System.Drawing.Size(297, 489);\r
+            this.marginPanel.TabIndex = 3;\r
+            // \r
+            // tabEditor\r
+            // \r
+            this.tabEditor.Alignment = System.Windows.Forms.TabAlignment.Bottom;\r
+            this.tabEditor.Controls.Add(this.tpMetadata);\r
+            this.tabEditor.Controls.Add(this.tpSegments);\r
+            this.tabEditor.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.tabEditor.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.tabEditor.ImageList = this.imagesTabEdit;\r
+            this.tabEditor.Location = new System.Drawing.Point(4, 4);\r
+            this.tabEditor.Multiline = true;\r
+            this.tabEditor.Name = "tabEditor";\r
+            this.tabEditor.Padding = new System.Drawing.Point(10, 5);\r
+            this.tabEditor.SelectedIndex = 0;\r
+            this.tabEditor.Size = new System.Drawing.Size(289, 481);\r
+            this.tabEditor.TabIndex = 2;\r
+            // \r
+            // tpMetadata\r
+            // \r
+            this.tpMetadata.BackColor = System.Drawing.Color.Transparent;\r
+            this.tpMetadata.Controls.Add(this.trafficBrowser);\r
+            this.tpMetadata.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.tpMetadata.ImageIndex = 0;\r
+            this.tpMetadata.Location = new System.Drawing.Point(4, 4);\r
+            this.tpMetadata.Name = "tpMetadata";\r
+            this.tpMetadata.Padding = new System.Windows.Forms.Padding(3);\r
+            this.tpMetadata.Size = new System.Drawing.Size(281, 442);\r
+            this.tpMetadata.TabIndex = 0;\r
+            this.tpMetadata.Text = "Metadata";\r
+            // \r
+            // trafficBrowser\r
+            // \r
+            this.trafficBrowser.BackColor = System.Drawing.Color.White;\r
+            this.trafficBrowser.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.trafficBrowser.IDChangedEvent = null;\r
+            this.trafficBrowser.Location = new System.Drawing.Point(3, 3);\r
+            this.trafficBrowser.Margin = new System.Windows.Forms.Padding(0);\r
+            this.trafficBrowser.Name = "trafficBrowser";\r
+            this.trafficBrowser.Size = new System.Drawing.Size(275, 436);\r
+            this.trafficBrowser.TabIndex = 0;\r
+            // \r
+            // tpSegments\r
+            // \r
+            this.tpSegments.Controls.Add(this.dgSegments);\r
+            this.tpSegments.Controls.Add(this.segmentActions);\r
+            this.tpSegments.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            this.tpSegments.ImageIndex = 1;\r
+            this.tpSegments.Location = new System.Drawing.Point(4, 4);\r
+            this.tpSegments.Name = "tpSegments";\r
+            this.tpSegments.Padding = new System.Windows.Forms.Padding(3);\r
+            this.tpSegments.Size = new System.Drawing.Size(281, 442);\r
+            this.tpSegments.TabIndex = 1;\r
+            this.tpSegments.Text = "Segments";\r
+            this.tpSegments.UseVisualStyleBackColor = true;\r
+            // \r
+            // dgSegments\r
+            // \r
+            this.dgSegments.AllowUserToAddRows = false;\r
+            this.dgSegments.AllowUserToOrderColumns = true;\r
+            this.dgSegments.AllowUserToResizeRows = false;\r
+            this.dgSegments.AutoGenerateColumns = false;\r
+            this.dgSegments.BackgroundColor = System.Drawing.Color.White;\r
+            this.dgSegments.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+            this.dgSegments.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
+            this.dgSegments.DataSource = this.bsSegments;\r
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;\r
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
+            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;\r
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black;\r
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+            this.dgSegments.DefaultCellStyle = dataGridViewCellStyle1;\r
+            this.dgSegments.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.dgSegments.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;\r
+            this.dgSegments.Location = new System.Drawing.Point(3, 28);\r
+            this.dgSegments.MultiSelect = false;\r
+            this.dgSegments.Name = "dgSegments";\r
+            this.dgSegments.RowHeadersVisible = false;\r
+            this.dgSegments.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
+            this.dgSegments.Size = new System.Drawing.Size(275, 411);\r
+            this.dgSegments.TabIndex = 1;\r
+            this.dgSegments.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgSegments_CellContentClick);\r
+            this.dgSegments.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgSegments_CellMouseDoubleClick);\r
+            this.dgSegments.ColumnAdded += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgSegments_ColumnAdded);\r
+            // \r
+            // segmentActions\r
+            // \r
+            this.segmentActions.AutoSize = false;\r
+            this.segmentActions.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
+            this.segmentActions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.toolStripButton5,\r
+            this.toolStripSeparator2,\r
+            this.toolStripButton1,\r
+            this.toolStripButton4,\r
+            this.toolStripButton2,\r
+            this.toolStripSeparator1,\r
+            this.toolStripButton3});\r
+            this.segmentActions.Location = new System.Drawing.Point(3, 3);\r
+            this.segmentActions.Name = "segmentActions";\r
+            this.segmentActions.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
+            this.segmentActions.Size = new System.Drawing.Size(275, 25);\r
+            this.segmentActions.TabIndex = 0;\r
+            this.segmentActions.Text = "toolStrip1";\r
+            // \r
+            // toolStripButton5\r
+            // \r
+            this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\r
+            this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image")));\r
+            this.toolStripButton5.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.toolStripButton5.Name = "toolStripButton5";\r
+            this.toolStripButton5.Size = new System.Drawing.Size(23, 22);\r
+            this.toolStripButton5.Text = "toolStripButton5";\r
+            // \r
+            // toolStripSeparator2\r
+            // \r
+            this.toolStripSeparator2.Name = "toolStripSeparator2";\r
+            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);\r
+            // \r
+            // toolStripButton1\r
+            // \r
+            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\r
+            this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));\r
+            this.toolStripButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.toolStripButton1.Name = "toolStripButton1";\r
+            this.toolStripButton1.Size = new System.Drawing.Size(23, 22);\r
+            this.toolStripButton1.Text = "toolStripButton1";\r
+            // \r
+            // toolStripButton4\r
+            // \r
+            this.toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\r
+            this.toolStripButton4.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton4.Image")));\r
+            this.toolStripButton4.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.toolStripButton4.Name = "toolStripButton4";\r
+            this.toolStripButton4.Size = new System.Drawing.Size(23, 22);\r
+            this.toolStripButton4.Text = "toolStripButton4";\r
+            // \r
+            // toolStripButton2\r
+            // \r
+            this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\r
+            this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));\r
+            this.toolStripButton2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.toolStripButton2.Name = "toolStripButton2";\r
+            this.toolStripButton2.Size = new System.Drawing.Size(23, 22);\r
+            this.toolStripButton2.Text = "toolStripButton2";\r
+            // \r
+            // toolStripSeparator1\r
+            // \r
+            this.toolStripSeparator1.Name = "toolStripSeparator1";\r
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);\r
+            // \r
+            // toolStripButton3\r
+            // \r
+            this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\r
+            this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));\r
+            this.toolStripButton3.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
+            this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.toolStripButton3.Name = "toolStripButton3";\r
+            this.toolStripButton3.Size = new System.Drawing.Size(23, 22);\r
+            this.toolStripButton3.Text = "toolStripButton3";\r
+            // \r
+            // imagesTabEdit\r
+            // \r
+            this.imagesTabEdit.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagesTabEdit.ImageStream")));\r
+            this.imagesTabEdit.TransparentColor = System.Drawing.Color.Transparent;\r
+            this.imagesTabEdit.Images.SetKeyName(0, "round_publish_black_24dp.png");\r
+            this.imagesTabEdit.Images.SetKeyName(1, "ic_playlist_add_check_black_24dp_1x.png");\r
+            // \r
+            // mainMenu\r
+            // \r
+            this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.fileToolStripMenuItem});\r
+            this.mainMenu.Location = new System.Drawing.Point(0, 0);\r
+            this.mainMenu.Name = "mainMenu";\r
+            this.mainMenu.Size = new System.Drawing.Size(990, 24);\r
+            this.mainMenu.TabIndex = 21;\r
+            this.mainMenu.Text = "menuStrip1";\r
+            // \r
+            // fileToolStripMenuItem\r
+            // \r
+            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.menuOpenFile,\r
+            this.menuApprove});\r
+            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";\r
+            this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\r
+            this.fileToolStripMenuItem.Text = "File";\r
+            // \r
+            // menuOpenFile\r
+            // \r
+            this.menuOpenFile.Name = "menuOpenFile";\r
+            this.menuOpenFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));\r
+            this.menuOpenFile.Size = new System.Drawing.Size(165, 22);\r
+            this.menuOpenFile.Text = "Open file";\r
+            this.menuOpenFile.Click += new System.EventHandler(this.menuOpenFile_Click);\r
+            // \r
+            // menuApprove\r
+            // \r
+            this.menuApprove.Name = "menuApprove";\r
+            this.menuApprove.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));\r
+            this.menuApprove.Size = new System.Drawing.Size(165, 22);\r
+            this.menuApprove.Text = "Approve";\r
+            this.menuApprove.Click += new System.EventHandler(this.OnClick_menuApprove);\r
+            // \r
+            // playerControls\r
+            // \r
+            this.playerControls.AutoSize = true;\r
+            this.playerControls.Dock = System.Windows.Forms.DockStyle.Bottom;\r
+            this.playerControls.Location = new System.Drawing.Point(0, 513);\r
+            this.playerControls.Margin = new System.Windows.Forms.Padding(0);\r
+            this.playerControls.Name = "playerControls";\r
+            this.playerControls.Size = new System.Drawing.Size(990, 116);\r
+            this.playerControls.TabIndex = 22;\r
+            // \r
             // PlayerForm\r
             // \r
             this.AllowDrop = true;\r
             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
             this.BackColor = System.Drawing.Color.White;\r
-            this.ClientSize = new System.Drawing.Size(936, 544);\r
-            this.Controls.Add(this.splitContainer1);\r
+            this.ClientSize = new System.Drawing.Size(990, 629);\r
+            this.Controls.Add(this.mainSplit);\r
+            this.Controls.Add(this.mainMenu);\r
+            this.Controls.Add(this.playerControls);\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
             this.KeyPreview = true;\r
             this.MinimumSize = new System.Drawing.Size(640, 480);\r
@@ -408,27 +427,29 @@ namespace DxPlay {
             this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);\r
             this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PlayerForm_KeyDown);\r
             this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.PlayerForm_PreviewKeyDown);\r
-            this.panel3.ResumeLayout(false);\r
-            this.panel3.PerformLayout();\r
-            this.splitContainer1.Panel1.ResumeLayout(false);\r
-            this.splitContainer1.Panel2.ResumeLayout(false);\r
-            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();\r
-            this.splitContainer1.ResumeLayout(false);\r
+            this.pVideo.ResumeLayout(false);\r
+            this.ctxmSegmentActions.ResumeLayout(false);\r
+            this.mainSplit.Panel1.ResumeLayout(false);\r
+            this.mainSplit.Panel2.ResumeLayout(false);\r
+            ((System.ComponentModel.ISupportInitialize)(this.mainSplit)).EndInit();\r
+            this.mainSplit.ResumeLayout(false);\r
             this.panelPlayer.ResumeLayout(false);\r
-            this.panelPlayer.PerformLayout();\r
-            this.pControls.ResumeLayout(false);\r
-            this.pControls.PerformLayout();\r
+            this.marginPanel.ResumeLayout(false);\r
+            this.tabEditor.ResumeLayout(false);\r
+            this.tpMetadata.ResumeLayout(false);\r
+            this.tpSegments.ResumeLayout(false);\r
             ((System.ComponentModel.ISupportInitialize)(this.dgSegments)).EndInit();\r
             ((System.ComponentModel.ISupportInitialize)(this.bsSegments)).EndInit();\r
-            this.ctxmSegmentActions.ResumeLayout(false);\r
+            this.segmentActions.ResumeLayout(false);\r
+            this.segmentActions.PerformLayout();\r
+            this.mainMenu.ResumeLayout(false);\r
+            this.mainMenu.PerformLayout();\r
             this.ResumeLayout(false);\r
+            this.PerformLayout();\r
 \r
         }\r
         #endregion\r
-\r
-        private ColorSlider trackBar1;\r
-        private Label lbStatus;\r
-        private SplitContainer splitContainer1;\r
+        private SplitContainer mainSplit;\r
         private Panel panelPlayer;\r
         private MenuButton menuButtonSegmentActions;\r
         private ContextMenuStrip ctxmSegmentActions;\r
@@ -440,7 +461,25 @@ namespace DxPlay {
         private ToolStripMenuItem deleteSegmentToolStripMenuItem;\r
         private ToolStripMenuItem actualPositionToIntroToolStripMenuItem;\r
         private ToolStripMenuItem actualPositionToOutroToolStripMenuItem;\r
-        private FlowLayoutPanel pControls;\r
+        private MenuStrip mainMenu;\r
+        private ToolStripMenuItem fileToolStripMenuItem;\r
+        private DxPlay.Controls.BindableToolStripMenuItem menuOpenFile;\r
+        private DxPlay.Controls.BindableToolStripMenuItem menuApprove;\r
+        private Controls.PlayerControls playerControls;\r
+        private TabControl tabEditor;\r
+        private TabPage tpMetadata;\r
+        private TabPage tpSegments;\r
+        private ToolStrip segmentActions;\r
+        private ToolStripButton toolStripButton1;\r
+        private ToolStripButton toolStripButton2;\r
+        private ToolStripButton toolStripButton3;\r
+        private ToolStripButton toolStripButton4;\r
+        private ToolStripButton toolStripButton5;\r
+        private ImageList imagesTabEdit;\r
+        private Panel marginPanel;\r
+        private TrafficClient.TrafficIDSelector trafficBrowser;\r
+        private ToolStripSeparator toolStripSeparator2;\r
+        private ToolStripSeparator toolStripSeparator1;\r
     }\r
 }\r
 \r
index 9bcc9c793ecb04d4804d7e66709944d944d5a31e..884a4f72517bf3c5aa0479ac87a4627ec08c51de 100644 (file)
 using System;\r
 using System.Windows.Forms;\r
-using System.Diagnostics;\r
-using static DxPlay.DxPlayer;\r
-using JR.Utils.GUI.Forms;\r
 using System.IO;\r
 using System.Linq;\r
-using System.ComponentModel;\r
 using MaestroShared.Metadata;\r
+using NLog;\r
+using DxPlay.Model;\r
 \r
 namespace DxPlay {\r
 \r
     public partial class PlayerForm : Form {\r
+        private static readonly Logger logger = LogManager.GetCurrentClassLogger();\r
 \r
-        private BindingList<MovieSegment> segments;\r
         private DateTime lastClick = DateTime.Now;\r
         private string selectedFile;\r
         private volatile bool trackBarAtUser;\r
         private DxPlayer m_play = null;\r
         private MediaDescription m_mediaDescription = null;\r
-        public bool AutoStart;\r
+        private OpenFileDialog openFileDialog = new OpenFileDialog() { Filter = "All files (*.*)|*.*" };\r
 \r
-        public bool SegmentEditor { get; set; }\r
+        private DxPlaySettings settings;\r
+        public DxPlaySettings Settings {\r
+            get {\r
+                return settings;\r
+            }\r
+            set {\r
+                settings = value ?? throw new NullReferenceException("DxPlaySettings");\r
+                Model = new DxPlayModel(value);\r
+            }\r
+        }\r
 \r
-        public PlayerForm() {\r
-            InitializeComponent();\r
-            InitializeTexts();\r
+        private DxPlayModel model;\r
+        public DxPlayModel Model {\r
+            get { return model; }\r
+            set {\r
+                model = value ?? throw new NullReferenceException("DxPlayModel");\r
+                ApplyModel();\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// User control cimkejenek rendszeres frissitese villogast eredmenyez e nelkul \r
+        /// </summary>\r
+        protected override CreateParams CreateParams {\r
+            get {\r
+                CreateParams cp = base.CreateParams;\r
+                cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED\r
+                return cp;\r
+            }\r
+        }\r
+        private void ApplyModel() {\r
+            bsSegments.DataSource = model.Segments;\r
+            dgSegments.AutoGenerateColumns = true;\r
+            mainMenu.DataBindings.Add(new Binding("Visible", model, "IsMenuVisible"));\r
+            menuOpenFile.DataBindings.Add(new Binding("Enabled", model, "IsMenuVisible"));\r
+            menuApprove.DataBindings.Add(new Binding("Enabled", model, "IsApproveEnabled"));\r
+            Binding segmentEditorPanelBinding = new Binding("Panel2Collapsed", model, "IsSegmentEditorEnabled");\r
+            segmentEditorPanelBinding.Format += (s, e) => {\r
+                bool enabled = (bool)e.Value;\r
+                e.Value = !enabled;\r
+                if (enabled)\r
+                    mainSplit.Panel2.Show();\r
+                else\r
+                    mainSplit.Panel2.Hide();\r
+            };\r
+            mainSplit.DataBindings.Add(segmentEditorPanelBinding);\r
         }\r
 \r
-        public PlayerForm(ref BindingList<MovieSegment> segments) {\r
-            this.segments = segments;\r
+        public PlayerForm() {\r
             InitializeComponent();\r
-            InitializeTexts();\r
+\r
+            playerControls.Play.Click += btnPlay_Click;\r
+            playerControls.Stop.Click += btnStop_Click;\r
+            playerControls.Pause.Click += btnPause_Click;\r
+\r
+            playerControls.TrackBar.MouseDown += trackBar1_MouseDown;\r
+            playerControls.TrackBar.MouseUp += trackBar1_MouseUp;\r
         }\r
 \r
         private void InitializeTexts() {\r
 \r
-            defineOneSegmentToolStripMenuItem.Text = StringResource.SZEGMENS_DEFINIALASA;\r
-            splitSegmentAtCurrentPositionToolStripMenuItem.Text = StringResource.SZEGMENS_SZETVAGASA;\r
-            actualPositionToIntroToolStripMenuItem.Text = StringResource.AKTUALIS_POZICIO_BELEPO;\r
-            actualPositionToOutroToolStripMenuItem.Text = StringResource.AKTUALIS_POZICIO_KILEPO;\r
-            deleteSegmentToolStripMenuItem.Text = StringResource.SZEGMENS_TORLESE;\r
-            menuButtonSegmentActions.Text = StringResource.SZEGMENSEK;\r
+            defineOneSegmentToolStripMenuItem.Text = Settings.Resource("define-segment", StringResource.SZEGMENS_DEFINIALASA);\r
+            splitSegmentAtCurrentPositionToolStripMenuItem.Text = Settings.Resource("break-segment", StringResource.SZEGMENS_SZETVAGASA);\r
+            actualPositionToIntroToolStripMenuItem.Text = Settings.Resource("position-as-tcin", StringResource.AKTUALIS_POZICIO_BELEPO);\r
+            actualPositionToOutroToolStripMenuItem.Text = Settings.Resource("position-as-tcout", StringResource.AKTUALIS_POZICIO_KILEPO);\r
+            deleteSegmentToolStripMenuItem.Text = Settings.Resource("delete-segment", StringResource.SZEGMENS_TORLESE);\r
+            menuButtonSegmentActions.Text = Settings.Resource("segments", StringResource.SZEGMENSEK);\r
 \r
-            //btnPause.Text = StringResource.SZUNET;\r
-            //btnPlay.Text = StringResource.LEJATSZAS;\r
-            //btnStop.Text = StringResource.LEALLITAS;\r
-            lbStatus.Text = StringResource.NINCS_BEMENET;\r
-            lbStart.Text = StringResource.INDULASI_PONT;\r
-            lbDuration.Text = StringResource.HOSSZ;\r
+            ToolTip tt = new ToolTip();\r
+            tt.SetToolTip(playerControls.Pause, Settings.Resource("pause", StringResource.SZUNET));\r
+            tt.SetToolTip(playerControls.Play, Settings.Resource("play", StringResource.LEJATSZAS));\r
+            tt.SetToolTip(playerControls.Stop, Settings.Resource("stop", StringResource.LEALLITAS));\r
+            playerControls.Status.Text = Settings.Resource("no-input", StringResource.NINCS_BEMENET);\r
+            playerControls.Start.Text = Settings.Resource("start", StringResource.INDULASI_PONT);\r
+            playerControls.Duration.Text = Settings.Resource("length", StringResource.HOSSZ);\r
         }\r
 \r
-        private void cueue() {\r
+        private void Cueue() {\r
             m_play = null;\r
             try {\r
                 //m_mediaDescription = MediaDetector.GetDescription(selectedFile);\r
                 m_mediaDescription = new MediaDescription() { fileName = selectedFile };\r
 \r
-                trackBar1.Value = 0;\r
-                trackBar1.Minimum = 0;\r
-                m_play = new DxPlayer(pVideo, ref m_mediaDescription);\r
+                playerControls.TrackBar.Value = 0;\r
+                playerControls.TrackBar.Minimum = 0;\r
+                m_play = new DxPlayer(pVideo, ref m_mediaDescription, Settings);\r
                 if (m_play.IsError)\r
-                    throw new Exception(selectedFile);                \r
+                    throw new Exception(selectedFile);\r
 \r
-                m_play.PlayEvent += new DxPlayEvent(playEvent);\r
+                m_play.PlayEvent += new DxPlayEvent(OnPlayEvent);\r
                 if (m_mediaDescription != null) {\r
-                    trackBar1.Maximum = m_mediaDescription.Duration.Frames;\r
-                    lbStartTC.Text = m_mediaDescription.FirstFrame.ToString();\r
-                    lbEndTC.Text = m_mediaDescription.Duration.ToString();\r
+                    playerControls.TrackBar.Maximum = m_mediaDescription.Duration.Frames;\r
+                    playerControls.StartTC.Text = m_mediaDescription.FirstFrame.ToString();\r
+                    playerControls.EndTC.Text = m_mediaDescription.Duration.ToString();\r
                 }\r
-            }\r
-            catch (Exception ce) {\r
+            } catch (Exception ce) {\r
                 MessageBox.Show("Az állomány nem tölthetõ be: " + ce.Message, "Open Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
                 Close();\r
             }\r
         }\r
 \r
-        private void playEvent() {\r
+        private void OnPlayEvent() {\r
             if (!IsHandleCreated || Disposing || IsDisposed || m_play == null)\r
                 return;\r
-            //Debug.WriteLine("Event " + m_play.State);\r
-            //switch (m_play.State) {\r
-            //    case GraphState.Paused: {\r
-            //            break;\r
-            //        }\r
-            //    case GraphState.Stopped: {\r
-            //            break;\r
-            //        }\r
-            //    case GraphState.Playing: {\r
-            //            break;\r
-            //        }\r
-            //}\r
             BeginInvoke((Action)(() => {\r
                 if (Disposing || IsDisposed || m_play == null)\r
                     return;\r
                 if (!trackBarAtUser)\r
-                    trackBar1.Value = m_play.CurrentTC.ZeroBasedFrames;\r
-                lbCurrentTC.Text = m_play.CurrentTC.ToString();\r
-                string labelStatusText = lbStatus.Text;\r
-                m_play.stateHunStringValues.TryGetValue(m_play.State, out labelStatusText);//m_play.State.ToString().ToUpper();\r
-                lbStatus.Text = labelStatusText;\r
+                    playerControls.TrackBar.Value = m_play.CurrentTC.ZeroBasedFrames;\r
+                playerControls.CurrentTC.Text = m_play.CurrentTC.ToString();\r
+                string labelStatusText = playerControls.Status.Text;\r
+                m_play.stringValues.TryGetValue(m_play.State, out labelStatusText);\r
+                playerControls.Status.Text = labelStatusText;\r
             }));\r
         }\r
 \r
@@ -112,38 +144,42 @@ namespace DxPlay {
         }\r
 \r
         public void Open(FileInfo fileInfo) {\r
+            logger.Debug("Open");\r
+            if (m_play != null)\r
+                m_play.Dispose();\r
             this.Text = fileInfo.Name;\r
             selectedFile = fileInfo.FullName;\r
-            if (m_play != null && selectedFile != m_mediaDescription.FileName) {\r
-                m_play.Stop();\r
-                m_play.Dispose();\r
-                m_play = null;\r
+            \r
+            Cueue();\r
+\r
+            if (model.IsMenuVisible) {\r
+                openFileDialog.InitialDirectory = fileInfo.Directory.FullName;\r
+                string id = fileInfo.Name.Replace(fileInfo.Extension, "");\r
+                try {\r
+                    model.InitializeSegments(id);\r
+                } catch (Exception e) {\r
+                    MessageBox.Show(e.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                    logger.Error(e);\r
+                }\r
             }\r
-            cueue();\r
-            //BringToFront();\r
-            //Activate();\r
         }\r
 \r
+\r
         private void Form1_DragDrop(object sender, DragEventArgs e) {\r
             string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);\r
             FileInfo fileInfo = new FileInfo(files[0]);\r
             Open(fileInfo);\r
-            ShowFirstFrame();\r
         }\r
 \r
         private void panel1_MouseDown(object sender, MouseEventArgs e) {\r
-            if (e.Button == MouseButtons.Left) {\r
+            if (m_play != null && e.Button == MouseButtons.Left) {\r
                 DateTime currentClick = DateTime.Now;\r
                 if ((currentClick - lastClick).TotalMilliseconds < 300) {\r
                     m_play.ToggleFullscreen();\r
-                    Debug.WriteLine("Fullscreen");\r
+                    logger.Debug("Fullscreen");\r
                 } else\r
                     lastClick = currentClick;\r
             }\r
-\r
-            //if (e.Button == MouseButtons.Right) {\r
-            //    FlexibleMessageBox.Show(m_play.MediaDescription.Description);\r
-            //}\r
         }\r
 \r
         private void panel1_SizeChanged(object sender, EventArgs e) {\r
@@ -159,23 +195,10 @@ namespace DxPlay {
         private void trackBar1_MouseUp(object sender, MouseEventArgs e) {\r
             if (trackBarAtUser) {\r
                 trackBarAtUser = false;\r
-                /*\r
-                                DateTime currentClick = DateTime.Now;\r
-                                if ((currentClick - lastClick).TotalMilliseconds < 300) {\r
-                                    double absoluteMouse = (double)e.X / trackBar1.Width;\r
-                                    int seek = (int)Math.Round(trackBar1.Maximum * absoluteMouse);\r
-                                    m_play.Seek(seek);\r
-                                } else {\r
-                                    if (m_play != null)\r
-                                        m_play.Seek(trackBar1.Value);\r
-                                    else\r
-                                        trackBar1.Value = 0;\r
-                                }\r
-                                */\r
                 if (m_play != null)\r
-                    m_play.Seek(trackBar1.Value);\r
+                    m_play.Seek(playerControls.TrackBar.Value);\r
                 else\r
-                    trackBar1.Value = 0;\r
+                    playerControls.TrackBar.Value = 0;\r
             }\r
         }\r
 \r
@@ -195,22 +218,21 @@ namespace DxPlay {
                 m_play.Pause();\r
         }\r
 \r
-\r
         private void PlayerForm_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) {\r
             if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Right || e.KeyCode == Keys.Space || e.KeyCode == Keys.Escape) {\r
                 e.IsInputKey = false;\r
             }\r
         }\r
 \r
-        private void DisableHotKeysDefaults(Control.ControlCollection controls) {\r
-            foreach (Control control in controls) {\r
-                if (control.Equals(dgSegments))\r
-                    continue;\r
-                control.PreviewKeyDown += new PreviewKeyDownEventHandler(PlayerForm_PreviewKeyDown);\r
-                if (control.HasChildren)\r
-                    DisableHotKeysDefaults(control.Controls);\r
-            }\r
-        }\r
+        //private void DisableHotKeysDefaults(Control.ControlCollection controls) {\r
+        //    foreach (Control control in controls) {\r
+        //        if (control.Equals(dgSegments))\r
+        //            continue;\r
+        //        control.PreviewKeyDown += new PreviewKeyDownEventHandler(PlayerForm_PreviewKeyDown);\r
+        //        if (control.HasChildren)\r
+        //            DisableHotKeysDefaults(control.Controls);\r
+        //    }\r
+        //}\r
 \r
         private void PlayerForm_Load(object sender, EventArgs e) {\r
             //DisableHotKeysDefaults(this.Controls);\r
@@ -218,25 +240,15 @@ namespace DxPlay {
             InterceptKeys.Start();\r
             InterceptKeys.GlobalKeyEvent += HandleHotKey;\r
 \r
-            bsSegments.DataSource = segments;\r
-            dgSegments.AutoGenerateColumns = true;\r
-\r
-            if (SegmentEditor) {\r
-                splitContainer1.Panel2Collapsed = false;\r
-                splitContainer1.Panel2.Show();\r
-            } else {\r
-                splitContainer1.Panel2Collapsed = true;\r
-                splitContainer1.Panel2.Hide();\r
-            }\r
-\r
-            lbStartTC.BackColor = BackColor;\r
-            lbDuration.BackColor = BackColor;\r
-            lbEndTC.BackColor = BackColor;\r
-            lbCurrentTC.BackColor = BackColor;\r
-            lbStart.BackColor = BackColor;\r
-            lbStatus.BackColor = BackColor;\r
+            playerControls.BackColor = BackColor;\r
+            playerControls.StartTC.BackColor = BackColor;\r
+            playerControls.Duration.BackColor = BackColor;\r
+            playerControls.EndTC.BackColor = BackColor;\r
+            playerControls.CurrentTC.BackColor = BackColor;\r
+            playerControls.Start.BackColor = BackColor;\r
+            playerControls.Status.BackColor = BackColor;\r
             dgSegments.BackgroundColor = BackColor;\r
-\r
+            trafficBrowser.BackColor = BackColor;\r
         }\r
 \r
         private void PlayerForm_KeyDown(object sender, KeyEventArgs e) {\r
@@ -249,67 +261,73 @@ namespace DxPlay {
         }\r
 \r
         private bool HandleHotKey(Keys keyCode) {\r
-            Debug.WriteLine("Key pressed " + keyCode);\r
-            if (m_play == null || dgSegments.IsCurrentCellInEditMode || (!m_play.IsFullscreen() && !this.ContainsFocus))\r
-                return true; \r
-            Debug.WriteLine("Handling " + keyCode);\r
+            logger.Debug("Key pressed " + keyCode);\r
+            if (dgSegments.IsCurrentCellInEditMode || (m_play != null && !m_play.IsFullscreen() && !ContainsFocus))\r
+                return true;\r
+            logger.Debug("Handling " + keyCode);\r
             bool result = false;\r
             switch (keyCode) {\r
                 case Keys.Return:\r
-                    if (ModifierKeys.HasFlag(Keys.Shift)) {\r
+                    if (m_play != null && ModifierKeys.HasFlag(Keys.Shift)) {\r
                         m_play.ToggleFullscreen();\r
                         result = true;\r
                     }\r
                     break;\r
                 case Keys.Escape:\r
-                    if (m_play.IsFullscreen())\r
+                    if (m_play != null && m_play.IsFullscreen())\r
                         m_play.ToggleFullscreen();\r
                     else\r
                         Close();\r
                     result = true;\r
                     break;\r
                 case Keys.Left:\r
-                    Debug.WriteLine("Seeking...");\r
-                    if (ModifierKeys.HasFlag(Keys.Control)) {\r
-                        if (m_play.CurrentTC.ZeroBasedFrames > 4) {\r
-                            m_play.Pause();\r
-                            m_play.Seek(m_play.CurrentTC.ZeroBasedFrames - 5);\r
-                        }\r
-                    } else {\r
-                        if (m_play.CurrentTC.ZeroBasedFrames > 0) {\r
-                            m_play.Pause();\r
-                            m_play.Seek(m_play.CurrentTC.ZeroBasedFrames - 1);\r
+                    logger.Debug("Seeking...");\r
+                    if (m_play != null) {\r
+                        if (ModifierKeys.HasFlag(Keys.Control)) {\r
+                            if (m_play.CurrentTC.ZeroBasedFrames > 4) {\r
+                                m_play.Pause();\r
+                                m_play.Seek(m_play.CurrentTC.ZeroBasedFrames - 5);\r
+                            }\r
+                        } else {\r
+                            if (m_play.CurrentTC.ZeroBasedFrames > 0) {\r
+                                m_play.Pause();\r
+                                m_play.Seek(m_play.CurrentTC.ZeroBasedFrames - 1);\r
+                            }\r
                         }\r
                     }\r
                     result = true;\r
                     break;\r
                 case Keys.Right:\r
-                    if (ModifierKeys.HasFlag(Keys.Control)) {\r
-                        if (m_play.CurrentTC.ZeroBasedFrames + 5 <= m_mediaDescription.Duration.Frames) {\r
-                            m_play.Pause();\r
-                            m_play.Seek(m_play.CurrentTC.ZeroBasedFrames + 5);\r
-                        }\r
-                    } else {\r
-                        if (m_play.CurrentTC.ZeroBasedFrames + 1 <= m_mediaDescription.Duration.Frames) {\r
-                            m_play.Pause();\r
-                            m_play.Seek(m_play.CurrentTC.ZeroBasedFrames + 1);\r
+                    if (m_play != null) {\r
+                        if (ModifierKeys.HasFlag(Keys.Control)) {\r
+                            if (m_play.CurrentTC.ZeroBasedFrames + 5 <= m_mediaDescription.Duration.Frames) {\r
+                                m_play.Pause();\r
+                                m_play.Seek(m_play.CurrentTC.ZeroBasedFrames + 5);\r
+                            }\r
+                        } else {\r
+                            if (m_play.CurrentTC.ZeroBasedFrames + 1 <= m_mediaDescription.Duration.Frames) {\r
+                                m_play.Pause();\r
+                                m_play.Seek(m_play.CurrentTC.ZeroBasedFrames + 1);\r
+                            }\r
                         }\r
                     }\r
                     result = true;\r
                     break;\r
                 case Keys.Space:\r
-                    if (m_play.State == GraphState.Playing)\r
-                        m_play.Pause();\r
-                    else\r
-                        m_play.Play();\r
+                    if (m_play != null) {\r
+                        if (m_play.State == GraphState.Playing)\r
+                            m_play.Pause();\r
+                        else\r
+                            m_play.Play();\r
+                    }\r
                     result = true;\r
                     break;\r
                 case Keys.I:\r
-                    if (SegmentEditor)\r
+                    if (m_play != null && true.Equals(Settings?.Player?.SegmentEditor))\r
                         SetActualPositionAsIn();\r
                     break;\r
                 case Keys.O:\r
-                    if (SegmentEditor)\r
+                    if (m_play != null && true.Equals(Settings?.Player?.SegmentEditor))\r
                         SetActualPositionAsOut();\r
                     break;\r
             }\r
@@ -317,42 +335,35 @@ namespace DxPlay {
         }\r
 \r
         private void PlayerForm_FormClosing(object sender, FormClosingEventArgs e) {\r
-            if (m_play != null) {\r
-                m_play.Stop();\r
-                m_play.Dispose();\r
-                m_play = null;\r
-            }\r
+            //if (m_play != null)\r
+            //    m_play.Dispose();\r
         }\r
 \r
         private void PlayerForm_Shown(object sender, EventArgs e) {\r
-            if (m_play != null) {\r
-                if (AutoStart)\r
-                    m_play.Play();\r
-                else {\r
-                    ShowFirstFrame();\r
-                }\r
+            logger.Debug("PlayerForm_Shown");\r
+            InitializeTexts();\r
+            if (true.Equals(Settings?.Player?.SegmentEditor) && true.Equals(Settings?.IsStandalone)) {\r
+                mainMenu.Visible = true;\r
             }\r
-        }\r
-\r
-        private void ShowFirstFrame() {\r
-            m_play.Play();\r
-            m_play.Pause();\r
-            m_play.Seek(0);\r
+            if (m_play != null && true.Equals(Settings?.Player?.AutoStart))\r
+                m_play.Play();\r
         }\r
 \r
         private void PlayerForm_FormClosed(object sender, FormClosedEventArgs e) {\r
             InterceptKeys.Stop();\r
+            if (m_play != null)\r
+                m_play.Dispose();\r
         }\r
 \r
         private void OnDefineOneSegmentClick(object sender, EventArgs e) {\r
             MovieSegment segment = null;\r
-            if (segments.Count == 0) {\r
+            if (model.Segments.Count == 0) {\r
                 segment = new MovieSegment() {\r
                     TCIn = new Timecode(m_mediaDescription.FirstFrame.Frames),\r
                     TCOut = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration)\r
                 };\r
             } else {\r
-                MovieSegment lastSegment = segments[segments.Count - 1];\r
+                MovieSegment lastSegment = model.Segments[model.Segments.Count - 1];\r
                 Timecode tcEnd = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration);\r
                 if (lastSegment.TCOut.Frames == tcEnd.Frames) {\r
                     MessageBox.Show("Az utolsó szegmens az anyag végéig tart, így nem hozható létre új szegmens.");\r
@@ -363,12 +374,12 @@ namespace DxPlay {
                     TCOut = tcEnd\r
                 };\r
             }\r
-            segments.Add(segment);\r
+            model.Segments.Add(segment);\r
         }\r
 \r
         private void OnDeleteSegmentClick(object sender, EventArgs e) {\r
             if (bsSegments.Current != null)\r
-                segments.Remove(bsSegments.Current as MovieSegment);\r
+                model.Segments.Remove(bsSegments.Current as MovieSegment);\r
         }\r
 \r
         private void SetActualPositionAsIn() {\r
@@ -395,7 +406,7 @@ namespace DxPlay {
                 }\r
                 //if (MessageBox.Show("Biztos felül akarja írni az belépõt?", "Belépõ felülírása", MessageBoxButtons.YesNo) == DialogResult.No)\r
                 //    return;\r
-                MovieSegment collisionSegment = segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).SingleOrDefault();\r
+                MovieSegment collisionSegment = model.Segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).SingleOrDefault();\r
 \r
                 if (collisionSegment != null && !currentSegment.Equals(collisionSegment)) {\r
                     MessageBox.Show("A szegmensek között nem lehet átfedés.");\r
@@ -419,7 +430,7 @@ namespace DxPlay {
                 if (currentSegment.TCIn.Frames >= m_play.CurrentTC.Frames)\r
                     MessageBox.Show("A kilépõ nem lehet a belépõ elõtt.");\r
 \r
-                MovieSegment collisionSegment = segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).SingleOrDefault();\r
+                MovieSegment collisionSegment = model.Segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).SingleOrDefault();\r
 \r
                 if (collisionSegment != null && !currentSegment.Equals(collisionSegment)) {\r
                     MessageBox.Show("A szegmensek között nem lehet átfedés.");\r
@@ -441,40 +452,42 @@ namespace DxPlay {
         }\r
 \r
         private void OnSplitSegmentAtCurrentPositionClick(object sender, EventArgs e) {\r
-            MovieSegment currentSegment = segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && s.TCOut.Frames > m_play.CurrentTC.Frames).SingleOrDefault();\r
+            MovieSegment currentSegment = model.Segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && s.TCOut.Frames > m_play.CurrentTC.Frames).SingleOrDefault();\r
             if (currentSegment == null)\r
                 return;\r
-            int position = segments.IndexOf(currentSegment);\r
+            int position = model.Segments.IndexOf(currentSegment);\r
             MovieSegment newSegment = new MovieSegment() {\r
                 TCIn = new Timecode(currentSegment.TCIn.Frames),\r
                 TCOut = new Timecode(m_play.CurrentTC.Frames)\r
             };\r
             currentSegment.TCIn = new Timecode(m_play.CurrentTC.Frames);\r
-            segments.Insert(position, newSegment);\r
+            model.Segments.Insert(position, newSegment);\r
         }\r
 \r
         private void dgSegments_ColumnAdded(object sender, DataGridViewColumnEventArgs e) {\r
             int index = e.Column.Index;\r
             switch (index) {\r
                 case 0:\r
-                    e.Column.HeaderText = StringResource.BELEPO;\r
+                    e.Column.HeaderText = Settings.Resource("tc-in", StringResource.BELEPO);\r
                     e.Column.ReadOnly = true;\r
                     break;\r
                 case 1:\r
-                    e.Column.HeaderText = StringResource.KILEPO;\r
+                    e.Column.HeaderText = Settings.Resource("tc-out", StringResource.KILEPO);\r
                     e.Column.ReadOnly = true;\r
                     break;\r
                 case 2:\r
-                    e.Column.HeaderText = StringResource.ELHAGYHATO;\r
+                    e.Column.HeaderText = Settings.Resource("optional", StringResource.ELHAGYHATO);\r
+                    break;\r
+                case 3:\r
+                    e.Column.HeaderText = Settings.Resource("comment", StringResource.MEGJEGYZES);\r
                     break;\r
-                case 3: e.Column.HeaderText = StringResource.MEGJEGYZES; break;\r
             }\r
         }\r
 \r
 \r
         private void dgSegments_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) {\r
             MovieSegment actualSegment = bsSegments.Current as MovieSegment;\r
-            if (actualSegment == null)\r
+            if (actualSegment == null || m_play == null)\r
                 return;\r
             if (e.ColumnIndex == 0) {\r
                 m_play.Pause();\r
@@ -484,12 +497,16 @@ namespace DxPlay {
                 m_play.Pause();\r
                 int pos = actualSegment.TCOut.Frames - m_play.MediaDescription.FirstFrame.Frames;\r
                 //Az utolsó kocka nem jelenik meg egyébként\r
-                if (pos == m_play.MediaDescription.Duration.Frames) {\r
-                    pos--;\r
-                    m_play.Seek(pos);\r
-                    m_play.Play();\r
-                } else\r
-                    m_play.Seek(pos);\r
+                try {\r
+                    if (pos == m_play.MediaDescription.Duration.Frames) {\r
+                        pos--;\r
+                        m_play.Seek(pos);\r
+                        m_play.Play();\r
+                    } else\r
+                        m_play.Seek(pos);\r
+                } catch (Exception ex) {\r
+                    MessageBox.Show(ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+                }\r
 \r
             }\r
 \r
@@ -499,5 +516,14 @@ namespace DxPlay {
             if (e.ColumnIndex == 2)\r
                 dgSegments.EndEdit();\r
         }\r
+\r
+        private void menuOpenFile_Click(object sender, EventArgs e) {\r
+            if (openFileDialog.ShowDialog() == DialogResult.OK)\r
+                Open(new FileInfo(openFileDialog.FileName));\r
+        }\r
+\r
+        private void OnClick_menuApprove(object sender, EventArgs e) {\r
+            MessageBox.Show("approve");\r
+        }\r
     }\r
 }\r
index 925137f65fcff62738abd11ca8696f24a6c161a7..ebe652a99d281ee7dba1f225e2bce0d60ba5c4bb 100644 (file)
   <resheader name="writer">\r
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
   </resheader>\r
+  <metadata name="ctxmSegmentActions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
   <metadata name="bsSegments.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>184, 17</value>\r
   </metadata>\r
-  <metadata name="ctxmSegmentActions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-    <value>17, 17</value>\r
+  <metadata name="segmentActions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>412, 17</value>\r
   </metadata>\r
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="toolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC8SURBVDhP1ZO9DcIwFISfqKGjpaENG4S/GZiEOiWMkR2Y\r
+        gREo2IEVaBDcOXnS48m24lRw0qf4nHeXxFLkZ3UC15GcQVAF3uAGYoM5mGF2BWTfG15LpdmdNb6Ib3ro\r
+        lkkNKtJ9fgJLY9KZrTWpIvICLZgDq+Ii8gQNsNKZjTW5ogtYAq/BRXcQDjIhza6t8UVTMOmWSX0V8aBo\r
+        joA3SmCG2RrIDDz6jTEwy46gBfBPi4WIn2M2K/9fKX8hkQ9xw2LrlhXH8QAAAABJRU5ErkJggg==\r
+</value>\r
+  </data>\r
+  <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABOSURBVDhPYxgFVAWOUJoiUALE/4HYB8wjE8AMmQbmkQmo\r
+        asg8MI8C0ADEMIMYQQKUgG4gpoqrQABmGEXhBAMww3zBPAqBG5QeBWQBBgYAaigQp+qpuEkAAAAASUVO\r
+        RK5CYII=\r
+</value>\r
+  </data>\r
+  <data name="toolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABlSURBVDhPYxjZ4AAUUwxGDUIFFUDcD2HCATaDQGoKIEzs\r
+        oIGRkfE/kEY2DN2gfqiaBggXN+hGMwzZIJgh3RAuYQAzrB2IYQa1k2oIDMAM+wHC5BoCA2DDKDUEBkAG\r
+        UGzIkAUMDABv+SVD4UMwTwAAAABJRU5ErkJggg==\r
+</value>\r
+  </data>\r
+  <data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABOSURBVDhPYxgFFAMnKE0R8APi/0BcAuZRCKYBMdUMmwfE\r
+        VDGMEYiXADHFhoEMgrmqASRADkA2pBskQC6giiH+QEyxITDgBqVHAcWAgQEAtZ4QxOLkcD0AAAAASUVO\r
+        RK5CYII=\r
+</value>\r
+  </data>\r
+  <data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABvSURBVDhPYxhZwBVK4wOOUBoncAPi/0DcDuZhByA5kBon\r
+        MA8P6AdiXIbBDAGpIQpgM4xkQ2AAZlg9EDdA2SQbAgPTgBhkAEWGgADMVRQZBDME5C2yvQYzhKLAxmYI\r
+        DBBtGFUTJDFZhBg1wwMwMAAAvx8nVwi8b+UAAAAASUVORK5CYII=\r
+</value>\r
+  </data>\r
+  <metadata name="imagesTabEdit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>517, 17</value>\r
+  </metadata>\r
+  <data name="imagesTabEdit.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">\r
+    <value>\r
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w\r
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0\r
+        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo\r
+        CAAAAk1TRnQBSQFMAgEBAgEAAVgBAAFYAQABGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo\r
+        AwABYAMAARgDAAEBAQABCAYAAQkYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA\r
+        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5\r
+        AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA\r
+        AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm\r
+        AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM\r
+        AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA\r
+        ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz\r
+        AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ\r
+        AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM\r
+        AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA\r
+        AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA\r
+        AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ\r
+        AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/\r
+        AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA\r
+        AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm\r
+        ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ\r
+        Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz\r
+        AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA\r
+        AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM\r
+        AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM\r
+        ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM\r
+        Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA\r
+        AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM\r
+        AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ\r
+        AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz\r
+        AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm\r
+        AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw\r
+        AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8AiwABEwQAARMYAALv\r
+        XQAB7wIAAe9bAAHvBAAB71kAAe8CAALvAgAB71cAAfICAAHvAgAB7wIAAe9XAALvBAAB7wIAAe84AAHx\r
+        AQ4IAAEOAfAZAAHvAgAB7zcAAbwKAAG8GgAB7wEAAe84AAHvCAAB7xwAAfI6AAHvBgAB71kAAQcEAAEH\r
+        WwABBwIAAQddAAHyAfG4AAETDAABE1IAARMMAAEU/wDOAAFCAU0BPgcAAT4DAAEoAwABYAMAARgDAAEB\r
+        AQABAQUAASABARYAA/8BAAb/BgAG/wYABv8GAAb/BgAB/wGBAv8B/gF/BgAB/wGBAv8B/AE/BgAB/wGB\r
+        Av8B+AEfBgAB/wGBAv8B8AEPBgAB/wGBAf8BwAEhAYcGAAH/AYEB/wHAATMBwwYAAfwBAAE/Av8B4QYA\r
+        AfwBAAE/Av8B8QYAAf4BAAF/AcABAwH7BgAB/wEAAf8BwAEDAf8GAAH/AYEE/wYAAf8BwwT/BgAB/wHn\r
+        Af8BwAEDAf8GAAP/AcABAwH/BgAB+AEAAR8D/wYAAfgBAAEfA/8GAAb/BgAG/wYABv8GAAb/BgAL\r
+</value>\r
+  </data>\r
+  <metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>302, 17</value>\r
+  </metadata>\r
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA\r
index 65276411b85e0c2b4f7d94eccaccffd34083a30e..ab23c59234ebb45797e18fa0f4c6478a3e458a1a 100644 (file)
@@ -15,6 +15,7 @@ namespace DxPlay {
         public IMediaSeeking MediaSeeking { get; private set; }\r
         public IMediaControl MediaControl { get; private set; }\r
         public IMediaEvent MediaEvent { get; private set; }\r
+        private bool isDisposed;\r
 \r
         public PlayerGraph(string fileName) {\r
             try {\r
@@ -43,8 +44,7 @@ namespace DxPlay {
 \r
                 SearchAudioTracks(splitter);\r
                 EnableDeinterlace(videoDecoder);\r
-            }\r
-            catch (Exception e) {\r
+            } catch (Exception e) {\r
                 logger.Error(e.Message);\r
             }\r
         }\r
@@ -167,8 +167,10 @@ namespace DxPlay {
 \r
         // Shut down capture\r
         public void Dispose() {\r
-            logger.Debug("CloseInterfaces");\r
             lock (this) {\r
+                if (isDisposed)\r
+                    return;\r
+                logger.Debug("Dispose");\r
 #if DEBUG\r
                 if (m_DsRot != null)\r
                     m_DsRot.Dispose();\r
@@ -182,6 +184,7 @@ namespace DxPlay {
                 }\r
 \r
                 Marshal.ReleaseComObject(this);\r
+                isDisposed = true;\r
             }\r
         }\r
 \r
index 15a345d3e1660268b21265d03cdbd3a35e5e8071..b53f777b2676631df488c18451de0ffdaef94960 100644 (file)
@@ -1,36 +1,58 @@
 using DxPlay;\r
+using MaestroShared.Configuration;\r
+using NLog;\r
 using System;\r
-using System.Diagnostics;\r
 using System.IO;\r
+using System.Runtime.InteropServices;\r
 using System.Windows.Forms;\r
 \r
 namespace Maestro {\r
     static class Program {\r
-        /// <summary>\r
-        /// The main entry point for the application.\r
-        /// </summary>\r
+        private const string DXPLAY_FILE = "dxplay.json";\r
+        private static readonly Logger logger = LogManager.GetCurrentClassLogger();\r
+\r
         [STAThread]\r
         static void Main() {\r
-            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);\r
+            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExceptionHandler);\r
             Application.EnableVisualStyles();\r
             Application.SetCompatibleTextRenderingDefault(false);\r
             PlayerForm playerForm = new PlayerForm();\r
+            LoadSettings(playerForm);\r
+            if (playerForm.Settings == null)\r
+                playerForm.Settings = new DxPlaySettings();\r
+            if (ProcessCommandLine(playerForm))\r
+                return;\r
+            Application.Run(playerForm);\r
+        }\r
 \r
+        private static bool ProcessCommandLine(PlayerForm playerForm) {\r
             String[] arguments = Environment.GetCommandLineArgs();\r
             if (arguments.Length > 1) {\r
                 FileInfo fi = new FileInfo(arguments[1]);\r
-                if (fi.Exists) {\r
-                    playerForm.AutoStart = true;\r
+                if (fi.Exists)\r
                     playerForm.Open(fi);\r
-                    if (playerForm.IsDisposed)\r
-                        return;\r
-                }\r
             }\r
-            Application.Run(playerForm);\r
+            return playerForm.IsDisposed;\r
         }\r
 \r
-        private static void MyHandler(object sender, UnhandledExceptionEventArgs e) {\r
-            Debug.WriteLine("Unhandled exception: " + e.ExceptionObject);\r
+        private static void LoadSettings(PlayerForm playerForm) {\r
+            FileInfo dxPlayConfig = new FileInfo(ConfigurationSerializer.Combine(DXPLAY_FILE));\r
+            if (dxPlayConfig.Exists) {\r
+                Type[] knownTypes = { typeof(TrafficMetadata) };\r
+                var settings = ConfigurationSerializer.Load<DxPlaySettings>(dxPlayConfig.FullName, knownTypes);\r
+                settings.IsStandalone = true;\r
+                playerForm.Settings = settings;\r
+                if (settings.IsMaximized)\r
+                    playerForm.WindowState = FormWindowState.Maximized;\r
+            }\r
+        }\r
+\r
+        private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e) {\r
+            logger.Error("Unhandled exception: " + e.ExceptionObject);\r
+            if (e.ExceptionObject is SEHException) {\r
+                SEHException sex = e.ExceptionObject as SEHException;\r
+                logger.Error(sex.StackTrace);\r
+            }\r
         }\r
 \r
     }\r
index 97fa846a5484a7e9581c96906ebcadf8b64743b7..c5ea5cb9fb9b5321f062097159ebf275e96d13d1 100644 (file)
@@ -26,7 +26,7 @@ using System.Runtime.CompilerServices;
 // You can specify all the values or you can default the Revision and Build Numbers \r
 // by using the '*' as shown below:\r
 \r
-[assembly: AssemblyVersion("2.0.7.0")]\r
+[assembly: AssemblyVersion("2.0.8.1")]\r
 \r
 //\r
 // In order to sign your assembly you must specify a key to use. Refer to the \r
@@ -56,5 +56,5 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyDelaySign(false)]\r
 [assembly: AssemblyKeyFile("")]\r
 [assembly: AssemblyKeyName("")]\r
-[assembly: AssemblyFileVersion("2.0.7.0")]\r
+[assembly: AssemblyFileVersion("2.0.8.1")]\r
 \r
index 34b4f6b7a9faa0fba4c4ce179db600b4e6807c9f..306c84208f42f2272ab63ac2e58bbfc191f97932 100644 (file)
@@ -19,7 +19,7 @@ namespace DxPlay {
     // class via a tool like ResGen or Visual Studio.\r
     // To add or remove a member, edit your .ResX file then rerun ResGen\r
     // with the /str option, or rebuild your VS project.\r
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]\r
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]\r
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
     internal class StringResource {\r
@@ -96,6 +96,15 @@ namespace DxPlay {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Nem tudok kapcsolódni a PlanAir rendszerhez ezen az útvonalon: {0}.\r
+        /// </summary>\r
+        internal static string ERROR_TRAFFIC_CONNECT {\r
+            get {\r
+                return ResourceManager.GetString("ERROR_TRAFFIC_CONNECT", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Hossz.\r
         /// </summary>\r
@@ -177,6 +186,24 @@ namespace DxPlay {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Nem található a PlanAir rendszer kapcsolódási információja a dxplay.json állományban..\r
+        /// </summary>\r
+        internal static string MISSING_TRAFFIC_CONFIGURATION {\r
+            get {\r
+                return ResourceManager.GetString("MISSING_TRAFFIC_CONFIGURATION", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Nem található az {0} azonosító a PlanAir rendszerben..\r
+        /// </summary>\r
+        internal static string MISSING_TRAFFIC_VARIANT {\r
+            get {\r
+                return ResourceManager.GetString("MISSING_TRAFFIC_VARIANT", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to NINCS BEMENET.\r
         /// </summary>\r
index efd48cd33ed46404454e1b3ac15ac0bbbd9eb975..18c76f4a60035dbc169037dfbd3d089b7ad7ff97 100644 (file)
   <data name="ELHAGYHATO" xml:space="preserve">\r
     <value>Elhagyható</value>\r
   </data>\r
+  <data name="ERROR_TRAFFIC_CONNECT" xml:space="preserve">\r
+    <value>Nem tudok kapcsolódni a PlanAir rendszerhez ezen az útvonalon: {0}</value>\r
+  </data>\r
   <data name="HOSSZ" xml:space="preserve">\r
     <value>Hossz</value>\r
   </data>\r
   <data name="MEGJEGYZES" xml:space="preserve">\r
     <value>Megjegyzés</value>\r
   </data>\r
+  <data name="MISSING_TRAFFIC_CONFIGURATION" xml:space="preserve">\r
+    <value>Nem található a PlanAir rendszer kapcsolódási információja a dxplay.json állományban.</value>\r
+  </data>\r
+  <data name="MISSING_TRAFFIC_VARIANT" xml:space="preserve">\r
+    <value>Nem található az {0} azonosító a PlanAir rendszerben.</value>\r
+  </data>\r
   <data name="NINCS_BEMENET" xml:space="preserve">\r
     <value>NINCS BEMENET</value>\r
   </data>\r
index d40509835204c28996481b33fdbf3aee87bf3141..f826f52f4c50700d8ecbf5936b617b0dc507958a 100644 (file)
@@ -1,3 +1,28 @@
-<?xml version="1.0" encoding="utf-8"?>\r
+<?xml version="1.0" encoding="utf-8"?>\r
 <configuration>\r
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>\r
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup>\r
+  <!--<runtime>\r
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />\r
+      </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />\r
+      </dependentAssembly>\r
+    </assemblyBinding>\r
+  </runtime>-->\r
+  <runtime>\r
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />\r
+      </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />\r
+      </dependentAssembly>\r
+    </assemblyBinding>\r
+  </runtime>\r
+</configuration>\r
index 6541637710d9c339839bd646dbcb8f987117da4c..e02c3e30a3ccba50d410b860b94ab58a0cd61656 100644 (file)
@@ -3,7 +3,7 @@
 <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">\r
   <!--Kimenetek-->\r
   <targets>\r
-    <target name="t1" xsi:type="Debugger" layout="${date:format=HH\:mm\:ss} ${level} ${logger:shortName=true} | ${message}" />\r
+    <target name="t1" xsi:type="Debugger" layout="${date:format=HH\:mm\:ss} ${level:uppercase=true} ${callsite:includeNamespace=false:includeSourcePath=false} | ${message} ${callsite:fileName=true:className=false:includeSourcePath=false:methodName=false:includeNamespace=false}" />\r
     <target name="t2" xsi:type="Debugger" layout="ERROR stack: ${stacktrace:format=Raw}" />\r
     <!--<target name="debug" xsi:type="Debugger" layout="${date:format=yyyy.MM.dd HH\:mm\:ss} ${level} ${message}" />-->\r
   </targets>\r
index 7d41141af8ddaeb525b375c367e79cbee8efb588..577b24339f8471daf6570dbf6f338871496c3ecb 100644 (file)
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <packages>\r
+  <package id="LinkDotNet.MessageBus" version="0.1.1" targetFramework="net461" />\r
+  <package id="LinkDotNet.MessageBus.Contracts" version="0.1.1" targetFramework="net461" />\r
   <package id="NLog" version="4.4.12" targetFramework="net461" />\r
 </packages>
\ No newline at end of file
index c7ada3f311e00b35faa86556295147d31e382aba..acd65b49ebe8c9cb2a8eba3b09eb7811010df81e 100644 (file)
         <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />\r
         <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />\r
       </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />\r
+      </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />\r
+      </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />\r
+      </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />\r
+      </dependentAssembly>\r
     </assemblyBinding>\r
   </runtime>\r
 </configuration>\r
similarity index 92%
rename from client/Maestro/Configuration/UJ-configuration-tqc-check.json
rename to client/Maestro/Configuration/-UJ-configuration-tqc-check.json
index d655bfec5b92f9846f05384f5d341d446a684420..e8a3d0852f877c71a9acc96381401cff7854d4db 100644 (file)
     "$type": "UNCSource",\r
     "filter": "avi,wav,mxf",\r
     "local": {\r
-      "address": "file://10.10.1.100/BRAAVOS/ARCHIVE/ONE",\r
+      "address": "file://10.10.1.100/BRAAVOS/ARCHIVE",\r
       "userName": "mediacube",\r
       "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
       "timeout": 1000\r
     },\r
     "remote": {\r
-      "address": "ftp://10.10.1.100/ARCHIVE/ONE",\r
+      "address": "ftp://10.10.1.100/ARCHIVE",\r
       "userName": "mediacube",\r
       "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
       "timeout": 1000\r
@@ -82,7 +82,7 @@
     },\r
     {\r
       "label": "Archiválás",\r
-      "processor": "FTPTargetProcessor",\r
+      "processor": "FXPTargetProcessor",\r
       "outputFormat": "%ID%",\r
       "tag": "Archiválás",\r
       "saveArchiveMetadata": true,\r
similarity index 94%
rename from client/Maestro/Configuration/-configuration-nle.json
rename to client/Maestro/Configuration/configuration-nle.json
index 393c10c081d46e6c7ef87f5950432455c7f8106c..4231532da0e60f929b9689bc7865e008faf15c70 100644 (file)
@@ -16,7 +16,7 @@
     "filter": "avi,wav,mxf",\r
     "foldersAutoExpand": true,\r
     "local": {\r
-      "address": "file://10.10.1.100/BRAAVOS/OCTOPUS"\r
+      "address": "file://c:/_video"\r
     }\r
   },\r
   "metadatas": [\r
@@ -55,7 +55,7 @@
     {\r
       "$type": "TrafficMetadata",\r
       "server": {\r
-        "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;",\r
+        "address": "Data Source=10.10.1.45;Initial Catalog=PA_Echo;Persist Security Info=True;",\r
         "userName": "MAM",\r
         "password": "7RKZYBzumKjL40SJwuwiFCvX57xuCN8zay6OttUm2wbrgImyYZBHyZTUUYrXX31Ge2Uwew07HYsqh2uzdJeDBDwcVntxaHg3nIpv9Dyq/odVoiC4tUF/K+lgvKWANcrZ",\r
         "timeout": 1000\r
index fafb41b94d737ab44f295051757ba42fb23e9cf6..4cc4969d10790bc59ef9f86783b67e5e4c9c9d3f 100644 (file)
@@ -129,10 +129,15 @@ namespace Maestro {
                     openInternal = extensions.Any(e => e != null && fileInfo.Extension.Length > 0 && fileInfo.Extension.Substring(1).ToLower().Equals(e.ToLower()));\r
 \r
                 if (openInternal) {\r
-                    PlayerForm player = new PlayerForm(ref movieSegments);\r
+                    PlayerForm player = new PlayerForm();\r
                     player.BackColor = partialColor;\r
-                    player.AutoStart = Configuration.Player.AutoStart;\r
-                    player.SegmentEditor = Configuration.Player.SegmentEditor && segmentEditor;\r
+                    player.Settings = new DxPlaySettings {\r
+                        Player = new Player {\r
+                            AutoStart = Configuration.Player.AutoStart,\r
+                            SegmentEditor = Configuration.Player.SegmentEditor && segmentEditor\r
+                        },\r
+                        Segments = movieSegments\r
+                    };\r
                     player.Open(fileInfo);\r
                     if (!player.IsDisposed)\r
                         player.ShowDialog();\r
@@ -145,11 +150,9 @@ namespace Maestro {
                     Process.Start(psf);\r
                 }\r
 \r
-            }\r
-            catch (Exception ex) {\r
+            } catch (Exception ex) {\r
                 MessageBox.Show(ex.Message);\r
-            }\r
-            finally {\r
+            } finally {\r
                 Cursor = Cursors.Default;\r
             }\r
         }\r
@@ -332,7 +335,7 @@ namespace Maestro {
                 else {\r
                     treeFolders.Nodes.Clear();\r
                     ShowFolders();\r
-                } \r
+                }\r
             } else {\r
                 if (txtSourceFilter.Text.Trim().Length > 0) {\r
                     bindingSource.Filter = txtSourceFilter.Text;\r
index 05efed3491665bf740df8a40a48948671e11513c..5471bfe43721ce3cbf409c1f270ffc9408dfaf1b 100644 (file)
@@ -93,11 +93,11 @@ namespace Maestro {
         private static readonly Logger logger = LogManager.GetCurrentClassLogger();\r
         private const string GLOBAL_JSON = "global.json";\r
         private const string AUDIORECORDER_JSON = "audiorecorder.json";\r
+        private const string DXPLAY_JSON = "dxplay.json";\r
         private const string JSON_WILDCARD = "*.json";\r
         private const string CONFIG_ERROR = "Nem található aktív konfiguráció.";\r
         private const string SYSCONFIG_ERROR = "Nem található a 'global.json' rendszer konfiguráció.";\r
         private const string SYSCONFIG_DOMAIN_ERROR = "Nem található a 'global.json' rendszer konfigurációban a tartományhitelesítő beállítása.";\r
-        private const string CONFIGURATION_FOLDER = "./Configuration";\r
         private const string DOMAIN_QUERY_ERROR = "A bejelentkezett felhasználó domain információja nem elérhető.";\r
         private const string NOSPLASH = "nosplash";\r
         private const string NOLOGIN = "nologin";\r
@@ -129,7 +129,7 @@ namespace Maestro {
                     Application.Run(splash);\r
                 });\r
             }\r
-            string[] configFiles = Directory.GetFiles(CONFIGURATION_FOLDER, JSON_WILDCARD);\r
+            string[] configFiles = Directory.GetFiles(ConfigurationSerializer.CONFIGURATION_FOLDER, JSON_WILDCARD);\r
             if (configFiles.Length == 0)\r
                 throw new Exception(CONFIG_ERROR);\r
 \r
@@ -142,11 +142,14 @@ namespace Maestro {
 \r
         private void CreateForms(string[] configFiles) {\r
             foreach (String file in configFiles) {\r
-                string audioRecorderFile = Path.Combine(CONFIGURATION_FOLDER, AUDIORECORDER_JSON);\r
-                if (file.Equals(audioRecorderFile))\r
+                string audioRecorderFile = ConfigurationSerializer.Combine(AUDIORECORDER_JSON);\r
+                if (file.ToLower().Equals(audioRecorderFile.ToLower()))\r
                     continue;\r
-                string globalFile = Path.Combine(CONFIGURATION_FOLDER, GLOBAL_JSON);\r
-                if (file.Equals(globalFile))\r
+                string dxPlayFile = ConfigurationSerializer.Combine(DXPLAY_JSON);\r
+                if (file.ToLower().Equals(dxPlayFile.ToLower()))\r
+                    continue;\r
+                string globalFile = ConfigurationSerializer.Combine(GLOBAL_JSON);\r
+                if (file.ToLower().Equals(globalFile.ToLower()))\r
                     continue;\r
                 if (Path.GetFileName(file).StartsWith(HYPHEN))\r
                     continue;\r
@@ -157,7 +160,7 @@ namespace Maestro {
         }\r
 \r
         private GlobalInfo LoadGlobalConfig(string[] files) {\r
-            string globalFile = Path.Combine(CONFIGURATION_FOLDER, GLOBAL_JSON);\r
+            string globalFile = ConfigurationSerializer.Combine(GLOBAL_JSON);\r
             if (!files.Contains(globalFile))\r
                 throw new Exception(SYSCONFIG_ERROR);\r
             return ConfigurationSerializer.Load<GlobalInfo>(globalFile);\r
@@ -179,7 +182,7 @@ namespace Maestro {
         }\r
 \r
         private void CheckUser() {\r
-            string globalFile = Path.Combine(CONFIGURATION_FOLDER, GLOBAL_JSON);\r
+            string globalFile = ConfigurationSerializer.Combine(GLOBAL_JSON);\r
             string domainName = GlobalConfig?.UserDomain?.Address?.ToString();\r
             if (String.IsNullOrEmpty(domainName))\r
                 throw new Exception(SYSCONFIG_DOMAIN_ERROR);\r
index d40509835204c28996481b33fdbf3aee87bf3141..55470653636baab0ce6a81928a2e412d25b827ee 100644 (file)
@@ -1,3 +1,16 @@
-<?xml version="1.0" encoding="utf-8"?>\r
+<?xml version="1.0" encoding="utf-8"?>\r
 <configuration>\r
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>\r
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup>\r
+  <runtime>\r
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />\r
+      </dependentAssembly>\r
+      <dependentAssembly>\r
+        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />\r
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />\r
+      </dependentAssembly>\r
+    </assemblyBinding>\r
+  </runtime>\r
+</configuration>\r
index f273ac687453750c14e112d9a5a7b30f3da25c63..434960740e4a5ddd9512585bd4c7a4b6aa71f69f 100644 (file)
@@ -6,12 +6,25 @@ using System.Drawing;
 using System.ComponentModel;\r
 using Newtonsoft.Json.Serialization;\r
 using MaestroShared.Commons;\r
+using Newtonsoft.Json.Linq;\r
+using System.Runtime.Serialization;\r
 \r
 namespace MaestroShared.Configuration {\r
 \r
     public class ConfigurationSerializer {\r
+        public const string CONFIGURATION_FOLDER = "./Configuration";\r
+\r
+        public static string Combine(string fileName) {\r
+            return Path.Combine(CONFIGURATION_FOLDER, fileName);\r
+        }\r
+\r
         private static Type[] MinimalKnownTypes = { typeof(UNCSource), typeof(NEXIOSource), typeof(OctopusMetadata), typeof(TrafficMetadata), typeof(MediaCubeMetadata) };\r
 \r
+        public static JObject Load(string fileName) {\r
+            string configuration = File.ReadAllText(fileName);\r
+            return JObject.Parse(configuration);\r
+        }\r
+\r
         public static T Load<T>(string fileName, Type[] currentKnownTypes = null) {\r
             KnownTypesBinder knownTypesBinder = new KnownTypesBinder {\r
                 KnownTypes = currentKnownTypes ?? MinimalKnownTypes\r
@@ -174,4 +187,26 @@ namespace MaestroShared.Configuration {
         public string MetadataTitleFormat { get; set; }\r
         public string MetadataIDFormat { get; set; }\r
     }\r
+\r
+    public class UISettings {\r
+        public string UIFileName { get; set; }\r
+        public JObject UIStrings { get; set; }\r
+\r
+\r
+        public string Resource(string name, string defaultValue) {\r
+            string result = UIStrings?[name]?.Value<string>();\r
+            return result ?? defaultValue;\r
+        }\r
+\r
+        [OnDeserialized]\r
+        private void OnDeserialized(StreamingContext context) {\r
+            if (UIFileName != null) {\r
+                string fileName = ConfigurationSerializer.Combine(UIFileName);\r
+                FileInfo fi = new FileInfo(fileName);\r
+                if (fi.Exists) {\r
+                    UIStrings = ConfigurationSerializer.Load(fileName);\r
+                }\r
+            }\r
+        }\r
+    }\r
 }\r
diff --git a/client/MaestroShared/Controls/FlatTabControl.cs b/client/MaestroShared/Controls/FlatTabControl.cs
new file mode 100644 (file)
index 0000000..1a49703
--- /dev/null
@@ -0,0 +1,519 @@
+using System;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using System.Drawing.Design;\r
+using System.ComponentModel.Design;\r
+\r
+namespace MaestroShared.Controls\r
+{\r
+       /// <summary>\r
+       /// Summary description for FlatTabControl.\r
+       /// </summary>\r
+       [ToolboxBitmap(typeof(System.Windows.Forms.TabControl))] //,\r
+               //Designer(typeof(Designers.FlatTabControlDesigner))]\r
+       \r
+       public class FlatTabControl : System.Windows.Forms.TabControl\r
+       {\r
+\r
+               /// <summary> \r
+               /// Required designer variable.\r
+               /// </summary>\r
+               private System.ComponentModel.Container components = null;\r
+               private SubClass scUpDown = null;\r
+               private bool bUpDown; // true when the button UpDown is required\r
+               private ImageList leftRightImages = null;\r
+               private const int nMargin = 5;\r
+               private Color mBackColor = SystemColors.Control;\r
+\r
+               public FlatTabControl()\r
+               {\r
+                       // This call is required by the Windows.Forms Form Designer.\r
+                       InitializeComponent();\r
+\r
+                       // double buffering\r
+                       this.SetStyle(ControlStyles.UserPaint, true);\r
+                       this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);\r
+                       this.SetStyle(ControlStyles.DoubleBuffer, true);\r
+                       this.SetStyle(ControlStyles.ResizeRedraw, true);\r
+                       this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);\r
+\r
+                       bUpDown = false;\r
+\r
+                       this.ControlAdded += new ControlEventHandler(FlatTabControl_ControlAdded);\r
+                       this.ControlRemoved += new ControlEventHandler(FlatTabControl_ControlRemoved);\r
+                       this.SelectedIndexChanged += new EventHandler(FlatTabControl_SelectedIndexChanged);\r
+\r
+                       leftRightImages = new ImageList();\r
+                       //leftRightImages.ImageSize = new Size(16, 16); // default\r
+\r
+                       System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FlatTabControl));\r
+                       Bitmap updownImage = ((System.Drawing.Bitmap)(resources.GetObject("TabIcons.bmp")));\r
+                       \r
+                       if (updownImage != null)\r
+                       {\r
+                               updownImage.MakeTransparent(Color.White);\r
+                               leftRightImages.Images.AddStrip(updownImage);\r
+                       }\r
+               }\r
+\r
+               /// <summary> \r
+               /// Clean up any resources being used.\r
+               /// </summary>\r
+               protected override void Dispose( bool disposing )\r
+               {\r
+                       if( disposing )\r
+                       {\r
+                               if(components != null)\r
+                               {\r
+                                       components.Dispose();\r
+                               }\r
+\r
+                               leftRightImages.Dispose();\r
+                       }\r
+                       base.Dispose( disposing );\r
+               }\r
+\r
+               protected override void OnPaint(PaintEventArgs e)\r
+               {\r
+                       base.OnPaint(e); \r
+                       \r
+                       DrawControl(e.Graphics);\r
+               }\r
+\r
+               internal void DrawControl(Graphics g)\r
+               {\r
+                       if (!Visible)\r
+                               return;\r
+\r
+                       Rectangle TabControlArea = this.ClientRectangle;\r
+                       Rectangle TabArea = this.DisplayRectangle;\r
+\r
+                       //----------------------------\r
+                       // fill client area\r
+                       Brush br = new SolidBrush(mBackColor); //(SystemColors.Control); UPDATED\r
+                       g.FillRectangle(br, TabControlArea);\r
+                       br.Dispose();\r
+                       //----------------------------\r
+\r
+                       //----------------------------\r
+                       // draw border\r
+                       int nDelta = SystemInformation.Border3DSize.Width;\r
+\r
+                       Pen border = new Pen(SystemColors.ControlDark);\r
+                       TabArea.Inflate(nDelta, nDelta);\r
+                       g.DrawRectangle(border, TabArea);\r
+                       border.Dispose();\r
+                       //----------------------------\r
+\r
+\r
+                       //----------------------------\r
+                       // clip region for drawing tabs\r
+                       Region rsaved = g.Clip;\r
+                       Rectangle rreg;\r
+\r
+                       int nWidth = TabArea.Width + nMargin;\r
+                       if (bUpDown)\r
+                       {\r
+                               // exclude updown control for painting\r
+                               if (Win32.IsWindowVisible(scUpDown.Handle))\r
+                               {\r
+                                       Rectangle rupdown = new Rectangle();\r
+                                       Win32.GetWindowRect(scUpDown.Handle, ref rupdown);\r
+                                       Rectangle rupdown2 = this.RectangleToClient(rupdown);\r
+\r
+                                       nWidth = rupdown2.X;\r
+                               }\r
+                       }\r
+\r
+                       rreg = new Rectangle(TabArea.Left, TabControlArea.Top, nWidth - nMargin, TabControlArea.Height);\r
+\r
+                       g.SetClip(rreg);\r
+\r
+                       // draw tabs\r
+                       for (int i = 0; i < this.TabCount; i++)\r
+                               DrawTab(g, this.TabPages[i], i);\r
+\r
+                       g.Clip = rsaved;\r
+                       //----------------------------\r
+\r
+\r
+                       //----------------------------\r
+                       // draw background to cover flat border areas\r
+                       if (this.SelectedTab != null)\r
+                       {\r
+                               TabPage tabPage = this.SelectedTab;\r
+                               Color color = tabPage.BackColor;\r
+                               border = new Pen(color);\r
+                               \r
+                               TabArea.Offset(1, 1);\r
+                               TabArea.Width -= 2;\r
+                               TabArea.Height -= 2;\r
+                               \r
+                               g.DrawRectangle(border, TabArea);\r
+                               TabArea.Width -= 1;\r
+                               TabArea.Height -= 1;\r
+                               g.DrawRectangle(border, TabArea);\r
+\r
+                               border.Dispose();\r
+                       }\r
+                       //----------------------------\r
+               }\r
+\r
+               internal void DrawTab(Graphics g, TabPage tabPage, int nIndex)\r
+               {\r
+                       Rectangle recBounds = this.GetTabRect(nIndex);\r
+                       RectangleF tabTextArea = (RectangleF)this.GetTabRect(nIndex);\r
+\r
+                       bool bSelected = (this.SelectedIndex == nIndex);\r
+\r
+                       Point[] pt = new Point[7];\r
+                       if (this.Alignment == TabAlignment.Top)\r
+                       {\r
+                               pt[0] = new Point(recBounds.Left, recBounds.Bottom);\r
+                               pt[1] = new Point(recBounds.Left, recBounds.Top + 3);\r
+                               pt[2] = new Point(recBounds.Left + 3, recBounds.Top);\r
+                               pt[3] = new Point(recBounds.Right - 3, recBounds.Top);\r
+                               pt[4] = new Point(recBounds.Right, recBounds.Top + 3);\r
+                               pt[5] = new Point(recBounds.Right, recBounds.Bottom);\r
+                               pt[6] = new Point(recBounds.Left, recBounds.Bottom);\r
+                       }\r
+                       else\r
+                       {\r
+                               pt[0] = new Point(recBounds.Left, recBounds.Top);\r
+                               pt[1] = new Point(recBounds.Right, recBounds.Top);\r
+                               pt[2] = new Point(recBounds.Right, recBounds.Bottom - 3);\r
+                               pt[3] = new Point(recBounds.Right - 3, recBounds.Bottom);\r
+                               pt[4] = new Point(recBounds.Left + 3, recBounds.Bottom);\r
+                               pt[5] = new Point(recBounds.Left, recBounds.Bottom - 3);\r
+                               pt[6] = new Point(recBounds.Left, recBounds.Top);\r
+                       }\r
+\r
+                       //----------------------------\r
+                       // fill this tab with background color\r
+                       Brush br = new SolidBrush(tabPage.BackColor);\r
+                       g.FillPolygon(br, pt);\r
+                       br.Dispose();\r
+                       //----------------------------\r
+\r
+                       //----------------------------\r
+                       // draw border\r
+                       //g.DrawRectangle(SystemPens.ControlDark, recBounds);\r
+                       g.DrawPolygon(SystemPens.ControlDark, pt);\r
+\r
+                       if (bSelected)\r
+                       {\r
+                               //----------------------------\r
+                               // clear bottom lines\r
+                               Pen pen = new Pen(tabPage.BackColor);\r
+\r
+                               switch (this.Alignment)\r
+                               {\r
+                                       case TabAlignment.Top:\r
+                                               g.DrawLine(pen, recBounds.Left + 1, recBounds.Bottom, recBounds.Right - 1, recBounds.Bottom);\r
+                                               g.DrawLine(pen, recBounds.Left + 1, recBounds.Bottom+1, recBounds.Right - 1, recBounds.Bottom+1);\r
+                                               break;\r
+\r
+                                       case TabAlignment.Bottom:\r
+                                               g.DrawLine(pen, recBounds.Left + 1, recBounds.Top, recBounds.Right - 1, recBounds.Top);\r
+                                               g.DrawLine(pen, recBounds.Left + 1, recBounds.Top-1, recBounds.Right - 1, recBounds.Top-1);\r
+                                               g.DrawLine(pen, recBounds.Left + 1, recBounds.Top-2, recBounds.Right - 1, recBounds.Top-2);\r
+                                               break;\r
+                               }\r
+                               \r
+                               pen.Dispose();\r
+                               //----------------------------\r
+                       }\r
+                       //----------------------------\r
+\r
+                       //----------------------------\r
+                       // draw tab's icon\r
+                       if ((tabPage.ImageIndex >= 0) && (ImageList != null) && (ImageList.Images[tabPage.ImageIndex] != null))\r
+                       {\r
+                               int nLeftMargin = 8;\r
+                               int nRightMargin = 2;\r
+\r
+                               Image img = ImageList.Images[tabPage.ImageIndex];\r
+                               \r
+                               Rectangle rimage = new Rectangle(recBounds.X + nLeftMargin, recBounds.Y + 1, img.Width, img.Height);\r
+                               \r
+                               // adjust rectangles\r
+                               float nAdj = (float)(nLeftMargin + img.Width + nRightMargin);\r
+\r
+                               rimage.Y += (recBounds.Height - img.Height) / 2;\r
+                               tabTextArea.X += nAdj;\r
+                               tabTextArea.Width -= nAdj;\r
+\r
+                               // draw icon\r
+                               g.DrawImage(img, rimage);\r
+                       }\r
+                       //----------------------------\r
+\r
+                       //----------------------------\r
+                       // draw string\r
+                       StringFormat stringFormat = new StringFormat();\r
+                       stringFormat.Alignment = StringAlignment.Center;  \r
+                       stringFormat.LineAlignment = StringAlignment.Center;\r
+\r
+                       br = new SolidBrush(tabPage.ForeColor);\r
+\r
+                       g.DrawString(tabPage.Text, Font, br, tabTextArea, stringFormat);\r
+                       //----------------------------\r
+               }\r
+\r
+               internal void DrawIcons(Graphics g)\r
+               {\r
+                       if ((leftRightImages == null) || (leftRightImages.Images.Count != 4))\r
+                               return;\r
+\r
+                       //----------------------------\r
+                       // calc positions\r
+                       Rectangle TabControlArea = this.ClientRectangle;\r
+\r
+                       Rectangle r0 = new Rectangle();\r
+                       Win32.GetClientRect(scUpDown.Handle, ref r0);\r
+\r
+                       Brush br = new SolidBrush(SystemColors.Control);\r
+                       g.FillRectangle(br, r0);\r
+                       br.Dispose();\r
+                       \r
+                       Pen border = new Pen(SystemColors.ControlDark);\r
+                       Rectangle rborder = r0;\r
+                       rborder.Inflate(-1, -1);\r
+                       g.DrawRectangle(border, rborder);\r
+                       border.Dispose();\r
+\r
+                       int nMiddle = (r0.Width / 2);\r
+                       int nTop = (r0.Height - 16) / 2;\r
+                       int nLeft = (nMiddle - 16) / 2;\r
+\r
+                       Rectangle r1 = new Rectangle(nLeft, nTop, 16, 16);\r
+                       Rectangle r2 = new Rectangle(nMiddle+nLeft, nTop, 16, 16);\r
+                       //----------------------------\r
+\r
+                       //----------------------------\r
+                       // draw buttons\r
+                       Image img = leftRightImages.Images[1];\r
+                       if (img != null)\r
+                       {\r
+                               if (this.TabCount > 0)\r
+                               {\r
+                                       Rectangle r3 = this.GetTabRect(0);\r
+                                       if (r3.Left < TabControlArea.Left)\r
+                                               g.DrawImage(img, r1);\r
+                                       else\r
+                                       {\r
+                                               img = leftRightImages.Images[3];\r
+                                               if (img != null)\r
+                                                       g.DrawImage(img, r1);\r
+                                       }\r
+                               }\r
+                       }\r
+\r
+                       img = leftRightImages.Images[0];\r
+                       if (img != null)\r
+                       {\r
+                               if (this.TabCount > 0)\r
+                               {\r
+                                       Rectangle r3 = this.GetTabRect(this.TabCount - 1);\r
+                                       if (r3.Right > (TabControlArea.Width - r0.Width))\r
+                                               g.DrawImage(img, r2);\r
+                                       else\r
+                                       {\r
+                                               img = leftRightImages.Images[2];\r
+                                               if (img != null)\r
+                                                       g.DrawImage(img, r2);\r
+                                       }\r
+                               }\r
+                       }\r
+                       //----------------------------\r
+               }\r
+\r
+               protected override void OnCreateControl()\r
+               {\r
+                       base.OnCreateControl();\r
+\r
+                       FindUpDown();\r
+               }\r
+\r
+               private void FlatTabControl_ControlAdded(object sender, ControlEventArgs e)\r
+               {\r
+                       FindUpDown();\r
+                       UpdateUpDown();\r
+               }\r
+\r
+               private void FlatTabControl_ControlRemoved(object sender, ControlEventArgs e)\r
+               {\r
+                       FindUpDown();\r
+                       UpdateUpDown();\r
+               }\r
+\r
+               private void FlatTabControl_SelectedIndexChanged(object sender, EventArgs e)\r
+               {\r
+                       UpdateUpDown();\r
+                       Invalidate();   // we need to update border and background colors\r
+               }\r
+\r
+               private void FindUpDown()\r
+               {\r
+                       bool bFound = false;\r
+\r
+                       // find the UpDown control\r
+                       IntPtr pWnd = Win32.GetWindow(this.Handle, Win32.GW_CHILD);\r
+                       \r
+                       while (pWnd != IntPtr.Zero)\r
+                       {\r
+                               //----------------------------\r
+                               // Get the window class name\r
+                               char[] className = new char[33];\r
+\r
+                               int length = Win32.GetClassName(pWnd, className, 32);\r
+\r
+                               string s = new string(className, 0, length);\r
+                               //----------------------------\r
+\r
+                               if (s == "msctls_updown32")\r
+                               {\r
+                                       bFound = true;\r
+\r
+                                       if (!bUpDown)\r
+                                       {\r
+                                               //----------------------------\r
+                                               // Subclass it\r
+                                               this.scUpDown = new SubClass(pWnd, true);\r
+                                               this.scUpDown.SubClassedWndProc += new SubClass.SubClassWndProcEventHandler(scUpDown_SubClassedWndProc);\r
+                                               //----------------------------\r
+\r
+                                               bUpDown = true;\r
+                                       }\r
+                                       break;\r
+                               }\r
+                               \r
+                               pWnd = Win32.GetWindow(pWnd, Win32.GW_HWNDNEXT);\r
+                       }\r
+\r
+                       if ((!bFound) && (bUpDown))\r
+                               bUpDown = false;\r
+               }\r
+\r
+               private void UpdateUpDown()\r
+               {\r
+                       if (bUpDown)\r
+                       {\r
+                               if (Win32.IsWindowVisible(scUpDown.Handle))\r
+                               {\r
+                                       Rectangle rect = new Rectangle();\r
+\r
+                                       Win32.GetClientRect(scUpDown.Handle, ref rect);\r
+                                       Win32.InvalidateRect(scUpDown.Handle, ref rect, true);\r
+                               }\r
+                       }\r
+               }\r
+\r
+               #region scUpDown_SubClassedWndProc Event Handler\r
+\r
+               private int scUpDown_SubClassedWndProc(ref Message m) \r
+               {\r
+                       switch (m.Msg)\r
+                       {\r
+                               case Win32.WM_PAINT:\r
+                               {\r
+                                       //------------------------\r
+                                       // redraw\r
+                                       IntPtr hDC = Win32.GetWindowDC(scUpDown.Handle);\r
+                                       Graphics g = Graphics.FromHdc(hDC);\r
+\r
+                                       DrawIcons(g);\r
+\r
+                                       g.Dispose();\r
+                                       Win32.ReleaseDC(scUpDown.Handle, hDC);\r
+                                       //------------------------\r
+\r
+                                       // return 0 (processed)\r
+                                       m.Result = IntPtr.Zero;\r
+\r
+                                       //------------------------\r
+                                       // validate current rect\r
+                                       Rectangle rect = new Rectangle();\r
+\r
+                                       Win32.GetClientRect(scUpDown.Handle, ref rect);\r
+                                       Win32.ValidateRect(scUpDown.Handle, ref rect);\r
+                                       //------------------------\r
+                               }\r
+                               return 1;\r
+                       }\r
+\r
+                       return 0;\r
+               }\r
+               #endregion\r
+\r
+               #region Component Designer generated code\r
+               /// <summary>\r
+               /// Required method for Designer support - do not modify \r
+               /// the contents of this method with the code editor.\r
+               /// </summary>\r
+               private void InitializeComponent()\r
+               {\r
+                       components = new System.ComponentModel.Container();\r
+               }\r
+\r
+\r
+               #endregion\r
+\r
+               #region Properties\r
+               \r
+               [Editor(typeof(TabpageExCollectionEditor), typeof(UITypeEditor))]\r
+               public new TabPageCollection TabPages\r
+               {\r
+                       get\r
+                       {\r
+                               return base.TabPages;\r
+                       }\r
+               }\r
+\r
+               new public TabAlignment Alignment\r
+               {\r
+                       get {return base.Alignment;}\r
+                       set {\r
+                               TabAlignment ta = value;\r
+                               if ((ta != TabAlignment.Top) && (ta != TabAlignment.Bottom))\r
+                                       ta = TabAlignment.Top;\r
+                               \r
+                               base.Alignment = ta;}\r
+               }\r
+\r
+               [Browsable(false)]\r
+               new public bool Multiline\r
+               {\r
+                       get {return base.Multiline;}\r
+                       set {base.Multiline = false;}\r
+               }\r
+\r
+               [Browsable(true)]\r
+               new public Color myBackColor\r
+               {\r
+                       get {return mBackColor;}\r
+                       set {mBackColor = value; this.Invalidate();}\r
+               }\r
+\r
+               #endregion\r
+\r
+               #region TabpageExCollectionEditor\r
+\r
+               internal class TabpageExCollectionEditor : CollectionEditor\r
+               {\r
+                       public TabpageExCollectionEditor(System.Type type): base(type)\r
+                       {\r
+                       }\r
+            \r
+                       protected override Type CreateCollectionItemType()\r
+                       {\r
+                               return typeof(TabPage);\r
+                       }\r
+               }\r
+        \r
+               #endregion\r
+       }\r
+\r
+       //#endregion\r
+}\r
diff --git a/client/MaestroShared/Controls/FlatTabControl.resx b/client/MaestroShared/Controls/FlatTabControl.resx
new file mode 100644 (file)
index 0000000..07f3962
--- /dev/null
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 1.3\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">1.3</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1">this is my long string</data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        [base64 mime encoded serialized .NET Framework object]\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        [base64 mime encoded string representing a byte array form of the .NET Framework object]\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used forserialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>1.3</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <data name="TabIcons.bmp" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        Qk02DAAAAAAAADYAAAAoAAAAQAAAABAAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////kEgg////////\r
+        ////////////////////////////////////////////////////////////4IhQ////////////////\r
+        ////////////////////////////////////////S0tL////////////////////////////////////\r
+        ////////////////////////////////hYWF////////////////////////////////////////////\r
+        ////kFAw0Ggw////////////////////////////////////////////////////////////4Ihg0IBQ\r
+        ////////////////////////////////////////////////////////UVFRampq////////////////\r
+        ////////////////////////////////////////////h4eHfn5+////////////////////////////\r
+        ////////////////////oFAw8Ggg0GAw////////////////////////////////////////////////\r
+        ////4Ihg/8Cg0HhQ////////////////////////////////////////////////////////U1NTbW1t\r
+        ZGRk////////////////////////////////////////////////////h4eHvb29eHh4////////////\r
+        ////////////////////////////oFgwoFgwoFgw8Ggg8HAw0Ggw////////////////////////////\r
+        ////////////////4Ihg/8Cg/5hw0HhQ0HhQ0HhQ////////////////////////////////////////\r
+        WVlZWVlZWFhYbW1tdHR0ampq////////////////////////////////////////////h4eHvb29mJiY\r
+        eHh4eHh4eHh4////////////////////////////////sGBA8HAw8HAw8HAw8IhQ/6Bg4HBA////////\r
+        ////////////////////////////4IhQ/8Cg/7CA/4hQ/4BA8HAwwHBA////////////////////////\r
+        ////////////////YmJic3NzdHR0c3Nzh4eHnJycc3Nz////////////////////////////////////\r
+        hYWFvb29rKysiYmJgoKCdHR0bm5u////////////////////////////////sGhA8HAw8HAw/4BA/6Bw\r
+        /7CQ/8Cg4IhQ////////////////////////////4IhQ/8Cg/7CQ/6Bw/4BA8HAw8HAwsGhA////////\r
+        ////////////////////////////////Z2dnc3NzdHR0goKCnp6erq6uvLy8hYWF////////////////\r
+        ////////////hoaGvb29rq6unp6egoKCdHR0c3NzaGho////////////////////////////////wHBA\r
+        8HAw/4BA/4hQ/7CA/8Cg4IhQ////////////////////////////////////4HBA/6Bg8IhQ8HAw8HAw\r
+        8HAwsGBA////////////////////////////////////////b29vdHR0goKCiYmJrKysvb29hYWF////\r
+        ////////////////////////////////c3NznJych4eHc3Nzc3Nzc3NzYmJi////////////////////\r
+        ////////////0HhQ0HhQ0HhQ/5hw/8Cg4Ihg////////////////////////////////////////////\r
+        0Ggw8HAw8GggoFgwoFgwoFgw////////////////////////////////////////eXl5eHh4eHh4mZmZ\r
+        vb29h4eH////////////////////////////////////////////ampqdHR0bm5uWVlZWFhYWVlZ////\r
+        ////////////////////////////////////0HhQ/8Cg4Ihg////////////////////////////////\r
+        ////////////////////0GAw8GggoFAw////////////////////////////////////////////////\r
+        ////////eHh4vb29iIiI////////////////////////////////////////////////////ZGRkbW1t\r
+        VFRU////////////////////////////////////////////////0IBQ4Ihg////////////////////\r
+        ////////////////////////////////////////0GgwkFAw////////////////////////////////\r
+        ////////////////////////fn5+h4eH////////////////////////////////////////////////\r
+        ////////////aWlpUVFR////////////////////////////////////////////////4IhQ////////\r
+        ////////////////////////////////////////////////////////////kEgg////////////////\r
+        ////////////////////////////////////////hYWF////////////////////////////////////\r
+        ////////////////////////////////SkpK////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////////////////////////////////////////////////////////////////////////////\r
+        ////////\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
diff --git a/client/MaestroShared/Controls/Win32.cs b/client/MaestroShared/Controls/Win32.cs
new file mode 100644 (file)
index 0000000..cff6367
--- /dev/null
@@ -0,0 +1,182 @@
+using System;\r
+using System.Drawing;\r
+using System.Windows.Forms;\r
+using System.Runtime.InteropServices;\r
+\r
+namespace MaestroShared.Controls\r
+{\r
+       internal class Win32\r
+       {\r
+               /*\r
+                * GetWindow() Constants\r
+                */\r
+               public const int GW_HWNDFIRST                   = 0;\r
+               public const int GW_HWNDLAST                    = 1;\r
+               public const int GW_HWNDNEXT                    = 2;\r
+               public const int GW_HWNDPREV                    = 3;\r
+               public const int GW_OWNER                               = 4;\r
+               public const int GW_CHILD                               = 5;\r
+\r
+               public const int WM_NCCALCSIZE                  = 0x83;\r
+               public const int WM_WINDOWPOSCHANGING   = 0x46;\r
+               public const int WM_PAINT                               = 0xF;\r
+               public const int WM_CREATE                              = 0x1;\r
+               public const int WM_NCCREATE                    = 0x81;\r
+               public const int WM_NCPAINT                             = 0x85;\r
+               public const int WM_PRINT                               = 0x317;\r
+               public const int WM_DESTROY                             = 0x2;\r
+               public const int WM_SHOWWINDOW                  = 0x18;\r
+               public const int WM_SHARED_MENU                 = 0x1E2;\r
+               public const int HC_ACTION                              = 0;\r
+               public const int WH_CALLWNDPROC                 = 4;\r
+               public const int GWL_WNDPROC                    = -4;\r
+\r
+               public Win32()\r
+               {\r
+                       //\r
+                       // TODO: Add constructor logic here\r
+                       //\r
+               }\r
+\r
+               [DllImport("User32.dll",CharSet = CharSet.Auto)]\r
+               public static extern IntPtr GetWindowDC(IntPtr handle);\r
+\r
+               [DllImport("User32.dll",CharSet = CharSet.Auto)]\r
+               public static extern IntPtr ReleaseDC(IntPtr handle, IntPtr hDC);\r
+\r
+               [DllImport("Gdi32.dll",CharSet = CharSet.Auto)]\r
+               public static extern IntPtr CreateCompatibleDC(IntPtr hdc);\r
+\r
+               [DllImport("User32.dll",CharSet = CharSet.Auto)]\r
+               public static extern int GetClassName(IntPtr hwnd, char[] className, int maxCount);\r
+\r
+               [DllImport("User32.dll",CharSet = CharSet.Auto)]\r
+               public static extern IntPtr GetWindow(IntPtr hwnd, int uCmd);\r
+\r
+               [DllImport("User32.dll",CharSet = CharSet.Auto)]\r
+               public static extern bool IsWindowVisible(IntPtr hwnd);\r
+\r
+               [DllImport("user32",CharSet = CharSet.Auto)]\r
+               public static extern int GetClientRect(IntPtr hwnd, ref RECT lpRect);\r
+\r
+               [DllImport("user32",CharSet = CharSet.Auto)]\r
+               public static extern int GetClientRect(IntPtr hwnd, [In, Out] ref Rectangle rect);\r
+\r
+               [DllImport("user32",CharSet = CharSet.Auto)]\r
+               public static extern bool MoveWindow(IntPtr hwnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);\r
+\r
+               [DllImport("user32",CharSet = CharSet.Auto)]\r
+               public static extern bool UpdateWindow(IntPtr hwnd);\r
+\r
+               [DllImport("user32",CharSet = CharSet.Auto)]\r
+               public static extern bool InvalidateRect(IntPtr hwnd, ref Rectangle rect, bool bErase);\r
+\r
+               [DllImport("user32",CharSet = CharSet.Auto)]\r
+               public static extern bool ValidateRect(IntPtr hwnd, ref Rectangle rect);\r
+\r
+               [DllImport("user32.dll",CharSet = CharSet.Auto)]\r
+               internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref Rectangle rect);\r
+\r
+               [StructLayout(LayoutKind.Sequential)]\r
+                       public struct RECT \r
+               {\r
+                       public int Left;\r
+                       public int Top;\r
+                       public int Right;\r
+                       public int Bottom;\r
+               }\r
+\r
+               [StructLayout(LayoutKind.Sequential)]\r
+               public struct WINDOWPOS\r
+               {\r
+                       public IntPtr hwnd;\r
+                       public IntPtr hwndAfter;\r
+                       public int x;\r
+                       public int y;\r
+                       public int cx;\r
+                       public int cy;\r
+                       public uint flags;\r
+               }\r
+\r
+               [StructLayout(LayoutKind.Sequential)]\r
+                       public struct NCCALCSIZE_PARAMS\r
+               {\r
+                       public RECT rgc;\r
+                       public WINDOWPOS wndpos;\r
+               }\r
+       }\r
+\r
+       #region SubClass Classing Handler Class\r
+       internal class SubClass : System.Windows.Forms.NativeWindow\r
+       {\r
+               public delegate int SubClassWndProcEventHandler(ref System.Windows.Forms.Message m);\r
+               public event SubClassWndProcEventHandler SubClassedWndProc;\r
+               private bool IsSubClassed = false;\r
+\r
+               public SubClass(IntPtr Handle, bool _SubClass)\r
+               {\r
+                       base.AssignHandle(Handle);\r
+                       this.IsSubClassed = _SubClass;\r
+               }\r
+\r
+               public bool SubClassed\r
+               {\r
+                       get{ return this.IsSubClassed; }\r
+                       set{ this.IsSubClassed = value; }\r
+               }\r
+\r
+               protected override void WndProc(ref Message m) \r
+               {\r
+                       if (this.IsSubClassed)\r
+                       {\r
+                               if (OnSubClassedWndProc(ref m) != 0)\r
+                                       return;\r
+                       }\r
+                       base.WndProc(ref m);\r
+               }\r
+\r
+               public void CallDefaultWndProc(ref Message m)\r
+               {\r
+                       base.WndProc(ref m);\r
+               }\r
+\r
+               #region HiWord Message Cracker\r
+               public int HiWord(int Number) \r
+               {\r
+                       return ((Number >> 16) & 0xffff);\r
+               }\r
+               #endregion\r
+\r
+               #region LoWord Message Cracker\r
+               public int LoWord(int Number) \r
+               {\r
+                       return (Number & 0xffff);\r
+               }\r
+               #endregion\r
+\r
+               #region MakeLong Message Cracker\r
+               public int MakeLong(int LoWord, int HiWord) \r
+               { \r
+                       return (HiWord << 16) | (LoWord & 0xffff); \r
+               } \r
+               #endregion\r
\r
+               #region MakeLParam Message Cracker\r
+               public IntPtr MakeLParam(int LoWord, int HiWord) \r
+               { \r
+                       return (IntPtr) ((HiWord << 16) | (LoWord & 0xffff)); \r
+               } \r
+               #endregion\r
+\r
+               private int OnSubClassedWndProc(ref Message m)\r
+               {\r
+                       if (SubClassedWndProc != null)\r
+                       {\r
+                               return this.SubClassedWndProc(ref m);\r
+                       }\r
+\r
+                       return 0;\r
+               }\r
+       }\r
+       #endregion\r
+}\r
index e3f83c2b0eb64e0e2c09bd5a6a5763aaa0aa7add..4169050f9c1a3c1719befe87122070e1c8c08bcf 100644 (file)
@@ -66,6 +66,7 @@
     </Reference>\r
     <Reference Include="System" />\r
     <Reference Include="System.Core" />\r
+    <Reference Include="System.Design" />\r
     <Reference Include="System.Drawing" />\r
     <Reference Include="System.IO.Compression.FileSystem" />\r
     <Reference Include="System.Numerics" />\r
     <Compile Include="Controls\ColorSlider.designer.cs">\r
       <DependentUpon>ColorSlider.cs</DependentUpon>\r
     </Compile>\r
+    <Compile Include="Controls\FlatTabControl.cs">\r
+      <SubType>Component</SubType>\r
+    </Compile>\r
     <Compile Include="Controls\NoFocusCueButton.cs">\r
       <SubType>Component</SubType>\r
     </Compile>\r
+    <Compile Include="Controls\Win32.cs" />\r
     <Compile Include="Metadata\MetadataType.cs" />\r
     <Compile Include="Metadata\MovieSegment.cs" />\r
     <Compile Include="Metadata\Timecode.cs" />\r
     <EmbeddedResource Include="Controls\ColorSlider.resx">\r
       <DependentUpon>ColorSlider.cs</DependentUpon>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="Controls\FlatTabControl.resx" />\r
     <EmbeddedResource Include="Properties\Resources.resx">\r
       <Generator>PublicResXFileCodeGenerator</Generator>\r
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
   <ItemGroup>\r
     <None Include="Resources\ic_search_black_24dp_1x.png" />\r
   </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_chevron_right_black_18dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_arrow_downward_black_18dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_close_black_18dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_ondemand_video_black_18dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_chevron_left_black_18dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_playlist_add_check_black_18dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\baseline_playlist_add_check_black_36dp.png" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <None Include="Resources\round_publish_black_24dp.png" />\r
+  </ItemGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
 </Project>
\ No newline at end of file
index e2bf6c44ab351aa99f83fa2e4790524923916fac..15edbb2a8a1847a02f9b7cd586b32587df5ee52c 100644 (file)
@@ -60,6 +60,56 @@ namespace MaestroShared.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
+        /// </summary>\r
+        public static System.Drawing.Bitmap baseline_arrow_downward_black_18dp {\r
+            get {\r
+                object obj = ResourceManager.GetObject("baseline_arrow_downward_black_18dp", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
+        /// </summary>\r
+        public static System.Drawing.Bitmap baseline_chevron_left_black_18dp {\r
+            get {\r
+                object obj = ResourceManager.GetObject("baseline_chevron_left_black_18dp", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
+        /// </summary>\r
+        public static System.Drawing.Bitmap baseline_chevron_right_black_18dp {\r
+            get {\r
+                object obj = ResourceManager.GetObject("baseline_chevron_right_black_18dp", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
+        /// </summary>\r
+        public static System.Drawing.Bitmap baseline_close_black_18dp {\r
+            get {\r
+                object obj = ResourceManager.GetObject("baseline_close_black_18dp", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
+        /// </summary>\r
+        public static System.Drawing.Bitmap baseline_ondemand_video_black_18dp {\r
+            get {\r
+                object obj = ResourceManager.GetObject("baseline_ondemand_video_black_18dp", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
         /// </summary>\r
@@ -189,5 +239,15 @@ namespace MaestroShared.Properties {
                 return ((System.Drawing.Bitmap)(obj));\r
             }\r
         }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized resource of type System.Drawing.Bitmap.\r
+        /// </summary>\r
+        public static System.Drawing.Bitmap round_publish_black_24dp {\r
+            get {\r
+                object obj = ResourceManager.GetObject("round_publish_black_24dp", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
     }\r
 }\r
index d084ffe4f5e6d0ef3db33526d27066ba10c0b1cb..c11d6ca0fef91684a179b6d0861606fc815b5275 100644 (file)
   <data name="ic_stop_black_24dp_2x" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
     <value>..\Resources\ic_stop_black_24dp_2x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
   </data>\r
+  <data name="baseline_arrow_downward_black_18dp" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\baseline_arrow_downward_black_18dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="baseline_chevron_left_black_18dp" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\baseline_chevron_left_black_18dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="baseline_chevron_right_black_18dp" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\baseline_chevron_right_black_18dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="baseline_close_black_18dp" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\baseline_close_black_18dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="baseline_ondemand_video_black_18dp" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\baseline_ondemand_video_black_18dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
+  <data name="round_publish_black_24dp" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\round_publish_black_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
 </root>
\ No newline at end of file
diff --git a/client/MaestroShared/Resources/baseline_arrow_downward_black_18dp.png b/client/MaestroShared/Resources/baseline_arrow_downward_black_18dp.png
new file mode 100644 (file)
index 0000000..d5bb07e
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_arrow_downward_black_18dp.png differ
diff --git a/client/MaestroShared/Resources/baseline_chevron_left_black_18dp.png b/client/MaestroShared/Resources/baseline_chevron_left_black_18dp.png
new file mode 100644 (file)
index 0000000..99ec812
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_chevron_left_black_18dp.png differ
diff --git a/client/MaestroShared/Resources/baseline_chevron_right_black_18dp.png b/client/MaestroShared/Resources/baseline_chevron_right_black_18dp.png
new file mode 100644 (file)
index 0000000..c22e1de
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_chevron_right_black_18dp.png differ
diff --git a/client/MaestroShared/Resources/baseline_close_black_18dp.png b/client/MaestroShared/Resources/baseline_close_black_18dp.png
new file mode 100644 (file)
index 0000000..aa51b15
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_close_black_18dp.png differ
diff --git a/client/MaestroShared/Resources/baseline_ondemand_video_black_18dp.png b/client/MaestroShared/Resources/baseline_ondemand_video_black_18dp.png
new file mode 100644 (file)
index 0000000..7d63598
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_ondemand_video_black_18dp.png differ
diff --git a/client/MaestroShared/Resources/baseline_playlist_add_check_black_18dp.png b/client/MaestroShared/Resources/baseline_playlist_add_check_black_18dp.png
new file mode 100644 (file)
index 0000000..254f222
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_playlist_add_check_black_18dp.png differ
diff --git a/client/MaestroShared/Resources/baseline_playlist_add_check_black_36dp.png b/client/MaestroShared/Resources/baseline_playlist_add_check_black_36dp.png
new file mode 100644 (file)
index 0000000..bb00909
Binary files /dev/null and b/client/MaestroShared/Resources/baseline_playlist_add_check_black_36dp.png differ
diff --git a/client/MaestroShared/Resources/round_publish_black_24dp.png b/client/MaestroShared/Resources/round_publish_black_24dp.png
new file mode 100644 (file)
index 0000000..ff9e8ea
Binary files /dev/null and b/client/MaestroShared/Resources/round_publish_black_24dp.png differ