\r
[TestMethod]\r
public void TestGetRundowns() {\r
- OctopusAPI client = new OctopusAPI("http://localhost:8080/rest/services/octopus/", null, null, 100);\r
+ OctopusAPI client = new OctopusAPI("http://localhost:8080/rest/services/octopus/", null, null, 100, null);\r
var actual = client.GetRundowns(DateTime.Now);\r
}\r
\r
\r
[TestInitialize]\r
public void initialize() {\r
- sut = new TrafficAPI(CONNECTION_STRING, USER_NAME, PASSWORD, TIMEOUT);\r
+ sut = new TrafficAPI(CONNECTION_STRING, USER_NAME, PASSWORD, TIMEOUT, null);\r
}\r
\r
[TestMethod]\r
public bool EnableCustomMetadataId { get; set; }\r
public MetadataProvider[] Metadatas { get; set; }\r
public Target[] Targets { get; set; }\r
+ public String Filter { get; set; }\r
}\r
\r
public class Player {\r
<Compile Include="Program.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
<Compile Include="Sources\Messages\FileActionMsg.cs" />\r
+ <Compile Include="SystemMessage.cs" />\r
<Compile Include="Targets\UNCTargetProcessor.cs" />\r
<Compile Include="Targets\FXPTargetProcessor.cs" />\r
<Compile Include="Targets\FTPTargetProcessor.cs" />\r
</None>\r
<None Include="packages.config" />\r
<None Include="Properties\DataSources\Maestro.Metadata.MetadataInfo.datasource" />\r
+ <None Include="Properties\DataSources\SystemMessage.datasource" />\r
<None Include="Properties\Settings.settings">\r
<Generator>SettingsSingleFileGenerator</Generator>\r
<LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();\r
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.groupSource = new System.Windows.Forms.GroupBox();\r
this.dataGridSource = new System.Windows.Forms.DataGridView();\r
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);\r
this.btnExecute = new System.Windows.Forms.Button();\r
this.splitContainer2 = new System.Windows.Forms.SplitContainer();\r
this.groupActions = new System.Windows.Forms.GroupBox();\r
+ this.tabControl2 = new System.Windows.Forms.TabControl();\r
+ this.tabPage1 = new System.Windows.Forms.TabPage();\r
this.dataGridJobs = new System.Windows.Forms.DataGridView();\r
this.columnID = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.columnStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.columnInput = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.columnOutput = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.bindingSourceJobs = new System.Windows.Forms.BindingSource(this.components);\r
+ this.tabPage2 = new System.Windows.Forms.TabPage();\r
+ this.dataGridMessages = new System.Windows.Forms.DataGridView();\r
+ this.timeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components);\r
this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components);\r
this.groupSource.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.dataGridSource)).BeginInit();\r
this.splitContainer2.Panel2.SuspendLayout();\r
this.splitContainer2.SuspendLayout();\r
this.groupActions.SuspendLayout();\r
+ this.tabControl2.SuspendLayout();\r
+ this.tabPage1.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.dataGridJobs)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.bindingSourceJobs)).BeginInit();\r
+ this.tabPage2.SuspendLayout();\r
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridMessages)).BeginInit();\r
+ ((System.ComponentModel.ISupportInitialize)(this.systemMessageBindingSource)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.metadataInfoBindingSource)).BeginInit();\r
this.SuspendLayout();\r
// \r
this.groupSource.Location = new System.Drawing.Point(0, 0);\r
this.groupSource.Name = "groupSource";\r
this.groupSource.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupSource.Size = new System.Drawing.Size(414, 419);\r
+ this.groupSource.Size = new System.Drawing.Size(414, 471);\r
this.groupSource.TabIndex = 0;\r
this.groupSource.TabStop = false;\r
this.groupSource.Text = "Source file";\r
this.dataGridSource.RowsDefaultCellStyle = dataGridViewCellStyle3;\r
this.dataGridSource.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dataGridSource.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
- this.dataGridSource.Size = new System.Drawing.Size(394, 304);\r
+ this.dataGridSource.Size = new System.Drawing.Size(394, 356);\r
this.dataGridSource.TabIndex = 0;\r
this.dataGridSource.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.sourceGridView_CellContentClick);\r
this.dataGridSource.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridSource_CellEnter);\r
this.tableLayoutPanel2.Controls.Add(this.label1, 0, 0);\r
this.tableLayoutPanel2.Controls.Add(this.buttonMetadata, 1, 1);\r
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;\r
- this.tableLayoutPanel2.Location = new System.Drawing.Point(10, 347);\r
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(10, 399);\r
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);\r
this.tableLayoutPanel2.Name = "tableLayoutPanel2";\r
this.tableLayoutPanel2.RowCount = 2;\r
// splitContainer1.Panel2\r
// \r
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);\r
- this.splitContainer1.Size = new System.Drawing.Size(1022, 419);\r
+ this.splitContainer1.Size = new System.Drawing.Size(1022, 471);\r
this.splitContainer1.SplitterDistance = 414;\r
this.splitContainer1.TabIndex = 1;\r
// \r
// splitContainer3.Panel2\r
// \r
this.splitContainer3.Panel2.Controls.Add(this.groupTarget);\r
- this.splitContainer3.Size = new System.Drawing.Size(604, 419);\r
+ this.splitContainer3.Size = new System.Drawing.Size(604, 471);\r
this.splitContainer3.SplitterDistance = 284;\r
this.splitContainer3.TabIndex = 2;\r
// \r
this.groupMetadata.Location = new System.Drawing.Point(0, 0);\r
this.groupMetadata.Name = "groupMetadata";\r
this.groupMetadata.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupMetadata.Size = new System.Drawing.Size(284, 419);\r
+ this.groupMetadata.Size = new System.Drawing.Size(284, 471);\r
this.groupMetadata.TabIndex = 1;\r
this.groupMetadata.TabStop = false;\r
this.groupMetadata.Text = "Metadata";\r
this.tabControl1.Location = new System.Drawing.Point(10, 23);\r
this.tabControl1.Name = "tabControl1";\r
this.tabControl1.SelectedIndex = 0;\r
- this.tabControl1.Size = new System.Drawing.Size(264, 324);\r
+ this.tabControl1.Size = new System.Drawing.Size(264, 376);\r
this.tabControl1.TabIndex = 1;\r
// \r
// tpOctopus\r
this.tpOctopus.Location = new System.Drawing.Point(4, 24);\r
this.tpOctopus.Name = "tpOctopus";\r
this.tpOctopus.Padding = new System.Windows.Forms.Padding(3);\r
- this.tpOctopus.Size = new System.Drawing.Size(256, 296);\r
+ this.tpOctopus.Size = new System.Drawing.Size(256, 348);\r
this.tpOctopus.TabIndex = 0;\r
this.tpOctopus.Text = "Octopus";\r
this.tpOctopus.UseVisualStyleBackColor = true;\r
// octopusIDSelector\r
// \r
this.octopusIDSelector.BackColor = System.Drawing.Color.White;\r
- this.octopusIDSelector.clearCheckBox = null;\r
+ this.octopusIDSelector.ClearCheckBox = null;\r
this.octopusIDSelector.Disposeabel = false;\r
this.octopusIDSelector.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.octopusIDSelector.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.octopusIDSelector.MinimumSize = new System.Drawing.Size(200, 300);\r
this.octopusIDSelector.Name = "octopusIDSelector";\r
this.octopusIDSelector.Padding = new System.Windows.Forms.Padding(6);\r
- this.octopusIDSelector.Size = new System.Drawing.Size(250, 300);\r
+ this.octopusIDSelector.ErrorReporter = null;\r
+ this.octopusIDSelector.Size = new System.Drawing.Size(250, 342);\r
this.octopusIDSelector.TabIndex = 1;\r
// \r
// tpTraffic\r
this.tpTraffic.Location = new System.Drawing.Point(4, 24);\r
this.tpTraffic.Name = "tpTraffic";\r
this.tpTraffic.Padding = new System.Windows.Forms.Padding(3);\r
- this.tpTraffic.Size = new System.Drawing.Size(256, 296);\r
+ this.tpTraffic.Size = new System.Drawing.Size(256, 348);\r
this.tpTraffic.TabIndex = 1;\r
this.tpTraffic.Text = "Traffic";\r
this.tpTraffic.UseVisualStyleBackColor = true;\r
this.trafficIDSelector.Margin = new System.Windows.Forms.Padding(4);\r
this.trafficIDSelector.Name = "trafficIDSelector";\r
this.trafficIDSelector.Padding = new System.Windows.Forms.Padding(6);\r
- this.trafficIDSelector.Size = new System.Drawing.Size(250, 290);\r
+ this.trafficIDSelector.Size = new System.Drawing.Size(250, 342);\r
this.trafficIDSelector.TabIndex = 0;\r
// \r
// tableLayoutPanel1\r
this.tableLayoutPanel1.Controls.Add(this.textSelectedMetadata, 0, 1);\r
this.tableLayoutPanel1.Controls.Add(this.menuButtonActions, 1, 1);\r
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
- this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 347);\r
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(10, 399);\r
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);\r
this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
this.tableLayoutPanel1.RowCount = 2;\r
this.groupTarget.Location = new System.Drawing.Point(0, 0);\r
this.groupTarget.Name = "groupTarget";\r
this.groupTarget.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupTarget.Size = new System.Drawing.Size(316, 419);\r
+ this.groupTarget.Size = new System.Drawing.Size(316, 471);\r
this.groupTarget.TabIndex = 0;\r
this.groupTarget.TabStop = false;\r
this.groupTarget.Text = "Target action";\r
this.panelActions.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);\r
this.panelActions.RowCount = 1;\r
this.panelActions.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
- this.panelActions.Size = new System.Drawing.Size(296, 324);\r
+ this.panelActions.Size = new System.Drawing.Size(296, 376);\r
this.panelActions.TabIndex = 4;\r
this.panelActions.MouseClick += new System.Windows.Forms.MouseEventHandler(this.OnTargetPanelsMouseClick);\r
// \r
this.panel1.BackColor = System.Drawing.Color.Transparent;\r
this.panel1.Controls.Add(this.btnExecute);\r
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
- this.panel1.Location = new System.Drawing.Point(10, 347);\r
+ this.panel1.Location = new System.Drawing.Point(10, 399);\r
this.panel1.Name = "panel1";\r
this.panel1.Size = new System.Drawing.Size(296, 62);\r
this.panel1.TabIndex = 5;\r
// splitContainer2.Panel2\r
// \r
this.splitContainer2.Panel2.Controls.Add(this.groupActions);\r
- this.splitContainer2.Size = new System.Drawing.Size(1022, 561);\r
- this.splitContainer2.SplitterDistance = 419;\r
+ this.splitContainer2.Size = new System.Drawing.Size(1022, 632);\r
+ this.splitContainer2.SplitterDistance = 471;\r
this.splitContainer2.TabIndex = 2;\r
// \r
// groupActions\r
// \r
this.groupActions.BackColor = System.Drawing.Color.Transparent;\r
- this.groupActions.Controls.Add(this.dataGridJobs);\r
+ this.groupActions.Controls.Add(this.tabControl2);\r
this.groupActions.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.groupActions.Location = new System.Drawing.Point(0, 0);\r
this.groupActions.Name = "groupActions";\r
this.groupActions.Padding = new System.Windows.Forms.Padding(10);\r
- this.groupActions.Size = new System.Drawing.Size(1022, 138);\r
+ this.groupActions.Size = new System.Drawing.Size(1022, 157);\r
this.groupActions.TabIndex = 1;\r
this.groupActions.TabStop = false;\r
this.groupActions.Text = "Actions";\r
this.groupActions.Enter += new System.EventHandler(this.groupBox_Enter);\r
this.groupActions.Leave += new System.EventHandler(this.groupBox_Leave);\r
// \r
+ // tabControl2\r
+ // \r
+ this.tabControl2.Controls.Add(this.tabPage1);\r
+ this.tabControl2.Controls.Add(this.tabPage2);\r
+ this.tabControl2.Dock = System.Windows.Forms.DockStyle.Fill;\r
+ this.tabControl2.Location = new System.Drawing.Point(10, 23);\r
+ this.tabControl2.Name = "tabControl2";\r
+ this.tabControl2.SelectedIndex = 0;\r
+ this.tabControl2.Size = new System.Drawing.Size(1002, 124);\r
+ this.tabControl2.TabIndex = 1;\r
+ // \r
+ // tabPage1\r
+ // \r
+ this.tabPage1.Controls.Add(this.dataGridJobs);\r
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);\r
+ this.tabPage1.Name = "tabPage1";\r
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);\r
+ this.tabPage1.Size = new System.Drawing.Size(994, 98);\r
+ this.tabPage1.TabIndex = 0;\r
+ this.tabPage1.Text = global::Maestro.StringResources.FOLYAMATOK;\r
+ this.tabPage1.UseVisualStyleBackColor = true;\r
+ // \r
// dataGridJobs\r
// \r
this.dataGridJobs.AllowUserToAddRows = false;\r
this.dataGridJobs.DefaultCellStyle = dataGridViewCellStyle8;\r
this.dataGridJobs.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.dataGridJobs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
- this.dataGridJobs.Location = new System.Drawing.Point(10, 23);\r
+ this.dataGridJobs.Location = new System.Drawing.Point(3, 3);\r
this.dataGridJobs.Name = "dataGridJobs";\r
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;\r
this.dataGridJobs.RowsDefaultCellStyle = dataGridViewCellStyle10;\r
this.dataGridJobs.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
this.dataGridJobs.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
- this.dataGridJobs.Size = new System.Drawing.Size(1002, 105);\r
+ this.dataGridJobs.Size = new System.Drawing.Size(988, 92);\r
this.dataGridJobs.TabIndex = 0;\r
this.dataGridJobs.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridJobs_CellEnter);\r
// \r
this.columnOutput.Name = "columnOutput";\r
this.columnOutput.Width = 68;\r
// \r
+ // tabPage2\r
+ // \r
+ this.tabPage2.Controls.Add(this.dataGridMessages);\r
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);\r
+ this.tabPage2.Name = "tabPage2";\r
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);\r
+ this.tabPage2.Size = new System.Drawing.Size(994, 98);\r
+ this.tabPage2.TabIndex = 1;\r
+ this.tabPage2.Text = global::Maestro.StringResources.UZENETEK;\r
+ this.tabPage2.UseVisualStyleBackColor = true;\r
+ // \r
+ // dataGridMessages\r
+ // \r
+ this.dataGridMessages.AllowUserToAddRows = false;\r
+ this.dataGridMessages.AllowUserToOrderColumns = true;\r
+ this.dataGridMessages.AllowUserToResizeRows = false;\r
+ this.dataGridMessages.AutoGenerateColumns = false;\r
+ this.dataGridMessages.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;\r
+ this.dataGridMessages.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;\r
+ this.dataGridMessages.BackgroundColor = System.Drawing.Color.White;\r
+ this.dataGridMessages.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+ dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window;\r
+ dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+ dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;\r
+ dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
+ dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
+ dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+ this.dataGridMessages.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;\r
+ this.dataGridMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;\r
+ this.dataGridMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {\r
+ this.timeDataGridViewTextBoxColumn,\r
+ this.messageDataGridViewTextBoxColumn});\r
+ this.dataGridMessages.DataSource = this.systemMessageBindingSource;\r
+ dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window;\r
+ dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+ dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText;\r
+ dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.Gainsboro;\r
+ dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Black;\r
+ dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False;\r
+ this.dataGridMessages.DefaultCellStyle = dataGridViewCellStyle12;\r
+ this.dataGridMessages.Dock = System.Windows.Forms.DockStyle.Fill;\r
+ this.dataGridMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;\r
+ this.dataGridMessages.Location = new System.Drawing.Point(3, 3);\r
+ this.dataGridMessages.Name = "dataGridMessages";\r
+ dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;\r
+ dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;\r
+ dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+ dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;\r
+ dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;\r
+ dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;\r
+ dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;\r
+ this.dataGridMessages.RowHeadersDefaultCellStyle = dataGridViewCellStyle13;\r
+ this.dataGridMessages.RowHeadersVisible = false;\r
+ dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+ this.dataGridMessages.RowsDefaultCellStyle = dataGridViewCellStyle14;\r
+ this.dataGridMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);\r
+ this.dataGridMessages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
+ this.dataGridMessages.Size = new System.Drawing.Size(988, 92);\r
+ this.dataGridMessages.TabIndex = 0;\r
+ this.dataGridMessages.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridMessages_RowsAdded);\r
+ // \r
+ // timeDataGridViewTextBoxColumn\r
+ // \r
+ this.timeDataGridViewTextBoxColumn.DataPropertyName = "Time";\r
+ this.timeDataGridViewTextBoxColumn.HeaderText = "Time";\r
+ this.timeDataGridViewTextBoxColumn.Name = "timeDataGridViewTextBoxColumn";\r
+ this.timeDataGridViewTextBoxColumn.Width = 60;\r
+ // \r
+ // messageDataGridViewTextBoxColumn\r
+ // \r
+ this.messageDataGridViewTextBoxColumn.DataPropertyName = "message";\r
+ this.messageDataGridViewTextBoxColumn.HeaderText = "message";\r
+ this.messageDataGridViewTextBoxColumn.Name = "messageDataGridViewTextBoxColumn";\r
+ this.messageDataGridViewTextBoxColumn.Width = 83;\r
+ // \r
+ // systemMessageBindingSource\r
+ // \r
+ this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage);\r
+ // \r
// metadataInfoBindingSource\r
// \r
this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo);\r
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
this.BackColor = System.Drawing.SystemColors.Control;\r
- this.ClientSize = new System.Drawing.Size(1022, 561);\r
+ this.ClientSize = new System.Drawing.Size(1022, 632);\r
this.Controls.Add(this.splitContainer2);\r
this.Icon = global::Maestro.Properties.Resources.AppIcon;\r
this.Name = "MaestroForm";\r
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();\r
this.splitContainer2.ResumeLayout(false);\r
this.groupActions.ResumeLayout(false);\r
+ this.tabControl2.ResumeLayout(false);\r
+ this.tabPage1.ResumeLayout(false);\r
((System.ComponentModel.ISupportInitialize)(this.dataGridJobs)).EndInit();\r
((System.ComponentModel.ISupportInitialize)(this.bindingSourceJobs)).EndInit();\r
+ this.tabPage2.ResumeLayout(false);\r
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridMessages)).EndInit();\r
+ ((System.ComponentModel.ISupportInitialize)(this.systemMessageBindingSource)).EndInit();\r
((System.ComponentModel.ISupportInitialize)(this.metadataInfoBindingSource)).EndInit();\r
this.ResumeLayout(false);\r
\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnFinished;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnInput;\r
private System.Windows.Forms.DataGridViewTextBoxColumn columnOutput;\r
+ private System.Windows.Forms.TabControl tabControl2;\r
+ private System.Windows.Forms.TabPage tabPage1;\r
+ private System.Windows.Forms.TabPage tabPage2;\r
+ private System.Windows.Forms.DataGridView dataGridMessages;\r
+ private System.Windows.Forms.BindingSource systemMessageBindingSource;\r
+ private System.Windows.Forms.DataGridViewTextBoxColumn timeDataGridViewTextBoxColumn;\r
+ private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn;\r
}\r
}\r
\r
Address = metadata.Server.Address,\r
UserName = metadata.Server.UserName,\r
Password = metadata.Server.Password,\r
- Timeout = metadata.Server.Timeout\r
+ Timeout = metadata.Server.Timeout,\r
+ ErrorReporter = ReportError\r
};\r
trafficIDSelector.IDChangedEvent += TrafficIDSelected;\r
}\r
MediaCubeMetadata metadata = Configuration.Metadatas.Where(m => { return m is MediaCubeMetadata; }).FirstOrDefault() as MediaCubeMetadata;\r
if (metadata == null)\r
return;\r
- mediaCubeApi = new MediaCubeApi(metadata.Server.Address.ToString(), metadata.Server.UserName, metadata.Server.Password, metadata.Server.Timeout);\r
+ mediaCubeApi = new MediaCubeApi(metadata.Server.Address.ToString(), metadata.Server.UserName, metadata.Server.Password, metadata.Server.Timeout) { ErrorReporter = ReportError };\r
}\r
\r
private void OnOctopusIDSelected(string selectedID) {\r
\r
if (Configuration?.Source is UNCSource) {\r
logger.Debug("UNC source initialization");\r
- source = new FileSystemSource(this, MessageBus);\r
+ source = new FileSystemSource(this, MessageBus, Configuration.Filter);\r
logger.Debug("UNC source created");\r
}\r
if (Configuration?.Source is NEXIOSource) {\r
logger.Debug("NEXIO source initialization");\r
- source = new NexioRESTSource(this, MessageBus);\r
+ source = new NexioRESTSource(this, MessageBus, ReportError);\r
logger.Debug("NEXIO source created");\r
}\r
\r
ITargetProcessor processor = (ITargetProcessor)Activator.CreateInstance(type, parameters);\r
processors.Add(processor);\r
}\r
- //foreach (String actual in selectedSources) {\r
- // string typeName = string.Format("{0}.{1}", typeof(ITargetProcessor).Namespace, target.Processor);\r
- // Type type = Type.GetType(typeName);\r
- // ISourceItem selectedFile = GetSourceItemFromBindingSource(actual);//bindingSource.Current as ISourceItem;\r
- // string id = selectedMetadata.ID;\r
- // object[] parameters = new object[] { this, Configuration.Source, target, selectedFile.Name, id, segments, mediaCubeApi, model };\r
- // ITargetProcessor processor = (ITargetProcessor)Activator.CreateInstance(type, parameters);\r
- // processors.Add(processor);\r
- //}\r
currentProcessors.Add(checkBox, processors);\r
} else\r
currentProcessors.Remove(checkBox);\r
public ConfigurationInfo Configuration;\r
private TraficMetadataSelected trafficMetadataSelected;\r
private OctopusMetadataSelected octopusMetadataSelected;\r
+ private Color newMSGColor;\r
\r
public Clear clear;\r
\r
public MaestroForm() {\r
InitializeComponent();\r
trafficIDSelector.clearCheckBox = octopusIDSelector.ClearEveryCheckBox;\r
- octopusIDSelector.clearCheckBox = trafficIDSelector.ClearSelectionSource;\r
+ octopusIDSelector.ClearCheckBox = trafficIDSelector.ClearSelectionSource;\r
+ octopusIDSelector.ErrorReporter = ReportError;\r
groups = new GroupBox[] { groupSource, groupMetadata, groupTarget, groupActions };\r
trafficMetadataSelected = TrafficIDSelected;\r
octopusMetadataSelected = OnOctopusIDSelected;\r
columnStatus.HeaderText = StringResources.STATUSZ;\r
ctxiDefineSegments.Text = StringResources.SZEGMENS_LETREHOZASA;\r
ctxiModifyArchiveMetadata.Text = StringResources.ARCHÍV_METAADATOK_MODOSITASA;\r
- buttonMetadata.Text = StringResources.METAADAT;\r
}\r
\r
private void InitializeComponents() {\r
InitializeMetadata();\r
InitializeTarget();\r
InitializeJobs();\r
+ InitializeMessages();\r
InitializeControlTexts();\r
}\r
\r
+ private void InitializeMessages() {\r
+ dataGridMessages.Columns.AddRange(new DataGridViewTextBoxColumn() {\r
+ AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,\r
+ DataPropertyName = "Time",\r
+ HeaderText = StringResources.IDO\r
+ },\r
+ new DataGridViewTextBoxColumn() {\r
+ AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,\r
+ DataPropertyName = "Message",\r
+ HeaderText = StringResources.UZENET\r
+ });\r
+ }\r
+\r
private void InitializeJobs() {\r
bindingSourceJobs.DataSource = jobs;\r
foreach (DataGridViewColumn column in dataGridJobs.Columns) {\r
}\r
\r
\r
+ public void ReportError(DateTime time, String message, Color color) {\r
+ systemMessageBindingSource.Insert(0, new SystemMessage() { Time = time, message = message});\r
+ UpdateDataChanged();\r
+ newMSGColor = color;\r
+ }\r
+\r
+ private void UpdateDataChanged() {\r
+ dataGridMessages.DataSource = null;\r
+ dataGridMessages.DataSource = systemMessageBindingSource;\r
+ }\r
+\r
+ private void dataGridMessages_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) {\r
+ dataGridMessages.Rows[0].DefaultCellStyle.BackColor = newMSGColor;\r
+ }\r
}\r
}\r
<metadata name="bindingSourceJobs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>154, 17</value>\r
</metadata>\r
+ <metadata name="systemMessageBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>630, 17</value>\r
+ </metadata>\r
<metadata name="metadataInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>309, 17</value>\r
</metadata>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<!--\r
+ This file is automatically generated by Visual Studio .Net. It is \r
+ used to store generic object data source configuration information. \r
+ Renaming the file extension or editing the content of this file may \r
+ cause the file to be unrecognizable by the program.\r
+-->\r
+<GenericObjectDataSource DisplayName="SystemMessage" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">\r
+ <TypeInfo>Maestro.SystemMessage, Maestro, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>\r
+</GenericObjectDataSource>
\ No newline at end of file
"active": true,\r
"startInTray": false,\r
"enableNameOverride": false,\r
+ "filter": "avi",\r
"player": {\r
"enabled": true,\r
"autoStart": false,\r
"startInTray": false,\r
"enableNameOverride": false,\r
"enableCustomMetadataId": true,\r
+ "filter": "avi,wav",\r
"player": {\r
"enabled": true,\r
"autoStart": false,\r
"source": {\r
"$type": "UNCSource",\r
"local": {\r
- "address": "file://10.10.1.100/BRAAVOS/_TEST_/_ECHO/hirado/test"\r
+ "address": "file://localhost/watch"\r
},\r
"remote": {\r
- "address": "ftp://10.10.1.100:21/_TEST_/_ECHO/hirado/test",\r
- "userName": "mediacube",\r
- "password": "Broadca5T"\r
+ "address": "ftp://localhost:21/watch",\r
+ "userName": "dani",\r
+ "password": "dani"\r
}\r
},\r
"metadatas": [\r
{\r
"$type": "OctopusMetadata",\r
"server": {\r
- "address": "http://10.10.1.28:8080/services/rest/octopus/",\r
+ "address": "http://100.10.1.28:8080/services/rest/octopus/",\r
"userName": "dani",\r
"password": "dani",\r
"timeout": 1000\r
while (!e.Cancel) {\r
Thread.Sleep(3000);\r
FileInfo fi = new FileInfo(path);\r
- if (lastSize == fi.Length) {\r
- e.Result = fi;\r
- break;\r
- }\r
- else\r
- lastSize = fi.Length;\r
+ if (fi.Exists)\r
+ if (lastSize == fi.Length) {\r
+ e.Result = fi;\r
+ break;\r
+ } else\r
+ lastSize = fi.Length;\r
}\r
- \r
+\r
}\r
\r
\r
using System.Drawing;\r
using System.IO;\r
using System.Runtime.CompilerServices;\r
+using System.Collections.Generic;\r
\r
namespace Maestro.Sources {\r
public class FileSourceItem : ISourceItem {\r
}\r
}\r
\r
+\r
+ public bool CanHandle(List<String> extensions) {\r
+ if (extensions == null || extensions.Count < 1)\r
+ return true;\r
+ if (extensions.Contains(fileInfo.Extension.Substring(1)))\r
+ return true;\r
+ return false;\r
+ }\r
}\r
}\r
private List<CreatedFileMonitor> createdFileMonitors = new List<CreatedFileMonitor>();\r
private Control parent;\r
private string filter;\r
+ private string fileExtensionFilter;\r
+ private List<String> acceptableExtensions = new List<string>();\r
private List<FileSourceItem> cache = new List<FileSourceItem>();\r
\r
public DataGridViewColumn[] Columns {\r
\r
public bool SupportsFiltering => true;\r
\r
- public FileSystemSource(Control parent, IMessageBus messageBus) {\r
+ public FileSystemSource(Control parent, IMessageBus messageBus, String fileExtensionFilter) {\r
this.parent = parent;\r
this.messageBus = messageBus;\r
+ this.fileExtensionFilter = fileExtensionFilter;\r
+ SetAcceptableExtensions();\r
+ }\r
+\r
+ private void SetAcceptableExtensions() {\r
+ acceptableExtensions = fileExtensionFilter.Split(',').ToList();\r
}\r
\r
public void Startup(Uri address) {\r
\r
private void initializeList(string path) {\r
string[] files = Directory.GetFiles(path);\r
- files.Select(f => CreateItem(new FileInfo(f), false)).OrderByDescending(i => i.Created).ToList().ForEach(i => parent.SafeCall(() => Add(i)));\r
+ //files.Select(f => CreateItem(new FileInfo(f), false)).Where(x => x.Name.EndsWith("avi")).OrderByDescending(i => i.Created).ToList().ForEach(i => parent.SafeCall(() => Add(i)));\r
+ files.Select(f => CreateItem(new FileInfo(f), false)).Where(x => x.CanHandle(acceptableExtensions)).OrderByDescending(i => i.Created).ToList().ForEach(i => parent.SafeCall(() => Add(i)));\r
cache.AddRange(this);\r
}\r
\r
var item = this.Where(x => x.Name == e.OldName).SingleOrDefault();\r
if (item == null)\r
return;\r
- item.FileInfo = new FileInfo(e.FullPath);\r
- parent.SafeCall(() => {\r
- messageBus.Send(new ModifyFileActionMsg() {\r
- FileName = e.Name,\r
- Source = parent\r
+ if (item.CanHandle(acceptableExtensions)) {\r
+ item.FileInfo = new FileInfo(e.FullPath);\r
+ parent.SafeCall(() => {\r
+ messageBus.Send(new ModifyFileActionMsg() {\r
+ FileName = e.Name,\r
+ Source = parent\r
+ });\r
});\r
- });\r
+ }\r
}\r
\r
private void OnChanged(object sender, FileSystemEventArgs e) {\r
var item = this.Where(x => x.Name == e.Name).SingleOrDefault();\r
if (item == null)\r
return;\r
- item.FileInfo = new FileInfo(e.FullPath);\r
- parent.SafeCall(() => {\r
- messageBus.Send(new ModifyFileActionMsg() {\r
- FileName = e.Name,\r
- Source = parent\r
+ if (item.CanHandle(acceptableExtensions)) {\r
+ item.FileInfo = new FileInfo(e.FullPath);\r
+ parent.SafeCall(() => {\r
+ messageBus.Send(new ModifyFileActionMsg() {\r
+ FileName = e.Name,\r
+ Source = parent\r
+ });\r
});\r
- });\r
+ }\r
}\r
\r
private void OnCreated(object sender, FileSystemEventArgs e) {\r
logger.Debug("{0} {1}", e.ChangeType, e.Name);\r
}\r
\r
- private void OnDeleted(object sender, FileSystemEventArgs e) {\r
+ private void OnDeleted(object sender, FileSystemEventArgs e) { \r
logger.Debug("{0} {1}", e.ChangeType, e.Name);\r
- FileSourceItem fileSourceItem = this.Where(item => item.Name.Equals(e.Name)).First();\r
- parent.SafeCall(() => {\r
- Remove(fileSourceItem);\r
- messageBus.Send(new RemoveFileActionMsg() {\r
- FileName = e.Name,\r
- Source = parent\r
+ var enumList = this.Where(item => item.Name.Equals(e.Name))?.ToList();\r
+ FileSourceItem fileSourceItem = enumList.Count == 0 ? null : enumList.First();\r
+ if (fileSourceItem == null)\r
+ return;\r
+ if (fileSourceItem.CanHandle(acceptableExtensions)) {\r
+ parent.SafeCall(() => {\r
+ Remove(fileSourceItem);\r
+ messageBus.Send(new RemoveFileActionMsg() {\r
+ FileName = e.Name,\r
+ Source = parent\r
+ });\r
});\r
- });\r
- MaestroForm form = (MaestroForm)parent;\r
- form.SourceDeleted(e.Name);\r
+ MaestroForm form = (MaestroForm)parent;\r
+ form.SourceDeleted(e.Name);\r
+ return;\r
+ }\r
}\r
\r
public void ApplySort(ListSortDescriptionCollection sorts) {\r
using System;\r
using System.Drawing;\r
using NLog;\r
+using JobEngineClient;\r
\r
namespace Maestro.Sources {\r
class NexioRESTSource : BindingList<NexioSourceItem>, ISource {\r
\r
public bool SupportsFiltering => throw new NotImplementedException();\r
\r
- public NexioRESTSource(Control parent, IMessageBus messageBus) {\r
+ private MediaCubeErrorReporter errorReporter;\r
+\r
+ public NexioRESTSource(Control parent, IMessageBus messageBus, MediaCubeErrorReporter errorReporter) {\r
this.parent = parent;\r
this.messageBus = messageBus;\r
+ this.errorReporter = errorReporter;\r
}\r
\r
public void Startup(Uri address) {\r
private void CreateWatch(string path) {\r
logger.Info("info");\r
logger.Error("error");\r
- dataClient = new NexioAPI(path);\r
+ dataClient = new NexioAPI(path) { ErrorReporter = errorReporter};\r
dataClient.Open(OnResponse);\r
}\r
\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Folyamatok.\r
+ /// </summary>\r
+ internal static string FOLYAMATOK {\r
+ get {\r
+ return ResourceManager.GetString("FOLYAMATOK", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to Forrás.\r
/// </summary>\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Idő.\r
+ /// </summary>\r
+ internal static string IDO {\r
+ get {\r
+ return ResourceManager.GetString("IDO", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to Kezdés.\r
/// </summary>\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Üzenet.\r
+ /// </summary>\r
+ internal static string UZENET {\r
+ get {\r
+ return ResourceManager.GetString("UZENET", resourceCulture);\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// Looks up a localized string similar to Üzenetek.\r
+ /// </summary>\r
+ internal static string UZENETEK {\r
+ get {\r
+ return ResourceManager.GetString("UZENETEK", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to Vége.\r
/// </summary>\r
<data name="FELVETEL_DATUMA" xml:space="preserve">\r
<value>Felvétel dátuma</value>\r
</data>\r
+ <data name="FOLYAMATOK" xml:space="preserve">\r
+ <value>Folyamatok</value>\r
+ </data>\r
<data name="FORRAS" xml:space="preserve">\r
<value>Forrás</value>\r
</data>\r
<data name="FORRAS_FAJL" xml:space="preserve">\r
<value>Forrás fájl</value>\r
</data>\r
+ <data name="IDO" xml:space="preserve">\r
+ <value>Idő</value>\r
+ </data>\r
<data name="KEZDES" xml:space="preserve">\r
<value>Kezdés</value>\r
</data>\r
<data name="UGYNOKSEG" xml:space="preserve">\r
<value>Ügynökség</value>\r
</data>\r
+ <data name="UZENET" xml:space="preserve">\r
+ <value>Üzenet</value>\r
+ </data>\r
+ <data name="UZENETEK" xml:space="preserve">\r
+ <value>Üzenetek</value>\r
+ </data>\r
<data name="VEGE" xml:space="preserve">\r
<value>Vége</value>\r
</data>\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Threading.Tasks;\r
+\r
+namespace Maestro {\r
+ public class SystemMessage {\r
+\r
+ public DateTime Time { get; set; }\r
+ public String message { get; set; }\r
+ }\r
+}\r
using System.Diagnostics;\r
using System.Net;\r
using System.Runtime.Serialization;\r
+using System.Drawing;\r
\r
namespace JobEngineClient {\r
+\r
+ public delegate void MediaCubeErrorReporter(DateTime time, String message, Color color);\r
+\r
public class MediaCubeApi {\r
private const string DATEFORMAT = "yyyy'-'MM'-'dd'T'HH':'mm':'ssK";\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
private JsonSerializerSettings serializerSettings;\r
private string user;\r
private string pwd;\r
+ public MediaCubeErrorReporter ErrorReporter { get; set; }\r
\r
public MediaCubeApi(string address, string user, string pwd, int timeout) {\r
this.user = user;\r
//Debug.WriteLine(body);\r
request.AddParameter("application/json", body, ParameterType.RequestBody);\r
var response = client.Execute(request);\r
- if (response.StatusCode != HttpStatusCode.OK || response.ContentLength < 1)\r
+ if (response.StatusCode != HttpStatusCode.OK || response.ContentLength < 1) {\r
+ ErrorReporter?.Invoke(DateTime.Now, String.Format("[MediaCube] {0}", response.ErrorMessage), Color.Red);\r
return null;\r
+ }\r
//Debug.WriteLine(response.Content);\r
var result = JsonConvert.DeserializeObject<WorkflowAction>(response.Content);\r
return result;\r
<Reference Include="System" />\r
<Reference Include="System.ComponentModel.DataAnnotations" />\r
<Reference Include="System.Data" />\r
+ <Reference Include="System.Drawing" />\r
<Reference Include="System.Runtime.Serialization" />\r
<Reference Include="System.Xml" />\r
<Reference Include="websocket-sharp, Version=1.0.2.42480, Culture=neutral, PublicKeyToken=5660b08a1845a91e, processorArchitecture=MSIL">\r
using System;\r
using System.Diagnostics;\r
using WebSocketSharp;\r
-\r
+using JobEngineClient;\r
\r
namespace NexioClient {\r
public class NexioAPI {\r
public const string UPDATE = "update";\r
private WebSocket ws = null;\r
private string path;\r
-\r
+ public MediaCubeErrorReporter ErrorReporter { get; set; }\r
public NexioAPI(String path) {\r
this.path = path;\r
}\r
ws.Connect();\r
}\r
catch (Exception e) {\r
+ ErrorReporter?.Invoke(DateTime.Now, String.Format("[NexioAPI] {0}", e.Message), System.Drawing.Color.Red);\r
} \r
}\r
\r
ws.Send(data.ToString());\r
}\r
catch (Exception e) {\r
+ ErrorReporter?.Invoke(DateTime.Now, String.Format("[NexioAPI] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
}\r
\r
private RestClient client;\r
private string user;\r
private string pwd;\r
+ private OctopusErrorReporterDelegate errorRiporter;\r
\r
- public OctopusAPI(string address, string user, string pwd, int timeout) {\r
+ public OctopusAPI(string address, string user, string pwd, int timeout, OctopusErrorReporterDelegate errorRiporter) {\r
this.user = user;\r
this.pwd = pwd;\r
client = new RestClient(address) {\r
Authenticator = new HttpBasicAuthenticator(user, pwd),\r
Timeout = timeout\r
};\r
+ this.errorRiporter = errorRiporter;\r
}\r
\r
public IEnumerable<Rundown> GetRundowns(DateTime scheduledDate) {\r
request.AddParameter("scheduledDate", dt, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
});\r
}\r
catch (Exception e) {\r
- //log e.Message ??\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ return result;\r
}\r
return result;\r
}\r
request.AddParameter("rundownID", rundownID, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r.ID;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
request.AddParameter("storyFolderID", storyFolderID, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r.ID;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
var request = new RestRequest("storyfolders", Method.GET);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
var request = new RestRequest("stories", Method.GET);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
request.AddParameter("id", id, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
request.AddParameter("id", id, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
request.AddParameter("id", id, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
request.AddParameter("id", id, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
\r
request.AddParameter("id", placeHolderID, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
});\r
}\r
catch (Exception e) {\r
- //log e.Message ??\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
}\r
return result;\r
}\r
request.AddParameter("id", placeHolderID, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
});\r
}\r
catch (Exception e) {\r
- //log e.Message ??\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
}\r
return result;\r
}\r
request.AddParameter("id", placeHolderID, ParameterType.UrlSegment);\r
var response = client.Execute<JsonArray>(request);\r
if (response.ContentLength == 0)\r
- return null;\r
+ throw new Exception(String.Format("[Octopus] {0}", response.ErrorMessage));\r
JArray resultObject = JArray.Parse(response.Content);\r
\r
result = resultObject.Children().Select(d => {\r
return r.ID;\r
});\r
}\r
- catch (Exception e) { }\r
+ catch (Exception e) {\r
+ errorRiporter?.Invoke(DateTime.Now, e.Message, System.Drawing.Color.Red);\r
+ }\r
return result;\r
}\r
}\r
using System.Windows.Forms;\r
using System.Collections.Generic;\r
using System.ComponentModel;\r
+using System.Drawing;\r
\r
namespace OctopusClient {\r
public delegate void OnSelectedIDChanged(string ID);\r
public delegate void ClearCheckBox();\r
+ public delegate void OctopusErrorReporterDelegate(DateTime time, String message, Color color);\r
\r
public partial class OctopusIDSelector : UserControl {\r
\r
private string id;\r
- public ClearCheckBox clearCheckBox { get; set; }\r
+ public ClearCheckBox ClearCheckBox { get; set; }\r
+\r
+ public OctopusErrorReporterDelegate ErrorReporter { get; set; }\r
\r
public bool Disposeabel { get; set; }\r
\r
\r
public OctopusConfiguration Configuration {\r
set {\r
- client = new OctopusAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout);\r
+ client = new OctopusAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, ErrorReporter);\r
refreshStoryFolders();\r
refreshRundowns();\r
}\r
private void InnerAfterCheck(TreeNode node) {\r
string text = node.Name;\r
checkFromCode = false;\r
- clearCheckBox?.Invoke();\r
+ ClearCheckBox?.Invoke();\r
ClearSelectionSource(node, treeContent.Nodes);\r
id = node.Checked ? text : string.Empty;\r
IDChangedEvent?.Invoke(id);\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Nem lehet csatlakozni az octopus kiszolgálóhoz.\r
+ /// </summary>\r
+ internal static string OCTOPUS_KAPCSOLATI_HIBA {\r
+ get {\r
+ return ResourceManager.GetString("OCTOPUS_KAPCSOLATI_HIBA", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to Válasszon elemet.\r
/// </summary>\r
<data name="OBJECT_TYPE" xml:space="preserve">\r
<value>Objektum típusa</value>\r
</data>\r
+ <data name="OCTOPUS_KAPCSOLATI_HIBA" xml:space="preserve">\r
+ <value>Nem lehet csatlakozni az octopus kiszolgálóhoz</value>\r
+ </data>\r
<data name="VALASSZON_ELEMET" xml:space="preserve">\r
<value>Válasszon elemet</value>\r
</data>\r
using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
using System.Data.SqlClient;\r
\r
namespace TrafficClient {\r
private AdvertisementWorker adWorker;\r
private SegmentWorker segmentWorker;\r
\r
- public TrafficAPI(string connString, string user, string password, int timeout) {\r
+ public TrafficAPI(string connString, string user, string password, int timeout, TrafficErrorReporterDelegate errorReporter) {\r
connectionString = String.Format("{0};User ID={1};Password={2};Connection Timeout={3}", connString, user, password, timeout);\r
connection = new SqlConnection(connectionString);\r
cliFSPReader = new CliFSPReader();\r
- broadvastWorker = new BroadcastWorker(connection, cliFSPReader);\r
- promoWorker = new PromotionalWorker(connection, cliFSPReader);\r
- adWorker = new AdvertisementWorker(connection, cliFSPReader);\r
- segmentWorker = new SegmentWorker(connection, cliFSPReader);\r
+ broadvastWorker = new BroadcastWorker(connection, cliFSPReader, errorReporter);\r
+ promoWorker = new PromotionalWorker(connection, cliFSPReader, errorReporter);\r
+ adWorker = new AdvertisementWorker(connection, cliFSPReader, errorReporter);\r
+ segmentWorker = new SegmentWorker(connection, cliFSPReader, errorReporter);\r
}\r
\r
public List<MamResultWrapper> GetBroadcasts(string strParam, DateTime? from, DateTime? to, bool missingCopia) {\r
public string UserName { get; set; }\r
public string Password { get; set; }\r
public int Timeout;\r
+ public TrafficErrorReporterDelegate ErrorReporter { get; set; }\r
}\r
}\r
namespace TrafficClient {\r
public delegate void OnSelectedIDChanged(string ID, int variantID);\r
public delegate void ClearCheckBox();\r
-\r
+ public delegate void TrafficErrorReporterDelegate(DateTime time, String message, Color color);\r
public partial class TrafficIDSelector : UserControl {\r
public TrafficAPI trafficAPI { get; private set; }\r
public OnSelectedIDChanged IDChangedEvent { get; set; }\r
public ClearCheckBox clearCheckBox { get; set; }\r
+\r
+ public TrafficErrorReporterDelegate ErrorReporter { get; set; }\r
public TrafficIDSelector() {\r
InitializeComponent();\r
InitializeTexts();\r
\r
public TrafficConfiguration Configuration {\r
set {\r
- trafficAPI = new TrafficAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout);\r
+ trafficAPI = new TrafficAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, value.ErrorReporter);\r
}\r
}\r
\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public AdvertisementWorker(SqlConnection connection, CliFSPReader cliFSPReader) : base(connection, cliFSPReader) {\r
+ public AdvertisementWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) :\r
+ base(connection, cliFSPReader, errorReporter) {\r
}\r
\r
public List<MamResultWrapper> GetAdvertisements(string strParam) {\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public BroadcastWorker(SqlConnection connection, CliFSPReader cliFSPReader) \r
- : base(connection, cliFSPReader){\r
+ public BroadcastWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) \r
+ : base(connection, cliFSPReader, errorReporter){\r
}\r
\r
public List<MamResultWrapper> GetBroadcasts(string strParam, DateTime? from, DateTime? to, bool missingCopia) {\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public PromotionalWorker(SqlConnection connection, CliFSPReader cliFSPReader)\r
- : base(connection, cliFSPReader) {\r
+ public PromotionalWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter)\r
+ : base(connection, cliFSPReader, errorReporter) {\r
}\r
\r
public List<MamResultWrapper> GetPromotionals(string strParam) {\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
}\r
catch (Exception e) {\r
- logger.Error(e.Message);\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
return result;\r
}\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
\r
private static Logger logger = LogManager.GetCurrentClassLogger();\r
\r
- public SegmentWorker(SqlConnection connection, CliFSPReader cliFSPReader) : base(connection, cliFSPReader) {\r
+ public SegmentWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) : \r
+ base(connection, cliFSPReader, errorReporter) {\r
}\r
\r
public List<Segment> GetSegments(int itemID) {\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
}\r
catch (Exception e) {\r
logger.Error(e.Message);\r
- throw e;\r
+ errorReporter?.Invoke(DateTime.Now, String.Format("[Traffic] {0}", e.Message), System.Drawing.Color.Red);\r
}\r
finally {\r
connection.Close();\r
namespace TrafficClient.Workers {\r
public class TrafficWorker {\r
\r
+ protected TrafficErrorReporterDelegate errorReporter;\r
protected CliFSPReader cliFSPReader;\r
protected SqlConnection connection;\r
\r
- public TrafficWorker(SqlConnection connection, CliFSPReader cliFSPReader) {\r
+ public TrafficWorker(SqlConnection connection, CliFSPReader cliFSPReader, TrafficErrorReporterDelegate errorReporter) {\r
this.connection = connection;\r
this.cliFSPReader = cliFSPReader;\r
+ this.errorReporter = errorReporter;\r
}\r
protected void TryConnect() {\r
if (connection.State != ConnectionState.Open) {\r