Refactorization : BenchControl -> Rig

This commit is contained in:
Milan Hanajik
2021-03-05 16:12:24 +01:00
parent 84c8ec26b6
commit 6cf3bd6160
1461 changed files with 6330 additions and 6330 deletions
+153
View File
@@ -0,0 +1,153 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.Text;
using log4net;
using Config.Entities;
using TBF.Rig.GenericDevices;
using System.Windows.Forms;
namespace TBF.Rig.Network.Camera.Display
{
public class Display : ComponentBase, IOperation, ICameraDisplay
{
private static readonly ILog log = LogManager.GetLogger(typeof(Display));
public override string ToString()
{
return string.Format("{0}({1})", this.GetType().Namespace.Substring(8), Cfg.ToString(1));
}
public readonly DisplayCfg DisplayCfg;
///
public Display()
{
}
///
public Display(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
{
DisplayCfg = cfg as DisplayCfg;
log.Warn(this.ToString());
}
public bool[] SelectedImages { get { return selectedImages; } }
bool[] selectedImages;
public enum CurrentOp
{
None,
StaticImage,
LiveStream,
}
CurrentOp currentOp;
DialogResult result;
string title;
string[] imageFileNames;
DisplayForm displayForm;
///
delegate void DisplayFormDlgt(Display myRef);
///
void OpenStaticImageDisplay(Display myRef)
{
myRef.displayForm = new DisplayForm(imageFileNames, title);
displayForm.Show();
}
///
void OpenLiveStreamDisplay(Display myRef)
{
myRef.displayForm = new DisplayForm(imageFileNames, title);
displayForm.Show();
}
/// <returns>Reference to the operation</returns>
public IOperation ShowStaticImageOp(string[] imageFileNames, string title)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
this.imageFileNames = imageFileNames;
this.title = title;
currentOp = CurrentOp.StaticImage;
return this;
}
/// <returns>Reference to the operation</returns>
public IOperation ShowLiveStreamOp(string[] imageFileNames, string title)
{
if (currentOp != CurrentOp.None) throw new Exception("Sequence error");
this.imageFileNames = imageFileNames;
this.title = title;
currentOp = CurrentOp.LiveStream;
return this;
}
/// <summary>Start this operation</summary>
public void Start()
{
result = DialogResult.None;
switch (currentOp)
{
case CurrentOp.StaticImage:
Program.MainWnd.Invoke(new DisplayFormDlgt(OpenStaticImageDisplay), this);
break;
case CurrentOp.LiveStream:
Program.MainWnd.Invoke(new DisplayFormDlgt(OpenLiveStreamDisplay), this);
break;
}
}
/// <summary>Run this operation</summary>
/// <returns>Event.None</returns>
public Event Run()
{
if (!displayForm.Completed)
{
return Event.ModelessFormIsOpen;
}
if (result == DialogResult.None)
{
/// Save the result (once)
selectedImages = displayForm.SelectedImages;
result = displayForm.Result;
displayForm = null;
}
if (result == DialogResult.OK) return Event.OK;
else if (result == DialogResult.Retry) return Event.Retry;
else if (result == DialogResult.Abort) return Event.Abort;
else return Event.None; /// Should never happen
}
/// <summary>Stop this operation</summary>
public void Stop()
{
if (displayForm != null)
{
displayForm.CloseForm(this, null);
displayForm = null;
}
currentOp = CurrentOp.None;
}
}
}
@@ -0,0 +1,38 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using System.Xml.Serialization;
using Config.Entities;
using TBF.Rig.Generic;
namespace TBF.Rig.Network.Camera.Display
{
public class DisplayCfg : ComponentCfgBase, IComponentCfg
{
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(DisplayCfg) })[0];
public override XmlSerializer GetSerializer() { return Serializer; }
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new DisplayCfgCtrl(); }
///
/// Serialized parameters
///
/// Private parameterless constructor invoked by all other (public) constructors
DisplayCfg() {}
public DisplayCfg(string name, IComponentFactory factory)
: this()
{
Name = name;
Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}", Name);
}
}
}
@@ -0,0 +1,81 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System;
using System.Windows.Forms;
using Config.Entities;
using TBF.Rig.Generic;
using TBF.UI.Bench.Components;
namespace TBF.Rig.Network.Camera.Display
{
public partial class DisplayCfgCtrl : UserControl, IComponentCfgCtrl
{
ComponentParametersDlg parent;
public bool ShowMore { get { return false; } }
DisplayCfg config;
public IComponentCfg Config
{
get { return config as IComponentCfg; }
set
{
config = value as DisplayCfg;
Redraw();
}
}
public DisplayCfgCtrl()
{
InitializeComponent();
}
private void PumpCfgCtrl_Load(object sender, EventArgs e)
{
parent = ParentForm as ComponentParametersDlg;
if (parent == null) return;
Redraw();
}
public void Closing()
{
}
void Redraw()
{
if (config == null) return; /// Control was not loaded, settings were not changed
classNameLabel.Text = config.Factory.ClassName;
nameTextBox.Text = config.Name;
}
public void Unlock()
{
nameTextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
return flags;
}
public CfgUpdateFlags UpdateCfg()
{
CfgUpdateFlags flags = CfgUpdateFlags.None;
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
if (config.Name != nameTextBox.Text)
{
config.Name = nameTextBox.Text;
flags |= (CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
}
return flags;
}
}
}
+109
View File
@@ -0,0 +1,109 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
namespace TBF.Rig.Network.Camera.Display
{
partial class DisplayCfgCtrl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.nameTextBox = new System.Windows.Forms.TextBox();
this.nameLabel = new System.Windows.Forms.Label();
this.classNameLabel = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(99, 34);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(174, 20);
this.nameTextBox.TabIndex = 1;
//
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(13, 37);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 0;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(96, 11);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(114, 13);
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComponentClassName";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(-211, -147);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(57, 13);
this.label1.TabIndex = 5;
this.label1.Text = "Arguments";
//
// textBox1
//
this.textBox1.Enabled = false;
this.textBox1.Location = new System.Drawing.Point(-125, -150);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(372, 20);
this.textBox1.TabIndex = 6;
//
// DisplayCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.nameTextBox);
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "DisplayCfgCtrl";
this.Size = new System.Drawing.Size(500, 300);
this.Load += new System.EventHandler(this.PumpCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox nameTextBox;
private System.Windows.Forms.Label nameLabel;
private System.Windows.Forms.Label classNameLabel;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,197 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using log4net;
using TBF.Resources;
using System.Drawing;
using System.Text;
namespace TBF.Rig.Network.Camera.Display
{
public partial class DisplayForm : Form, GenericDevices.IHasCompleted
{
private static readonly ILog log = LogManager.GetLogger(typeof(DisplayForm));
#region Closing this display from another thread
/// <summary>
/// Called from the state machine when an operation forces a modeless dialog close.
/// </summary>
public void CloseForm(object sender, EventArgs args)
{
if (CloseFormHandler == null) return;
try { CloseFormHandler(sender, null); }
catch (Exception e) { log.Error("CloseFormHandler(...) failed", e); }
}
public event EventHandler<EventArgs> CloseFormHandler;
public void StartCloseFormHandler()
{
CloseFormHandler += delegate(object sender, EventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<EventArgs>(OnCloseForm), sender, args); }
else OnCloseForm(sender, args);
};
}
private void OnCloseForm(object sender, EventArgs args)
{
DialogResult = DialogResult.Cancel;
Close();
}
#endregion
/// <summary> Number of text boxes for serial numbers </summary>
readonly string[] imageFileNames;
readonly int imagesCount;
readonly GroupBox[] groupBoxes;
readonly PictureBox[] pictureBoxes;
readonly CheckBox[] checkBoxes;
readonly int boxesCount;
Timer myTimer;
public bool[] SelectedImages;
public DialogResult Result; /// DialogResult.None OK Retry or Cancel
/// Set to 'true' when the form closes
public bool Completed { get { return completed; } }
bool completed;
/// <summary>
/// Constructor
/// </summary>
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
public DisplayForm(string[] imageFileNames, string title)
{
InitializeComponent();
this.imageFileNames = imageFileNames;
this.imagesCount = (imageFileNames == null) ? 0 : imageFileNames.Length;
groupBoxes = new GroupBox[] { groupBox1, groupBox2, groupBox3, groupBox4, groupBox5, groupBox6,
groupBox7, groupBox8, groupBox9, groupBox10, groupBox11, groupBox12 };
pictureBoxes = new PictureBox[] { pictureBox1, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6,
pictureBox7, pictureBox8, pictureBox9, pictureBox10, pictureBox11, pictureBox12 };
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6,
checkBox7, checkBox8, checkBox9, checkBox10, checkBox11, checkBox12 };
boxesCount = pictureBoxes.Length;
Text = title;
int lastVisibleGroupBoxIx = 0;
for (int i = 0; i < boxesCount; i++)
{
if (i < imagesCount && !string.IsNullOrEmpty(imageFileNames[i]))
{
groupBoxes[i].Text = string.Format("{0} {1}", Strings.Water_Meter, i + 1);
checkBoxes[i].Checked = true;
checkBoxes[i].Text = Strings.Retry;
lastVisibleGroupBoxIx = i;
}
else
{
groupBoxes[i].Visible = false;
checkBoxes[i].Checked = false;
}
}
SelectedImages = new bool[imagesCount];
if (lastVisibleGroupBoxIx < 4)
Height = 321;
else if (lastVisibleGroupBoxIx < 8)
Height = 616;
Result = DialogResult.None;
completed = false;
StartCloseFormHandler();
}
/// <summary> Parameterless constructor for all watermeters </summary>
public DisplayForm()
: this(null, string.Empty)
{
}
private void CycleBeginningForm_Load(object sender, EventArgs e)
{
okButton.Text = Strings.OkBtnText;
retryButton.Text = Strings.Retry;
abortButton.Text = Strings.Abort;
myTimer = new Timer();
myTimer.Interval = (500);
myTimer.Tick += new EventHandler(MyTimer_Tick);
myTimer.Start();
}
private void MyTimer_Tick(object sender, EventArgs e)
{
for (int i = 0; i < Math.Min(imagesCount, boxesCount); i++)
{
if (imageFileNames[i] != null && System.IO.File.Exists(imageFileNames[i]) &&
pictureBoxes[i] != null && pictureBoxes[i].Image == null)
{
pictureBoxes[i].Image = Image.FromFile(imageFileNames[i]);
checkBoxes[i].Checked = false;
}
}
}
private void okButton_Click(object sender, EventArgs e)
{
log.Warn("OK clicked");
Result = DialogResult.OK;
CloseAfterButtonClick();
}
private void abortButton_Click(object sender, EventArgs e)
{
log.Warn("Abort clicked");
Result = DialogResult.Abort;
CloseAfterButtonClick();
}
private void retryButton_Click(object sender, EventArgs e)
{
log.Warn("Retry clicked");
Result = DialogResult.Retry;
CloseAfterButtonClick();
}
void CloseAfterButtonClick()
{
if (myTimer != null) myTimer.Stop();
UpdateData();
completed = true;
Close();
}
void UpdateData()
{
StringBuilder sb = new StringBuilder();
sb.Append("1 ");
for (int i = 0; i < Math.Min(imagesCount, boxesCount); i++)
{
SelectedImages[i] = checkBoxes[i].Checked;
sb.AppendFormat("{0}", checkBoxes[i].Checked ? "x" : "-");
}
sb.AppendFormat(" {0}", Math.Min(imagesCount, boxesCount));
log.WarnFormat("Data updated: {0}", sb.ToString());
}
}
}
+483
View File
@@ -0,0 +1,483 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
namespace TBF.Rig.Network.Camera.Display
{
partial class DisplayForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DisplayForm));
this.okButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.retryButton = new System.Windows.Forms.Button();
this.abortButton = new System.Windows.Forms.Button();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.checkBox7 = new System.Windows.Forms.CheckBox();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.checkBox8 = new System.Windows.Forms.CheckBox();
this.pictureBox8 = new System.Windows.Forms.PictureBox();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.checkBox9 = new System.Windows.Forms.CheckBox();
this.pictureBox9 = new System.Windows.Forms.PictureBox();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.checkBox10 = new System.Windows.Forms.CheckBox();
this.pictureBox10 = new System.Windows.Forms.PictureBox();
this.groupBox11 = new System.Windows.Forms.GroupBox();
this.checkBox11 = new System.Windows.Forms.CheckBox();
this.pictureBox11 = new System.Windows.Forms.PictureBox();
this.groupBox12 = new System.Windows.Forms.GroupBox();
this.checkBox12 = new System.Windows.Forms.CheckBox();
this.pictureBox12 = new System.Windows.Forms.PictureBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.groupBox6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
this.groupBox7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
this.groupBox8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
this.groupBox9.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
this.groupBox10.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
this.groupBox11.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).BeginInit();
this.groupBox12.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).BeginInit();
this.SuspendLayout();
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.ForeColor = System.Drawing.Color.Black;
this.okButton.Name = "okButton";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.checkBox1);
this.groupBox1.Controls.Add(this.pictureBox1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.ForeColor = System.Drawing.Color.Black;
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// checkBox1
//
resources.ApplyResources(this.checkBox1, "checkBox1");
this.checkBox1.Name = "checkBox1";
this.checkBox1.UseVisualStyleBackColor = true;
//
// pictureBox1
//
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.checkBox2);
this.groupBox2.Controls.Add(this.pictureBox2);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.ForeColor = System.Drawing.Color.Black;
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// checkBox2
//
resources.ApplyResources(this.checkBox2, "checkBox2");
this.checkBox2.Name = "checkBox2";
this.checkBox2.UseVisualStyleBackColor = true;
//
// pictureBox2
//
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.checkBox3);
this.groupBox3.Controls.Add(this.pictureBox3);
resources.ApplyResources(this.groupBox3, "groupBox3");
this.groupBox3.ForeColor = System.Drawing.Color.Black;
this.groupBox3.Name = "groupBox3";
this.groupBox3.TabStop = false;
//
// checkBox3
//
resources.ApplyResources(this.checkBox3, "checkBox3");
this.checkBox3.Name = "checkBox3";
this.checkBox3.UseVisualStyleBackColor = true;
//
// pictureBox3
//
resources.ApplyResources(this.pictureBox3, "pictureBox3");
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.TabStop = false;
//
// groupBox4
//
this.groupBox4.Controls.Add(this.checkBox4);
this.groupBox4.Controls.Add(this.pictureBox4);
resources.ApplyResources(this.groupBox4, "groupBox4");
this.groupBox4.ForeColor = System.Drawing.Color.Black;
this.groupBox4.Name = "groupBox4";
this.groupBox4.TabStop = false;
//
// checkBox4
//
resources.ApplyResources(this.checkBox4, "checkBox4");
this.checkBox4.Name = "checkBox4";
this.checkBox4.UseVisualStyleBackColor = true;
//
// pictureBox4
//
resources.ApplyResources(this.pictureBox4, "pictureBox4");
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.TabStop = false;
//
// retryButton
//
resources.ApplyResources(this.retryButton, "retryButton");
this.retryButton.ForeColor = System.Drawing.Color.Black;
this.retryButton.Name = "retryButton";
this.retryButton.UseVisualStyleBackColor = true;
this.retryButton.Click += new System.EventHandler(this.retryButton_Click);
//
// abortButton
//
resources.ApplyResources(this.abortButton, "abortButton");
this.abortButton.ForeColor = System.Drawing.Color.Black;
this.abortButton.Name = "abortButton";
this.abortButton.UseVisualStyleBackColor = true;
this.abortButton.Click += new System.EventHandler(this.abortButton_Click);
//
// groupBox5
//
this.groupBox5.Controls.Add(this.checkBox5);
this.groupBox5.Controls.Add(this.pictureBox5);
resources.ApplyResources(this.groupBox5, "groupBox5");
this.groupBox5.ForeColor = System.Drawing.Color.Black;
this.groupBox5.Name = "groupBox5";
this.groupBox5.TabStop = false;
//
// checkBox5
//
resources.ApplyResources(this.checkBox5, "checkBox5");
this.checkBox5.Name = "checkBox5";
this.checkBox5.UseVisualStyleBackColor = true;
//
// pictureBox5
//
resources.ApplyResources(this.pictureBox5, "pictureBox5");
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.TabStop = false;
//
// groupBox6
//
this.groupBox6.Controls.Add(this.checkBox6);
this.groupBox6.Controls.Add(this.pictureBox6);
resources.ApplyResources(this.groupBox6, "groupBox6");
this.groupBox6.ForeColor = System.Drawing.Color.Black;
this.groupBox6.Name = "groupBox6";
this.groupBox6.TabStop = false;
//
// checkBox6
//
resources.ApplyResources(this.checkBox6, "checkBox6");
this.checkBox6.Name = "checkBox6";
this.checkBox6.UseVisualStyleBackColor = true;
//
// pictureBox6
//
resources.ApplyResources(this.pictureBox6, "pictureBox6");
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.TabStop = false;
//
// groupBox7
//
this.groupBox7.Controls.Add(this.checkBox7);
this.groupBox7.Controls.Add(this.pictureBox7);
resources.ApplyResources(this.groupBox7, "groupBox7");
this.groupBox7.ForeColor = System.Drawing.Color.Black;
this.groupBox7.Name = "groupBox7";
this.groupBox7.TabStop = false;
//
// checkBox7
//
resources.ApplyResources(this.checkBox7, "checkBox7");
this.checkBox7.Name = "checkBox7";
this.checkBox7.UseVisualStyleBackColor = true;
//
// pictureBox7
//
resources.ApplyResources(this.pictureBox7, "pictureBox7");
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.TabStop = false;
//
// groupBox8
//
this.groupBox8.Controls.Add(this.checkBox8);
this.groupBox8.Controls.Add(this.pictureBox8);
resources.ApplyResources(this.groupBox8, "groupBox8");
this.groupBox8.ForeColor = System.Drawing.Color.Black;
this.groupBox8.Name = "groupBox8";
this.groupBox8.TabStop = false;
//
// checkBox8
//
resources.ApplyResources(this.checkBox8, "checkBox8");
this.checkBox8.Name = "checkBox8";
this.checkBox8.UseVisualStyleBackColor = true;
//
// pictureBox8
//
resources.ApplyResources(this.pictureBox8, "pictureBox8");
this.pictureBox8.Name = "pictureBox8";
this.pictureBox8.TabStop = false;
//
// groupBox9
//
this.groupBox9.Controls.Add(this.checkBox9);
this.groupBox9.Controls.Add(this.pictureBox9);
resources.ApplyResources(this.groupBox9, "groupBox9");
this.groupBox9.ForeColor = System.Drawing.Color.Black;
this.groupBox9.Name = "groupBox9";
this.groupBox9.TabStop = false;
//
// checkBox9
//
resources.ApplyResources(this.checkBox9, "checkBox9");
this.checkBox9.Name = "checkBox9";
this.checkBox9.UseVisualStyleBackColor = true;
//
// pictureBox9
//
resources.ApplyResources(this.pictureBox9, "pictureBox9");
this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.TabStop = false;
//
// groupBox10
//
this.groupBox10.Controls.Add(this.checkBox10);
this.groupBox10.Controls.Add(this.pictureBox10);
resources.ApplyResources(this.groupBox10, "groupBox10");
this.groupBox10.ForeColor = System.Drawing.Color.Black;
this.groupBox10.Name = "groupBox10";
this.groupBox10.TabStop = false;
//
// checkBox10
//
resources.ApplyResources(this.checkBox10, "checkBox10");
this.checkBox10.Name = "checkBox10";
this.checkBox10.UseVisualStyleBackColor = true;
//
// pictureBox10
//
resources.ApplyResources(this.pictureBox10, "pictureBox10");
this.pictureBox10.Name = "pictureBox10";
this.pictureBox10.TabStop = false;
//
// groupBox11
//
this.groupBox11.Controls.Add(this.checkBox11);
this.groupBox11.Controls.Add(this.pictureBox11);
resources.ApplyResources(this.groupBox11, "groupBox11");
this.groupBox11.ForeColor = System.Drawing.Color.Black;
this.groupBox11.Name = "groupBox11";
this.groupBox11.TabStop = false;
//
// checkBox11
//
resources.ApplyResources(this.checkBox11, "checkBox11");
this.checkBox11.Name = "checkBox11";
this.checkBox11.UseVisualStyleBackColor = true;
//
// pictureBox11
//
resources.ApplyResources(this.pictureBox11, "pictureBox11");
this.pictureBox11.Name = "pictureBox11";
this.pictureBox11.TabStop = false;
//
// groupBox12
//
this.groupBox12.Controls.Add(this.checkBox12);
this.groupBox12.Controls.Add(this.pictureBox12);
resources.ApplyResources(this.groupBox12, "groupBox12");
this.groupBox12.ForeColor = System.Drawing.Color.Black;
this.groupBox12.Name = "groupBox12";
this.groupBox12.TabStop = false;
//
// checkBox12
//
resources.ApplyResources(this.checkBox12, "checkBox12");
this.checkBox12.Name = "checkBox12";
this.checkBox12.UseVisualStyleBackColor = true;
//
// pictureBox12
//
resources.ApplyResources(this.pictureBox12, "pictureBox12");
this.pictureBox12.Name = "pictureBox12";
this.pictureBox12.TabStop = false;
//
// DisplayForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DarkGray;
this.Controls.Add(this.groupBox12);
this.Controls.Add(this.groupBox11);
this.Controls.Add(this.groupBox10);
this.Controls.Add(this.groupBox9);
this.Controls.Add(this.groupBox8);
this.Controls.Add(this.groupBox7);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.abortButton);
this.Controls.Add(this.retryButton);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.okButton);
this.ForeColor = System.Drawing.Color.Black;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "DisplayForm";
this.TopMost = true;
this.Load += new System.EventHandler(this.CycleBeginningForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
this.groupBox7.ResumeLayout(false);
this.groupBox7.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
this.groupBox8.ResumeLayout(false);
this.groupBox8.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
this.groupBox9.ResumeLayout(false);
this.groupBox9.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
this.groupBox10.ResumeLayout(false);
this.groupBox10.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
this.groupBox11.ResumeLayout(false);
this.groupBox11.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).EndInit();
this.groupBox12.ResumeLayout(false);
this.groupBox12.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Button retryButton;
private System.Windows.Forms.Button abortButton;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.CheckBox checkBox6;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.CheckBox checkBox8;
private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.GroupBox groupBox9;
private System.Windows.Forms.CheckBox checkBox9;
private System.Windows.Forms.PictureBox pictureBox9;
private System.Windows.Forms.GroupBox groupBox10;
private System.Windows.Forms.CheckBox checkBox10;
private System.Windows.Forms.PictureBox pictureBox10;
private System.Windows.Forms.GroupBox groupBox11;
private System.Windows.Forms.CheckBox checkBox11;
private System.Windows.Forms.PictureBox pictureBox11;
private System.Windows.Forms.GroupBox groupBox12;
private System.Windows.Forms.CheckBox checkBox12;
private System.Windows.Forms.PictureBox pictureBox12;
}
}
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Network.Camera.Display
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(8); } }
public override string ToString() { return ClassName; }
public void ResetStaticProperties() { Display.ResetStaticProperties(); }
public IComponent DummyComponent() { return new Display(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Display(cfg, components); }
public IComponentCfg DefaultConfig() { return new DisplayCfg(this.GetType().Namespace.Substring(8), this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(DisplayCfg.Serializer, component, this);
}
}
}