Camera info displayed in PicturesTabPage, PicturesTabPageCtrl and CameraPictureCtrl cleanup, ver. 2.16.669
This commit is contained in:
@@ -189,7 +189,9 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
|||||||
|
|
||||||
if (cameraDetected)
|
if (cameraDetected)
|
||||||
{
|
{
|
||||||
/// Open telnet clint and start the log-in process
|
UiBridge.Bridge.OnCameraInfo(this.cameraIdx, string.Format("{0} s/n={1} IP={2} SD={3}", Name, CameraCfg.HardwareAddress, ipAddress, sdCardVer));
|
||||||
|
|
||||||
|
/// Open telnet clint and start the log-in process
|
||||||
Telnet = new Telnet.TelnetClient(this, CameraCfg.Name, ClpUserName, ClpPassword, TelnetPrompt, TelnetSkipFirstLine, CameraCfg.DisplayTerminal);
|
Telnet = new Telnet.TelnetClient(this, CameraCfg.Name, ClpUserName, ClpPassword, TelnetPrompt, TelnetSkipFirstLine, CameraCfg.DisplayTerminal);
|
||||||
|
|
||||||
if (CameraCfg.DisplayTerminal)
|
if (CameraCfg.DisplayTerminal)
|
||||||
@@ -229,6 +231,7 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
UiBridge.Bridge.OnCameraInfo(this.cameraIdx, string.Format("{0} s/n={1} was not detected!", Name, CameraCfg.HardwareAddress));
|
||||||
log.FatalFormat("'{0}' with address {1} not detected", Name, CameraCfg.HardwareAddress);
|
log.FatalFormat("'{0}' with address {1} not detected", Name, CameraCfg.HardwareAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.16.668.1")]
|
[assembly: AssemblyVersion("2.16.669.1")]
|
||||||
[assembly: AssemblyFileVersion("2.16.668.1")]
|
[assembly: AssemblyFileVersion("2.16.669.1")]
|
||||||
|
|||||||
@@ -1671,15 +1671,6 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Focus.
|
|
||||||
/// </summary>
|
|
||||||
internal static string Focus {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Focus", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Footer.
|
/// Looks up a localized string similar to Footer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1150,9 +1150,6 @@
|
|||||||
<data name="ID" xml:space="preserve">
|
<data name="ID" xml:space="preserve">
|
||||||
<value>ID</value>
|
<value>ID</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Focus" xml:space="preserve">
|
|
||||||
<value>Focus</value>
|
|
||||||
</data>
|
|
||||||
<data name="Grab" xml:space="preserve">
|
<data name="Grab" xml:space="preserve">
|
||||||
<value>Grab</value>
|
<value>Grab</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
+100
-129
@@ -31,131 +31,105 @@ namespace TBF.Screens
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PicturesTabPageCtrl));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PicturesTabPageCtrl));
|
||||||
this.logTextBox = new System.Windows.Forms.TextBox();
|
this.logTextBox = new System.Windows.Forms.TextBox();
|
||||||
this.splitContainer = new System.Windows.Forms.SplitContainer();
|
this.splitContainer = new System.Windows.Forms.SplitContainer();
|
||||||
this.focusButton = new System.Windows.Forms.Button();
|
this.configureButton = new System.Windows.Forms.Button();
|
||||||
this.liveButton = new System.Windows.Forms.Button();
|
this.cameraPictureCtrl6 = new TBF.UiControls.CameraPictureCtrl();
|
||||||
this.grabButton = new System.Windows.Forms.Button();
|
this.cameraPictureCtrl5 = new TBF.UiControls.CameraPictureCtrl();
|
||||||
this.configureButton = new System.Windows.Forms.Button();
|
this.cameraPictureCtrl4 = new TBF.UiControls.CameraPictureCtrl();
|
||||||
this.cameraPictureCtrl6 = new TBF.UiControls.CameraPictureCtrl();
|
this.cameraPictureCtrl3 = new TBF.UiControls.CameraPictureCtrl();
|
||||||
this.cameraPictureCtrl5 = new TBF.UiControls.CameraPictureCtrl();
|
this.cameraPictureCtrl2 = new TBF.UiControls.CameraPictureCtrl();
|
||||||
this.cameraPictureCtrl4 = new TBF.UiControls.CameraPictureCtrl();
|
this.cameraPictureCtrl1 = new TBF.UiControls.CameraPictureCtrl();
|
||||||
this.cameraPictureCtrl3 = new TBF.UiControls.CameraPictureCtrl();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||||
this.cameraPictureCtrl2 = new TBF.UiControls.CameraPictureCtrl();
|
this.splitContainer.Panel1.SuspendLayout();
|
||||||
this.cameraPictureCtrl1 = new TBF.UiControls.CameraPictureCtrl();
|
this.splitContainer.Panel2.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
this.splitContainer.SuspendLayout();
|
||||||
this.splitContainer.Panel1.SuspendLayout();
|
this.SuspendLayout();
|
||||||
this.splitContainer.Panel2.SuspendLayout();
|
//
|
||||||
this.splitContainer.SuspendLayout();
|
// logTextBox
|
||||||
this.SuspendLayout();
|
//
|
||||||
//
|
resources.ApplyResources(this.logTextBox, "logTextBox");
|
||||||
// logTextBox
|
this.logTextBox.Name = "logTextBox";
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.logTextBox, "logTextBox");
|
// splitContainer
|
||||||
this.logTextBox.Name = "logTextBox";
|
//
|
||||||
//
|
resources.ApplyResources(this.splitContainer, "splitContainer");
|
||||||
// splitContainer
|
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||||
//
|
this.splitContainer.Name = "splitContainer";
|
||||||
resources.ApplyResources(this.splitContainer, "splitContainer");
|
//
|
||||||
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
// splitContainer.Panel1
|
||||||
this.splitContainer.Name = "splitContainer";
|
//
|
||||||
//
|
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
|
||||||
// splitContainer.Panel1
|
this.splitContainer.Panel1.Controls.Add(this.configureButton);
|
||||||
//
|
//
|
||||||
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
|
// splitContainer.Panel2
|
||||||
this.splitContainer.Panel1.Controls.Add(this.focusButton);
|
//
|
||||||
this.splitContainer.Panel1.Controls.Add(this.liveButton);
|
this.splitContainer.Panel2.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.splitContainer.Panel1.Controls.Add(this.grabButton);
|
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl6);
|
||||||
this.splitContainer.Panel1.Controls.Add(this.configureButton);
|
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl5);
|
||||||
//
|
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl4);
|
||||||
// splitContainer.Panel2
|
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl3);
|
||||||
//
|
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl2);
|
||||||
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl6);
|
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl1);
|
||||||
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl5);
|
//
|
||||||
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl4);
|
// configureButton
|
||||||
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl3);
|
//
|
||||||
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl2);
|
resources.ApplyResources(this.configureButton, "configureButton");
|
||||||
this.splitContainer.Panel2.Controls.Add(this.cameraPictureCtrl1);
|
this.configureButton.Name = "configureButton";
|
||||||
//
|
this.configureButton.UseVisualStyleBackColor = true;
|
||||||
// focusButton
|
this.configureButton.Click += new System.EventHandler(this.configureButton_Click);
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.focusButton, "focusButton");
|
// cameraPictureCtrl6
|
||||||
this.focusButton.Name = "focusButton";
|
//
|
||||||
this.focusButton.UseVisualStyleBackColor = true;
|
this.cameraPictureCtrl6.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
this.focusButton.Click += new System.EventHandler(this.focusButton_Click);
|
resources.ApplyResources(this.cameraPictureCtrl6, "cameraPictureCtrl6");
|
||||||
//
|
this.cameraPictureCtrl6.Name = "cameraPictureCtrl6";
|
||||||
// liveButton
|
//
|
||||||
//
|
// cameraPictureCtrl5
|
||||||
resources.ApplyResources(this.liveButton, "liveButton");
|
//
|
||||||
this.liveButton.Name = "liveButton";
|
this.cameraPictureCtrl5.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
this.liveButton.UseVisualStyleBackColor = true;
|
resources.ApplyResources(this.cameraPictureCtrl5, "cameraPictureCtrl5");
|
||||||
this.liveButton.Click += new System.EventHandler(this.liveButton_Click);
|
this.cameraPictureCtrl5.Name = "cameraPictureCtrl5";
|
||||||
//
|
//
|
||||||
// grabButton
|
// cameraPictureCtrl4
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.grabButton, "grabButton");
|
this.cameraPictureCtrl4.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
this.grabButton.Name = "grabButton";
|
resources.ApplyResources(this.cameraPictureCtrl4, "cameraPictureCtrl4");
|
||||||
this.grabButton.UseVisualStyleBackColor = true;
|
this.cameraPictureCtrl4.Name = "cameraPictureCtrl4";
|
||||||
this.grabButton.Click += new System.EventHandler(this.grabButton_Click);
|
//
|
||||||
//
|
// cameraPictureCtrl3
|
||||||
// configureButton
|
//
|
||||||
//
|
this.cameraPictureCtrl3.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
resources.ApplyResources(this.configureButton, "configureButton");
|
resources.ApplyResources(this.cameraPictureCtrl3, "cameraPictureCtrl3");
|
||||||
this.configureButton.Name = "configureButton";
|
this.cameraPictureCtrl3.Name = "cameraPictureCtrl3";
|
||||||
this.configureButton.UseVisualStyleBackColor = true;
|
//
|
||||||
this.configureButton.Click += new System.EventHandler(this.configureButton_Click);
|
// cameraPictureCtrl2
|
||||||
//
|
//
|
||||||
// cameraPictureCtrl6
|
this.cameraPictureCtrl2.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
//
|
resources.ApplyResources(this.cameraPictureCtrl2, "cameraPictureCtrl2");
|
||||||
this.cameraPictureCtrl6.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
this.cameraPictureCtrl2.Name = "cameraPictureCtrl2";
|
||||||
resources.ApplyResources(this.cameraPictureCtrl6, "cameraPictureCtrl6");
|
//
|
||||||
this.cameraPictureCtrl6.Name = "cameraPictureCtrl6";
|
// cameraPictureCtrl1
|
||||||
//
|
//
|
||||||
// cameraPictureCtrl5
|
this.cameraPictureCtrl1.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
//
|
resources.ApplyResources(this.cameraPictureCtrl1, "cameraPictureCtrl1");
|
||||||
this.cameraPictureCtrl5.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
this.cameraPictureCtrl1.Name = "cameraPictureCtrl1";
|
||||||
resources.ApplyResources(this.cameraPictureCtrl5, "cameraPictureCtrl5");
|
//
|
||||||
this.cameraPictureCtrl5.Name = "cameraPictureCtrl5";
|
// PicturesTabPageCtrl
|
||||||
//
|
//
|
||||||
// cameraPictureCtrl4
|
resources.ApplyResources(this, "$this");
|
||||||
//
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.cameraPictureCtrl4.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
this.BackColor = System.Drawing.Color.Silver;
|
||||||
resources.ApplyResources(this.cameraPictureCtrl4, "cameraPictureCtrl4");
|
this.Controls.Add(this.splitContainer);
|
||||||
this.cameraPictureCtrl4.Name = "cameraPictureCtrl4";
|
this.Controls.Add(this.logTextBox);
|
||||||
//
|
this.Name = "PicturesTabPageCtrl";
|
||||||
// cameraPictureCtrl3
|
this.splitContainer.Panel1.ResumeLayout(false);
|
||||||
//
|
this.splitContainer.Panel2.ResumeLayout(false);
|
||||||
this.cameraPictureCtrl3.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||||
resources.ApplyResources(this.cameraPictureCtrl3, "cameraPictureCtrl3");
|
this.splitContainer.ResumeLayout(false);
|
||||||
this.cameraPictureCtrl3.Name = "cameraPictureCtrl3";
|
this.ResumeLayout(false);
|
||||||
//
|
this.PerformLayout();
|
||||||
// cameraPictureCtrl2
|
|
||||||
//
|
|
||||||
this.cameraPictureCtrl2.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
|
||||||
resources.ApplyResources(this.cameraPictureCtrl2, "cameraPictureCtrl2");
|
|
||||||
this.cameraPictureCtrl2.Name = "cameraPictureCtrl2";
|
|
||||||
//
|
|
||||||
// cameraPictureCtrl1
|
|
||||||
//
|
|
||||||
this.cameraPictureCtrl1.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
|
||||||
resources.ApplyResources(this.cameraPictureCtrl1, "cameraPictureCtrl1");
|
|
||||||
this.cameraPictureCtrl1.Name = "cameraPictureCtrl1";
|
|
||||||
//
|
|
||||||
// PicturesTabPageCtrl
|
|
||||||
//
|
|
||||||
resources.ApplyResources(this, "$this");
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.BackColor = System.Drawing.Color.Silver;
|
|
||||||
this.Controls.Add(this.splitContainer);
|
|
||||||
this.Controls.Add(this.logTextBox);
|
|
||||||
this.Name = "PicturesTabPageCtrl";
|
|
||||||
this.splitContainer.Panel1.ResumeLayout(false);
|
|
||||||
this.splitContainer.Panel2.ResumeLayout(false);
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
|
||||||
this.splitContainer.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,9 +143,6 @@ namespace TBF.Screens
|
|||||||
private UiControls.CameraPictureCtrl cameraPictureCtrl4;
|
private UiControls.CameraPictureCtrl cameraPictureCtrl4;
|
||||||
private UiControls.CameraPictureCtrl cameraPictureCtrl3;
|
private UiControls.CameraPictureCtrl cameraPictureCtrl3;
|
||||||
private UiControls.CameraPictureCtrl cameraPictureCtrl2;
|
private UiControls.CameraPictureCtrl cameraPictureCtrl2;
|
||||||
private UiControls.CameraPictureCtrl cameraPictureCtrl1;
|
private UiControls.CameraPictureCtrl cameraPictureCtrl1;
|
||||||
private System.Windows.Forms.Button focusButton;
|
|
||||||
private System.Windows.Forms.Button liveButton;
|
|
||||||
private System.Windows.Forms.Button grabButton;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,59 +16,76 @@ namespace TBF.Screens
|
|||||||
|
|
||||||
Localize();
|
Localize();
|
||||||
|
|
||||||
|
System.Windows.Forms.Timer timer;
|
||||||
|
timer = new System.Windows.Forms.Timer();
|
||||||
|
timer.Tick += (s, e) => { TimerTick(); };
|
||||||
|
timer.Interval = 250;
|
||||||
|
timer.Start();
|
||||||
|
|
||||||
Bridge.ImageHandler += delegate(object sender, ImageEventArgs args)
|
Bridge.ImageHandler += delegate(object sender, ImageEventArgs args)
|
||||||
{
|
{
|
||||||
if (InvokeRequired)
|
if (InvokeRequired)
|
||||||
{
|
Invoke(new EventHandler<ImageEventArgs>(ShowImage), sender, args);
|
||||||
Invoke(new EventHandler<ImageEventArgs>(ShowImage), sender, args);
|
else
|
||||||
}
|
ShowImage(sender, args);
|
||||||
else
|
};
|
||||||
{
|
|
||||||
ShowImage(sender, args);
|
Bridge.CameraInfoHandler += delegate(object sender, CameraInfoEventArgs args)
|
||||||
}
|
{
|
||||||
};
|
if (InvokeRequired)
|
||||||
}
|
Invoke(new EventHandler<CameraInfoEventArgs>(ShowInfo), sender, args);
|
||||||
|
else
|
||||||
|
ShowInfo(sender, args);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private void Localize()
|
private void Localize()
|
||||||
{
|
{
|
||||||
configureButton.Text = Strings.Configure;
|
configureButton.Text = Strings.Configure;
|
||||||
grabButton.Text = Strings.Grab;
|
|
||||||
liveButton.Text = Strings.Live;
|
|
||||||
focusButton.Text = Strings.Focus;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TimerTick()
|
||||||
|
{
|
||||||
|
DateTime now = DateTime.Now;
|
||||||
|
cameraPictureCtrl1.UpdateLed(now);
|
||||||
|
cameraPictureCtrl2.UpdateLed(now);
|
||||||
|
cameraPictureCtrl3.UpdateLed(now);
|
||||||
|
cameraPictureCtrl4.UpdateLed(now);
|
||||||
|
cameraPictureCtrl5.UpdateLed(now);
|
||||||
|
cameraPictureCtrl6.UpdateLed(now);
|
||||||
|
}
|
||||||
|
|
||||||
void ShowImage(object sender, ImageEventArgs args)
|
void ShowImage(object sender, ImageEventArgs args)
|
||||||
{
|
{
|
||||||
switch (args.CameraIdx)
|
switch (args.CameraIdx)
|
||||||
{
|
{
|
||||||
case 0: cameraPictureCtrl1.PictureBox.Image = args.Image; break;
|
case 0: cameraPictureCtrl1.Image = args.Image; break;
|
||||||
case 1: cameraPictureCtrl2.PictureBox.Image = args.Image; break;
|
case 1: cameraPictureCtrl2.Image = args.Image; break;
|
||||||
case 2: cameraPictureCtrl3.PictureBox.Image = args.Image; break;
|
case 2: cameraPictureCtrl3.Image = args.Image; break;
|
||||||
case 3: cameraPictureCtrl4.PictureBox.Image = args.Image; break;
|
case 3: cameraPictureCtrl4.Image = args.Image; break;
|
||||||
case 4: cameraPictureCtrl5.PictureBox.Image = args.Image; break;
|
case 4: cameraPictureCtrl5.Image = args.Image; break;
|
||||||
case 5: cameraPictureCtrl6.PictureBox.Image = args.Image; break;
|
case 5: cameraPictureCtrl6.Image = args.Image; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowInfo(object sender, CameraInfoEventArgs args)
|
||||||
|
{
|
||||||
|
switch (args.CameraIdx)
|
||||||
|
{
|
||||||
|
case 0: cameraPictureCtrl1.Caption = args.Info; break;
|
||||||
|
case 1: cameraPictureCtrl2.Caption = args.Info; break;
|
||||||
|
case 2: cameraPictureCtrl3.Caption = args.Info; break;
|
||||||
|
case 3: cameraPictureCtrl4.Caption = args.Info; break;
|
||||||
|
case 4: cameraPictureCtrl5.Caption = args.Info; break;
|
||||||
|
case 5: cameraPictureCtrl6.Caption = args.Info; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void configureButton_Click(object sender, EventArgs e)
|
private void configureButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void grabButton_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void liveButton_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void focusButton_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,92 +162,14 @@
|
|||||||
<data name="splitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
|
<data name="splitContainer.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
|
||||||
<value>Horizontal</value>
|
<value>Horizontal</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="focusButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
<data name="configureButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
<value>NoControl</value>
|
<value>NoControl</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="focusButton.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>386, 7</value>
|
|
||||||
</data>
|
|
||||||
<data name="focusButton.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>100, 30</value>
|
|
||||||
</data>
|
|
||||||
<data name="focusButton.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>5</value>
|
|
||||||
</data>
|
|
||||||
<data name="focusButton.Text" xml:space="preserve">
|
|
||||||
<value>Focus</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>focusButton.Name" xml:space="preserve">
|
|
||||||
<value>focusButton</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>focusButton.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>focusButton.Parent" xml:space="preserve">
|
|
||||||
<value>splitContainer.Panel1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>focusButton.ZOrder" xml:space="preserve">
|
|
||||||
<value>0</value>
|
|
||||||
</data>
|
|
||||||
<data name="liveButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
|
||||||
<value>NoControl</value>
|
|
||||||
</data>
|
|
||||||
<data name="liveButton.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>280, 7</value>
|
|
||||||
</data>
|
|
||||||
<data name="liveButton.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>100, 30</value>
|
|
||||||
</data>
|
|
||||||
<data name="liveButton.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>4</value>
|
|
||||||
</data>
|
|
||||||
<data name="liveButton.Text" xml:space="preserve">
|
|
||||||
<value>Live</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>liveButton.Name" xml:space="preserve">
|
|
||||||
<value>liveButton</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>liveButton.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>liveButton.Parent" xml:space="preserve">
|
|
||||||
<value>splitContainer.Panel1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>liveButton.ZOrder" xml:space="preserve">
|
|
||||||
<value>1</value>
|
|
||||||
</data>
|
|
||||||
<data name="grabButton.Location" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>174, 7</value>
|
|
||||||
</data>
|
|
||||||
<data name="grabButton.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>100, 30</value>
|
|
||||||
</data>
|
|
||||||
<data name="grabButton.TabIndex" type="System.Int32, mscorlib">
|
|
||||||
<value>3</value>
|
|
||||||
</data>
|
|
||||||
<data name="grabButton.Text" xml:space="preserve">
|
|
||||||
<value>Grab</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>grabButton.Name" xml:space="preserve">
|
|
||||||
<value>grabButton</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>grabButton.Type" xml:space="preserve">
|
|
||||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>grabButton.Parent" xml:space="preserve">
|
|
||||||
<value>splitContainer.Panel1</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>grabButton.ZOrder" xml:space="preserve">
|
|
||||||
<value>2</value>
|
|
||||||
</data>
|
|
||||||
<data name="configureButton.Enabled" type="System.Boolean, mscorlib">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name="configureButton.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="configureButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>20, 7</value>
|
<value>2, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="configureButton.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="configureButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>100, 30</value>
|
<value>100, 21</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="configureButton.TabIndex" type="System.Int32, mscorlib">
|
<data name="configureButton.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
@@ -255,9 +177,6 @@
|
|||||||
<data name="configureButton.Text" xml:space="preserve">
|
<data name="configureButton.Text" xml:space="preserve">
|
||||||
<value>Configure</value>
|
<value>Configure</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="configureButton.Visible" type="System.Boolean, mscorlib">
|
|
||||||
<value>False</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>configureButton.Name" xml:space="preserve">
|
<data name=">>configureButton.Name" xml:space="preserve">
|
||||||
<value>configureButton</value>
|
<value>configureButton</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -268,7 +187,7 @@
|
|||||||
<value>splitContainer.Panel1</value>
|
<value>splitContainer.Panel1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>configureButton.ZOrder" xml:space="preserve">
|
<data name=">>configureButton.ZOrder" xml:space="preserve">
|
||||||
<value>3</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>splitContainer.Panel1.Name" xml:space="preserve">
|
<data name=">>splitContainer.Panel1.Name" xml:space="preserve">
|
||||||
<value>splitContainer.Panel1</value>
|
<value>splitContainer.Panel1</value>
|
||||||
@@ -283,10 +202,10 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl6.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="cameraPictureCtrl6.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>673, 323</value>
|
<value>667, 290</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl6.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cameraPictureCtrl6.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>334, 320</value>
|
<value>333, 288</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl6.TabIndex" type="System.Int32, mscorlib">
|
<data name="cameraPictureCtrl6.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>5</value>
|
<value>5</value>
|
||||||
@@ -295,7 +214,7 @@
|
|||||||
<value>cameraPictureCtrl6</value>
|
<value>cameraPictureCtrl6</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl6.Type" xml:space="preserve">
|
<data name=">>cameraPictureCtrl6.Type" xml:space="preserve">
|
||||||
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.655.1, Culture=neutral, PublicKeyToken=null</value>
|
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.668.1, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl6.Parent" xml:space="preserve">
|
<data name=">>cameraPictureCtrl6.Parent" xml:space="preserve">
|
||||||
<value>splitContainer.Panel2</value>
|
<value>splitContainer.Panel2</value>
|
||||||
@@ -304,10 +223,10 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl5.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="cameraPictureCtrl5.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>338, 323</value>
|
<value>335, 290</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl5.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cameraPictureCtrl5.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>334, 320</value>
|
<value>333, 288</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl5.TabIndex" type="System.Int32, mscorlib">
|
<data name="cameraPictureCtrl5.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>4</value>
|
<value>4</value>
|
||||||
@@ -316,7 +235,7 @@
|
|||||||
<value>cameraPictureCtrl5</value>
|
<value>cameraPictureCtrl5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl5.Type" xml:space="preserve">
|
<data name=">>cameraPictureCtrl5.Type" xml:space="preserve">
|
||||||
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.655.1, Culture=neutral, PublicKeyToken=null</value>
|
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.668.1, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl5.Parent" xml:space="preserve">
|
<data name=">>cameraPictureCtrl5.Parent" xml:space="preserve">
|
||||||
<value>splitContainer.Panel2</value>
|
<value>splitContainer.Panel2</value>
|
||||||
@@ -325,10 +244,10 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl4.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="cameraPictureCtrl4.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>3, 323</value>
|
<value>3, 290</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl4.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cameraPictureCtrl4.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>334, 320</value>
|
<value>333, 288</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl4.TabIndex" type="System.Int32, mscorlib">
|
<data name="cameraPictureCtrl4.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
@@ -337,7 +256,7 @@
|
|||||||
<value>cameraPictureCtrl4</value>
|
<value>cameraPictureCtrl4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl4.Type" xml:space="preserve">
|
<data name=">>cameraPictureCtrl4.Type" xml:space="preserve">
|
||||||
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.655.1, Culture=neutral, PublicKeyToken=null</value>
|
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.668.1, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl4.Parent" xml:space="preserve">
|
<data name=">>cameraPictureCtrl4.Parent" xml:space="preserve">
|
||||||
<value>splitContainer.Panel2</value>
|
<value>splitContainer.Panel2</value>
|
||||||
@@ -346,10 +265,10 @@
|
|||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl3.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="cameraPictureCtrl3.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>673, 3</value>
|
<value>667, 3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl3.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cameraPictureCtrl3.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>334, 320</value>
|
<value>333, 288</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl3.TabIndex" type="System.Int32, mscorlib">
|
<data name="cameraPictureCtrl3.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
@@ -358,7 +277,7 @@
|
|||||||
<value>cameraPictureCtrl3</value>
|
<value>cameraPictureCtrl3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl3.Type" xml:space="preserve">
|
<data name=">>cameraPictureCtrl3.Type" xml:space="preserve">
|
||||||
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.655.1, Culture=neutral, PublicKeyToken=null</value>
|
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.668.1, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl3.Parent" xml:space="preserve">
|
<data name=">>cameraPictureCtrl3.Parent" xml:space="preserve">
|
||||||
<value>splitContainer.Panel2</value>
|
<value>splitContainer.Panel2</value>
|
||||||
@@ -367,10 +286,10 @@
|
|||||||
<value>3</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl2.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="cameraPictureCtrl2.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>338, 3</value>
|
<value>335, 3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cameraPictureCtrl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>334, 320</value>
|
<value>333, 288</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="cameraPictureCtrl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@@ -379,7 +298,7 @@
|
|||||||
<value>cameraPictureCtrl2</value>
|
<value>cameraPictureCtrl2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl2.Type" xml:space="preserve">
|
<data name=">>cameraPictureCtrl2.Type" xml:space="preserve">
|
||||||
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.655.1, Culture=neutral, PublicKeyToken=null</value>
|
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.668.1, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl2.Parent" xml:space="preserve">
|
<data name=">>cameraPictureCtrl2.Parent" xml:space="preserve">
|
||||||
<value>splitContainer.Panel2</value>
|
<value>splitContainer.Panel2</value>
|
||||||
@@ -391,7 +310,7 @@
|
|||||||
<value>3, 3</value>
|
<value>3, 3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="cameraPictureCtrl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>334, 320</value>
|
<value>333, 288</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cameraPictureCtrl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="cameraPictureCtrl1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@@ -400,7 +319,7 @@
|
|||||||
<value>cameraPictureCtrl1</value>
|
<value>cameraPictureCtrl1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl1.Type" xml:space="preserve">
|
<data name=">>cameraPictureCtrl1.Type" xml:space="preserve">
|
||||||
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.655.1, Culture=neutral, PublicKeyToken=null</value>
|
<value>TBF.UiControls.CameraPictureCtrl, TBF, Version=2.16.668.1, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>cameraPictureCtrl1.Parent" xml:space="preserve">
|
<data name=">>cameraPictureCtrl1.Parent" xml:space="preserve">
|
||||||
<value>splitContainer.Panel2</value>
|
<value>splitContainer.Panel2</value>
|
||||||
@@ -424,7 +343,7 @@
|
|||||||
<value>1033, 689</value>
|
<value>1033, 689</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="splitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
<data name="splitContainer.SplitterDistance" type="System.Int32, mscorlib">
|
||||||
<value>42</value>
|
<value>30</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="splitContainer.TabIndex" type="System.Int32, mscorlib">
|
<data name="splitContainer.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
|
|||||||
@@ -1692,6 +1692,7 @@
|
|||||||
<Compile Include="UiBridge\AdjustmentInProgressEventArgs.cs" />
|
<Compile Include="UiBridge\AdjustmentInProgressEventArgs.cs" />
|
||||||
<Compile Include="UiBridge\Bridge.cs" />
|
<Compile Include="UiBridge\Bridge.cs" />
|
||||||
<Compile Include="UiBridge\ButtonsEtcEventArgs.cs" />
|
<Compile Include="UiBridge\ButtonsEtcEventArgs.cs" />
|
||||||
|
<Compile Include="UiBridge\CameraInfoEventArgs.cs" />
|
||||||
<Compile Include="UiBridge\EmergencyStopEventArgs.cs" />
|
<Compile Include="UiBridge\EmergencyStopEventArgs.cs" />
|
||||||
<Compile Include="UiBridge\Enums.cs" />
|
<Compile Include="UiBridge\Enums.cs" />
|
||||||
<Compile Include="UiBridge\ImageEventArgs.cs" />
|
<Compile Include="UiBridge\ImageEventArgs.cs" />
|
||||||
|
|||||||
@@ -142,6 +142,17 @@ namespace TBF.UiBridge
|
|||||||
public static event EventHandler<ProcedureCompletedEventArgs> ProcedureCompletedHandler;
|
public static event EventHandler<ProcedureCompletedEventArgs> ProcedureCompletedHandler;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called from a camera when camera state (shown as a caption in PicturesTabPage) changes
|
||||||
|
/// </summary>
|
||||||
|
public static void OnCameraInfo(int cameraIdx, string info)
|
||||||
|
{
|
||||||
|
if (CameraInfoHandler == null) return;
|
||||||
|
try { CameraInfoHandler(null, new CameraInfoEventArgs(cameraIdx, info)); }
|
||||||
|
catch (Exception e) { log.Error("CameraInfoHandler(...) failed", e); }
|
||||||
|
}
|
||||||
|
public static event EventHandler<CameraInfoEventArgs> CameraInfoHandler;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called from any RTP listener thread (e.g. MJpeg RTP listener thread)
|
/// Called from any RTP listener thread (e.g. MJpeg RTP listener thread)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace TBF.UiBridge
|
||||||
|
{
|
||||||
|
public class CameraInfoEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public int CameraIdx;
|
||||||
|
public string Info;
|
||||||
|
|
||||||
|
public CameraInfoEventArgs(int cameraIdx, string info)
|
||||||
|
{
|
||||||
|
this.CameraIdx = cameraIdx;
|
||||||
|
this.Info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-58
@@ -34,14 +34,9 @@ namespace TBF.UiControls
|
|||||||
this.pictureBox = new System.Windows.Forms.PictureBox();
|
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||||
this.groupBox = new System.Windows.Forms.GroupBox();
|
this.groupBox = new System.Windows.Forms.GroupBox();
|
||||||
this.ledPictureBox = new System.Windows.Forms.PictureBox();
|
this.ledPictureBox = new System.Windows.Forms.PictureBox();
|
||||||
this.trackBar = new System.Windows.Forms.TrackBar();
|
|
||||||
this.liveButton = new System.Windows.Forms.Button();
|
|
||||||
this.focusButton = new System.Windows.Forms.Button();
|
|
||||||
this.grabButton = new System.Windows.Forms.Button();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||||
this.groupBox.SuspendLayout();
|
this.groupBox.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// pictureBox
|
// pictureBox
|
||||||
@@ -55,65 +50,25 @@ namespace TBF.UiControls
|
|||||||
//
|
//
|
||||||
// groupBox
|
// groupBox
|
||||||
//
|
//
|
||||||
|
this.groupBox.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.groupBox.Controls.Add(this.ledPictureBox);
|
this.groupBox.Controls.Add(this.ledPictureBox);
|
||||||
this.groupBox.Controls.Add(this.trackBar);
|
|
||||||
this.groupBox.Controls.Add(this.liveButton);
|
|
||||||
this.groupBox.Controls.Add(this.focusButton);
|
|
||||||
this.groupBox.Controls.Add(this.grabButton);
|
|
||||||
this.groupBox.Controls.Add(this.pictureBox);
|
this.groupBox.Controls.Add(this.pictureBox);
|
||||||
|
this.groupBox.ForeColor = System.Drawing.Color.Black;
|
||||||
this.groupBox.Location = new System.Drawing.Point(0, 0);
|
this.groupBox.Location = new System.Drawing.Point(0, 0);
|
||||||
this.groupBox.Name = "groupBox";
|
this.groupBox.Name = "groupBox";
|
||||||
this.groupBox.Size = new System.Drawing.Size(332, 315);
|
this.groupBox.Size = new System.Drawing.Size(332, 280);
|
||||||
this.groupBox.TabIndex = 1;
|
this.groupBox.TabIndex = 1;
|
||||||
this.groupBox.TabStop = false;
|
this.groupBox.TabStop = false;
|
||||||
this.groupBox.Text = "Camera ";
|
this.groupBox.Text = "Camera ";
|
||||||
//
|
//
|
||||||
// ledPictureBox
|
// ledPictureBox
|
||||||
//
|
//
|
||||||
this.ledPictureBox.Location = new System.Drawing.Point(6, 279);
|
this.ledPictureBox.Location = new System.Drawing.Point(6, 261);
|
||||||
this.ledPictureBox.Name = "ledPictureBox";
|
this.ledPictureBox.Name = "ledPictureBox";
|
||||||
this.ledPictureBox.Size = new System.Drawing.Size(15, 15);
|
this.ledPictureBox.Size = new System.Drawing.Size(15, 15);
|
||||||
this.ledPictureBox.TabIndex = 5;
|
this.ledPictureBox.TabIndex = 5;
|
||||||
this.ledPictureBox.TabStop = false;
|
this.ledPictureBox.TabStop = false;
|
||||||
//
|
//
|
||||||
// trackBar
|
|
||||||
//
|
|
||||||
this.trackBar.Location = new System.Drawing.Point(200, 264);
|
|
||||||
this.trackBar.Name = "trackBar";
|
|
||||||
this.trackBar.Size = new System.Drawing.Size(126, 45);
|
|
||||||
this.trackBar.TabIndex = 4;
|
|
||||||
this.trackBar.Scroll += new System.EventHandler(this.trackBar_Scroll);
|
|
||||||
//
|
|
||||||
// liveButton
|
|
||||||
//
|
|
||||||
this.liveButton.Location = new System.Drawing.Point(81, 264);
|
|
||||||
this.liveButton.Name = "liveButton";
|
|
||||||
this.liveButton.Size = new System.Drawing.Size(56, 45);
|
|
||||||
this.liveButton.TabIndex = 3;
|
|
||||||
this.liveButton.Text = "Live";
|
|
||||||
this.liveButton.UseVisualStyleBackColor = true;
|
|
||||||
this.liveButton.Click += new System.EventHandler(this.liveButton_Click);
|
|
||||||
//
|
|
||||||
// focusButton
|
|
||||||
//
|
|
||||||
this.focusButton.Location = new System.Drawing.Point(138, 264);
|
|
||||||
this.focusButton.Name = "focusButton";
|
|
||||||
this.focusButton.Size = new System.Drawing.Size(56, 45);
|
|
||||||
this.focusButton.TabIndex = 2;
|
|
||||||
this.focusButton.Text = "Focus";
|
|
||||||
this.focusButton.UseVisualStyleBackColor = true;
|
|
||||||
this.focusButton.Click += new System.EventHandler(this.focusButton_Click);
|
|
||||||
//
|
|
||||||
// grabButton
|
|
||||||
//
|
|
||||||
this.grabButton.Location = new System.Drawing.Point(24, 264);
|
|
||||||
this.grabButton.Name = "grabButton";
|
|
||||||
this.grabButton.Size = new System.Drawing.Size(56, 45);
|
|
||||||
this.grabButton.TabIndex = 1;
|
|
||||||
this.grabButton.Text = "Grab";
|
|
||||||
this.grabButton.UseVisualStyleBackColor = true;
|
|
||||||
this.grabButton.Click += new System.EventHandler(this.grabButton_Click);
|
|
||||||
//
|
|
||||||
// CameraPictureCtrl
|
// CameraPictureCtrl
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -121,12 +76,10 @@ namespace TBF.UiControls
|
|||||||
this.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
this.BackColor = System.Drawing.SystemColors.ButtonShadow;
|
||||||
this.Controls.Add(this.groupBox);
|
this.Controls.Add(this.groupBox);
|
||||||
this.Name = "CameraPictureCtrl";
|
this.Name = "CameraPictureCtrl";
|
||||||
this.Size = new System.Drawing.Size(334, 320);
|
this.Size = new System.Drawing.Size(332, 280);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||||
this.groupBox.ResumeLayout(false);
|
this.groupBox.ResumeLayout(false);
|
||||||
this.groupBox.PerformLayout();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.trackBar)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -134,11 +87,7 @@ namespace TBF.UiControls
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.PictureBox pictureBox;
|
private System.Windows.Forms.PictureBox pictureBox;
|
||||||
private System.Windows.Forms.GroupBox groupBox;
|
private System.Windows.Forms.GroupBox groupBox;
|
||||||
private System.Windows.Forms.Button liveButton;
|
private System.Windows.Forms.PictureBox ledPictureBox;
|
||||||
private System.Windows.Forms.Button focusButton;
|
|
||||||
private System.Windows.Forms.Button grabButton;
|
|
||||||
private System.Windows.Forms.PictureBox ledPictureBox;
|
|
||||||
private System.Windows.Forms.TrackBar trackBar;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,36 +10,35 @@ namespace TBF.UiControls
|
|||||||
{
|
{
|
||||||
public partial class CameraPictureCtrl : UserControl
|
public partial class CameraPictureCtrl : UserControl
|
||||||
{
|
{
|
||||||
public PictureBox PictureBox { get { return pictureBox; } }
|
private DateTime imageTimeStamp;
|
||||||
|
|
||||||
|
public Image Image
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
pictureBox.Image = value;
|
||||||
|
imageTimeStamp = DateTime.Now;
|
||||||
|
ledPictureBox.BackColor = Color.Red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Caption
|
||||||
|
{
|
||||||
|
set { groupBox.Text = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public CameraPictureCtrl()
|
public CameraPictureCtrl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
groupBox.Text = Strings.Camera;
|
groupBox.Text = "No info available";
|
||||||
grabButton.Text = Strings.Grab;
|
|
||||||
liveButton.Text = Strings.Live;
|
|
||||||
focusButton.Text = Strings.Focus;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void grabButton_Click(object sender, EventArgs e)
|
public void UpdateLed(DateTime now)
|
||||||
{
|
{
|
||||||
|
ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500))
|
||||||
}
|
? SystemColors.Control
|
||||||
|
: Color.Red;
|
||||||
private void liveButton_Click(object sender, EventArgs e)
|
}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void focusButton_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void trackBar_Scroll(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user