Resizing of camera pictures using '+' and '-' buttons implemented. TODO: Full screen mode, ver. 2.17.699
This commit is contained in:
@@ -383,6 +383,15 @@ namespace Config.Entities
|
|||||||
Count
|
Count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum CameraDisplayResolution
|
||||||
|
{
|
||||||
|
Small,
|
||||||
|
Medium,
|
||||||
|
Large,
|
||||||
|
// FullScreen,
|
||||||
|
Count,
|
||||||
|
}
|
||||||
|
|
||||||
public enum ErrorFlagsMode : sbyte
|
public enum ErrorFlagsMode : sbyte
|
||||||
{
|
{
|
||||||
#if LANG_DE
|
#if LANG_DE
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.17.693.0")]
|
[assembly: AssemblyVersion("2.17.700.0")]
|
||||||
[assembly: AssemblyFileVersion("2.17.693.0")]
|
[assembly: AssemblyFileVersion("2.17.700.0")]
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ namespace TBF
|
|||||||
public int PopupResultsTop;
|
public int PopupResultsTop;
|
||||||
public int PopupResultsWidth;
|
public int PopupResultsWidth;
|
||||||
public int PopupResultsHeight;
|
public int PopupResultsHeight;
|
||||||
|
|
||||||
|
public Config.Entities.CameraDisplayResolution Resolution;
|
||||||
|
|
||||||
|
|
||||||
[XmlArrayAttribute("ComponentsColumnWidths")]
|
[XmlArrayAttribute("ComponentsColumnWidths")]
|
||||||
|
|||||||
@@ -302,11 +302,16 @@ namespace TBF
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void MainWnd_KeyPress(object sender, KeyPressEventArgs e)
|
private void MainWnd_KeyPress(object sender, KeyPressEventArgs e)
|
||||||
{
|
{
|
||||||
if (BenchControlPanel != null && BenchControlPanel.ProcessKey(e.KeyChar))
|
if (BenchControlPanel != null && BenchControlPanel.ProcessKey(e.KeyChar))
|
||||||
{
|
{
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
log.WarnFormat("'{0}' key pressed, handled by BenchControlPanel", e.KeyChar);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.WarnFormat("'{0}' key pressed, not handled", e.KeyChar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked from the UiBridge to update the activity label.
|
/// Invoked from the UiBridge to update the activity label.
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("2.17.697.1")]
|
[assembly: AssemblyVersion("2.17.699.1")]
|
||||||
[assembly: AssemblyFileVersion("2.17.697.1")]
|
[assembly: AssemblyFileVersion("2.17.699.1")]
|
||||||
|
|||||||
+46
-1
@@ -33,6 +33,13 @@ namespace TBF.Screens
|
|||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PicturesTabPageCtrl));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PicturesTabPageCtrl));
|
||||||
this.picturesFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
this.picturesFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
|
this.minusButton = new System.Windows.Forms.Button();
|
||||||
|
this.plusButton = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
|
this.splitContainer1.Panel2.SuspendLayout();
|
||||||
|
this.splitContainer1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// picturesFlowLayoutPanel
|
// picturesFlowLayoutPanel
|
||||||
@@ -42,13 +49,48 @@ namespace TBF.Screens
|
|||||||
this.picturesFlowLayoutPanel.ForeColor = System.Drawing.SystemColors.Control;
|
this.picturesFlowLayoutPanel.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
this.picturesFlowLayoutPanel.Name = "picturesFlowLayoutPanel";
|
this.picturesFlowLayoutPanel.Name = "picturesFlowLayoutPanel";
|
||||||
//
|
//
|
||||||
|
// splitContainer1
|
||||||
|
//
|
||||||
|
this.splitContainer1.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
resources.ApplyResources(this.splitContainer1, "splitContainer1");
|
||||||
|
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||||
|
this.splitContainer1.Name = "splitContainer1";
|
||||||
|
//
|
||||||
|
// splitContainer1.Panel1
|
||||||
|
//
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.picturesFlowLayoutPanel);
|
||||||
|
//
|
||||||
|
// splitContainer1.Panel2
|
||||||
|
//
|
||||||
|
this.splitContainer1.Panel2.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.splitContainer1.Panel2.Controls.Add(this.minusButton);
|
||||||
|
this.splitContainer1.Panel2.Controls.Add(this.plusButton);
|
||||||
|
//
|
||||||
|
// minusButton
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.minusButton, "minusButton");
|
||||||
|
this.minusButton.Name = "minusButton";
|
||||||
|
this.minusButton.UseVisualStyleBackColor = true;
|
||||||
|
this.minusButton.Click += new System.EventHandler(this.minusButton_Click);
|
||||||
|
//
|
||||||
|
// plusButton
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.plusButton, "plusButton");
|
||||||
|
this.plusButton.Name = "plusButton";
|
||||||
|
this.plusButton.UseVisualStyleBackColor = true;
|
||||||
|
this.plusButton.Click += new System.EventHandler(this.plusButton_Click);
|
||||||
|
//
|
||||||
// PicturesTabPageCtrl
|
// PicturesTabPageCtrl
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.Silver;
|
this.BackColor = System.Drawing.Color.Silver;
|
||||||
this.Controls.Add(this.picturesFlowLayoutPanel);
|
this.Controls.Add(this.splitContainer1);
|
||||||
this.Name = "PicturesTabPageCtrl";
|
this.Name = "PicturesTabPageCtrl";
|
||||||
|
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||||
|
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||||
|
this.splitContainer1.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -56,5 +98,8 @@ namespace TBF.Screens
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.FlowLayoutPanel picturesFlowLayoutPanel;
|
private System.Windows.Forms.FlowLayoutPanel picturesFlowLayoutPanel;
|
||||||
|
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||||
|
private System.Windows.Forms.Button minusButton;
|
||||||
|
private System.Windows.Forms.Button plusButton;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Config.Entities;
|
||||||
using TBF.Resources;
|
using TBF.Resources;
|
||||||
using TBF.UiBridge;
|
using TBF.UiBridge;
|
||||||
|
|
||||||
@@ -14,13 +15,15 @@ namespace TBF.Screens
|
|||||||
{
|
{
|
||||||
static readonly ILog log = LogManager.GetLogger(typeof(MainWnd));
|
static readonly ILog log = LogManager.GetLogger(typeof(MainWnd));
|
||||||
|
|
||||||
IList<TBF.UiControls.CameraPictureCtrl> cameraPictures;
|
CameraDisplayResolution resolution;
|
||||||
|
IList<TBF.UiControls.ICameraPicture> cameraPictures;
|
||||||
|
|
||||||
public PicturesTabPageCtrl()
|
public PicturesTabPageCtrl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
cameraPictures = new List<TBF.UiControls.CameraPictureCtrl>();
|
cameraPictures = new List<TBF.UiControls.ICameraPicture>();
|
||||||
|
resolution = Program.LocalSettings.Resolution;
|
||||||
|
|
||||||
System.Windows.Forms.Timer timer;
|
System.Windows.Forms.Timer timer;
|
||||||
timer = new System.Windows.Forms.Timer();
|
timer = new System.Windows.Forms.Timer();
|
||||||
@@ -48,7 +51,10 @@ namespace TBF.Screens
|
|||||||
private void TimerTick()
|
private void TimerTick()
|
||||||
{
|
{
|
||||||
DateTime now = DateTime.Now;
|
DateTime now = DateTime.Now;
|
||||||
foreach (var cPic in cameraPictures) cPic.UpdateLed(now);
|
for (int i = 0; i < cameraPictures.Count; i++)
|
||||||
|
{
|
||||||
|
if (cameraPictures[i] != null) cameraPictures[i].UpdateLed(now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowInfo(object sender, CameraInfoEventArgs args)
|
void ShowInfo(object sender, CameraInfoEventArgs args)
|
||||||
@@ -59,10 +65,17 @@ namespace TBF.Screens
|
|||||||
}
|
}
|
||||||
else if (args.CameraIdx == cameraPictures.Count)
|
else if (args.CameraIdx == cameraPictures.Count)
|
||||||
{
|
{
|
||||||
TBF.UiControls.CameraPictureCtrl ctrl = new TBF.UiControls.CameraPictureCtrl();
|
UserControl ctrl;
|
||||||
cameraPictures.Add(ctrl);
|
switch (resolution)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case CameraDisplayResolution.Small: ctrl = new TBF.UiControls.CameraPictureCtrl(); break;
|
||||||
|
case CameraDisplayResolution.Medium: ctrl = new TBF.UiControls.CameraPictureCtrl2(); break;
|
||||||
|
case CameraDisplayResolution.Large: ctrl = new TBF.UiControls.CameraPictureCtrl3(); break;
|
||||||
|
}
|
||||||
|
cameraPictures.Add(ctrl as TBF.UiControls.ICameraPicture);
|
||||||
picturesFlowLayoutPanel.Controls.Add(ctrl);
|
picturesFlowLayoutPanel.Controls.Add(ctrl);
|
||||||
ctrl.Caption = args.Info;
|
(ctrl as TBF.UiControls.ICameraPicture).Caption = args.Info;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -74,8 +87,57 @@ namespace TBF.Screens
|
|||||||
{
|
{
|
||||||
if (args.CameraIdx < cameraPictures.Count && cameraPictures[args.CameraIdx] != null)
|
if (args.CameraIdx < cameraPictures.Count && cameraPictures[args.CameraIdx] != null)
|
||||||
{
|
{
|
||||||
cameraPictures[args.CameraIdx].Image = args.Image;
|
cameraPictures[args.CameraIdx].NewImage = args.Image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Increase image resolution
|
||||||
|
/// </summary>
|
||||||
|
private void plusButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (resolution < CameraDisplayResolution.Count - 1)
|
||||||
|
{
|
||||||
|
Program.LocalSettings.Resolution = ++resolution;
|
||||||
|
RedrawPictures();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Decrease image resolution
|
||||||
|
/// </summary>
|
||||||
|
private void minusButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (resolution > 0)
|
||||||
|
{
|
||||||
|
Program.LocalSettings.Resolution = --resolution;
|
||||||
|
RedrawPictures();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RedrawPictures()
|
||||||
|
{
|
||||||
|
int nrControls = cameraPictures.Count;
|
||||||
|
TBF.UiControls.ICameraPicture[] oriCamPictures = new TBF.UiControls.ICameraPicture[nrControls];
|
||||||
|
for (int i = 0; i < nrControls; i++) oriCamPictures[i] = cameraPictures[i];
|
||||||
|
|
||||||
|
cameraPictures.Clear();
|
||||||
|
picturesFlowLayoutPanel.Controls.Clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < nrControls; i++)
|
||||||
|
{
|
||||||
|
UserControl ctrl;
|
||||||
|
switch (resolution)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case CameraDisplayResolution.Small: ctrl = new TBF.UiControls.CameraPictureCtrl(oriCamPictures[i]); break;
|
||||||
|
case CameraDisplayResolution.Medium: ctrl = new TBF.UiControls.CameraPictureCtrl2(oriCamPictures[i]); break;
|
||||||
|
case CameraDisplayResolution.Large: ctrl = new TBF.UiControls.CameraPictureCtrl3(oriCamPictures[i]); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
cameraPictures.Add(ctrl as TBF.UiControls.ICameraPicture);
|
||||||
|
picturesFlowLayoutPanel.Controls.Add(ctrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="picturesFlowLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="picturesFlowLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1033, 689</value>
|
<value>1009, 689</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="picturesFlowLayoutPanel.TabIndex" type="System.Int32, mscorlib">
|
<data name="picturesFlowLayoutPanel.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@@ -142,11 +142,125 @@
|
|||||||
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>picturesFlowLayoutPanel.Parent" xml:space="preserve">
|
<data name=">>picturesFlowLayoutPanel.Parent" xml:space="preserve">
|
||||||
<value>$this</value>
|
<value>splitContainer1.Panel1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>picturesFlowLayoutPanel.ZOrder" xml:space="preserve">
|
<data name=">>picturesFlowLayoutPanel.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||||
|
<value>Fill</value>
|
||||||
|
</data>
|
||||||
|
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>0, 0</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel1.Name" xml:space="preserve">
|
||||||
|
<value>splitContainer1.Panel1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel1.Parent" xml:space="preserve">
|
||||||
|
<value>splitContainer1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel1.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="minusButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
|
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||||
|
</data>
|
||||||
|
<data name="minusButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="minusButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>0, 33</value>
|
||||||
|
</data>
|
||||||
|
<data name="minusButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>23, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="minusButton.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="minusButton.Text" xml:space="preserve">
|
||||||
|
<value>-</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>minusButton.Name" xml:space="preserve">
|
||||||
|
<value>minusButton</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>minusButton.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=">>minusButton.Parent" xml:space="preserve">
|
||||||
|
<value>splitContainer1.Panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>minusButton.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="plusButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
|
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||||
|
</data>
|
||||||
|
<data name="plusButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>0, 7</value>
|
||||||
|
</data>
|
||||||
|
<data name="plusButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>23, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="plusButton.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="plusButton.Text" xml:space="preserve">
|
||||||
|
<value>+</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>plusButton.Name" xml:space="preserve">
|
||||||
|
<value>plusButton</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>plusButton.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=">>plusButton.Parent" xml:space="preserve">
|
||||||
|
<value>splitContainer1.Panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>plusButton.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel2.Name" xml:space="preserve">
|
||||||
|
<value>splitContainer1.Panel2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel2.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel2.Parent" xml:space="preserve">
|
||||||
|
<value>splitContainer1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Panel2.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="splitContainer1.Panel2MinSize" type="System.Int32, mscorlib">
|
||||||
|
<value>23</value>
|
||||||
|
</data>
|
||||||
|
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>1033, 689</value>
|
||||||
|
</data>
|
||||||
|
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
|
||||||
|
<value>1009</value>
|
||||||
|
</data>
|
||||||
|
<data name="splitContainer1.SplitterWidth" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Name" xml:space="preserve">
|
||||||
|
<value>splitContainer1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.Parent" xml:space="preserve">
|
||||||
|
<value>$this</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>splitContainer1.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
@@ -1725,6 +1725,25 @@
|
|||||||
<Compile Include="UiControls\CameraPictureCtrl.Designer.cs">
|
<Compile Include="UiControls\CameraPictureCtrl.Designer.cs">
|
||||||
<DependentUpon>CameraPictureCtrl.cs</DependentUpon>
|
<DependentUpon>CameraPictureCtrl.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UiControls\CameraPictureCtrl2.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UiControls\CameraPictureCtrl2.designer.cs">
|
||||||
|
<DependentUpon>CameraPictureCtrl2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UiControls\CameraPictureCtrl3.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UiControls\CameraPictureCtrl3.designer.cs">
|
||||||
|
<DependentUpon>CameraPictureCtrl3.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UiControls\CameraPictureFullCtrl.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UiControls\CameraPictureFullCtrl.designer.cs">
|
||||||
|
<DependentUpon>CameraPictureFullCtrl.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UiControls\ICameraPicture.cs" />
|
||||||
<Compile Include="UiControls\IParentOfListViewEx.cs" />
|
<Compile Include="UiControls\IParentOfListViewEx.cs" />
|
||||||
<Compile Include="UiControls\ITabWithListViewEx.cs" />
|
<Compile Include="UiControls\ITabWithListViewEx.cs" />
|
||||||
<Compile Include="UiControls\IMetrologyDlgTab.cs" />
|
<Compile Include="UiControls\IMetrologyDlgTab.cs" />
|
||||||
@@ -2511,6 +2530,15 @@
|
|||||||
<EmbeddedResource Include="UiControls\CameraPictureCtrl.resx">
|
<EmbeddedResource Include="UiControls\CameraPictureCtrl.resx">
|
||||||
<DependentUpon>CameraPictureCtrl.cs</DependentUpon>
|
<DependentUpon>CameraPictureCtrl.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UiControls\CameraPictureCtrl2.resx">
|
||||||
|
<DependentUpon>CameraPictureCtrl2.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UiControls\CameraPictureCtrl3.resx">
|
||||||
|
<DependentUpon>CameraPictureCtrl3.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UiControls\CameraPictureFullCtrl.resx">
|
||||||
|
<DependentUpon>CameraPictureFullCtrl.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="UiControls\MetrologyDlgDensityTab.resx">
|
<EmbeddedResource Include="UiControls\MetrologyDlgDensityTab.resx">
|
||||||
<DependentUpon>MetrologyDlgDensityTab.cs</DependentUpon>
|
<DependentUpon>MetrologyDlgDensityTab.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ using TBF.Resources;
|
|||||||
|
|
||||||
namespace TBF.UiControls
|
namespace TBF.UiControls
|
||||||
{
|
{
|
||||||
public partial class CameraPictureCtrl : UserControl
|
public partial class CameraPictureCtrl : UserControl, ICameraPicture
|
||||||
{
|
{
|
||||||
private DateTime imageTimeStamp;
|
private DateTime imageTimeStamp;
|
||||||
|
|
||||||
public Image Image
|
public Image NewImage
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
@@ -21,12 +21,26 @@ namespace TBF.UiControls
|
|||||||
ledPictureBox.BackColor = Color.Red;
|
ledPictureBox.BackColor = Color.Red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Image Image
|
||||||
|
{
|
||||||
|
set { pictureBox.Image = value; }
|
||||||
|
get { return pictureBox.Image; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime TimeStamp
|
||||||
|
{
|
||||||
|
set { imageTimeStamp = value; }
|
||||||
|
get { return imageTimeStamp; }
|
||||||
|
}
|
||||||
|
|
||||||
public string Caption
|
public string Caption
|
||||||
{
|
{
|
||||||
set { captionLabel.Text = value; }
|
set { captionLabel.Text = value; }
|
||||||
|
get { return captionLabel.Text; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public CameraPictureCtrl()
|
public CameraPictureCtrl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -34,6 +48,18 @@ namespace TBF.UiControls
|
|||||||
captionLabel.Text = "No info available";
|
captionLabel.Text = "No info available";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CameraPictureCtrl(ICameraPicture oriCamPicture)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
captionLabel.Text = oriCamPicture.Caption;
|
||||||
|
pictureBox.Image = oriCamPicture.Image;
|
||||||
|
imageTimeStamp = oriCamPicture.TimeStamp;
|
||||||
|
|
||||||
|
UpdateLed(DateTime.Now);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void UpdateLed(DateTime now)
|
public void UpdateLed(DateTime now)
|
||||||
{
|
{
|
||||||
ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500))
|
ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500))
|
||||||
|
|||||||
@@ -0,0 +1,130 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
partial class CameraPictureCtrl2
|
||||||
|
{
|
||||||
|
/// <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.captionLabel = new System.Windows.Forms.Label();
|
||||||
|
this.ledPictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
this.stopButton = new System.Windows.Forms.Button();
|
||||||
|
this.saveButton = new System.Windows.Forms.Button();
|
||||||
|
this.maxButton = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// captionLabel
|
||||||
|
//
|
||||||
|
this.captionLabel.AutoSize = true;
|
||||||
|
this.captionLabel.ForeColor = System.Drawing.Color.Black;
|
||||||
|
this.captionLabel.Location = new System.Drawing.Point(16, 4);
|
||||||
|
this.captionLabel.Name = "captionLabel";
|
||||||
|
this.captionLabel.Size = new System.Drawing.Size(86, 13);
|
||||||
|
this.captionLabel.TabIndex = 6;
|
||||||
|
this.captionLabel.Text = "No info available";
|
||||||
|
//
|
||||||
|
// ledPictureBox
|
||||||
|
//
|
||||||
|
this.ledPictureBox.Location = new System.Drawing.Point(2, 4);
|
||||||
|
this.ledPictureBox.Name = "ledPictureBox";
|
||||||
|
this.ledPictureBox.Size = new System.Drawing.Size(12, 12);
|
||||||
|
this.ledPictureBox.TabIndex = 5;
|
||||||
|
this.ledPictureBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// pictureBox
|
||||||
|
//
|
||||||
|
this.pictureBox.Location = new System.Drawing.Point(2, 20);
|
||||||
|
this.pictureBox.Name = "pictureBox";
|
||||||
|
this.pictureBox.Size = new System.Drawing.Size(444, 333);
|
||||||
|
this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||||
|
this.pictureBox.TabIndex = 0;
|
||||||
|
this.pictureBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// stopButton
|
||||||
|
//
|
||||||
|
this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.stopButton.Location = new System.Drawing.Point(373, 1);
|
||||||
|
this.stopButton.Name = "stopButton";
|
||||||
|
this.stopButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.stopButton.TabIndex = 7;
|
||||||
|
this.stopButton.UseVisualStyleBackColor = true;
|
||||||
|
this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
|
||||||
|
//
|
||||||
|
// saveButton
|
||||||
|
//
|
||||||
|
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.saveButton.Location = new System.Drawing.Point(398, 1);
|
||||||
|
this.saveButton.Name = "saveButton";
|
||||||
|
this.saveButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.saveButton.TabIndex = 8;
|
||||||
|
this.saveButton.UseVisualStyleBackColor = true;
|
||||||
|
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||||
|
//
|
||||||
|
// maxButton
|
||||||
|
//
|
||||||
|
this.maxButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.maxButton.Location = new System.Drawing.Point(423, 1);
|
||||||
|
this.maxButton.Name = "maxButton";
|
||||||
|
this.maxButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.maxButton.TabIndex = 9;
|
||||||
|
this.maxButton.UseVisualStyleBackColor = true;
|
||||||
|
this.maxButton.Click += new System.EventHandler(this.maxButton_Click);
|
||||||
|
//
|
||||||
|
// CameraPictureCtrl2
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.Controls.Add(this.maxButton);
|
||||||
|
this.Controls.Add(this.saveButton);
|
||||||
|
this.Controls.Add(this.stopButton);
|
||||||
|
this.Controls.Add(this.pictureBox);
|
||||||
|
this.Controls.Add(this.captionLabel);
|
||||||
|
this.Controls.Add(this.ledPictureBox);
|
||||||
|
this.Name = "CameraPictureCtrl2";
|
||||||
|
this.Size = new System.Drawing.Size(448, 355);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox ledPictureBox;
|
||||||
|
private System.Windows.Forms.Label captionLabel;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox;
|
||||||
|
private System.Windows.Forms.Button stopButton;
|
||||||
|
private System.Windows.Forms.Button saveButton;
|
||||||
|
private System.Windows.Forms.Button maxButton;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TBF.Resources;
|
||||||
|
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
public partial class CameraPictureCtrl2 : UserControl, ICameraPicture
|
||||||
|
{
|
||||||
|
private DateTime imageTimeStamp;
|
||||||
|
|
||||||
|
public Image NewImage
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
pictureBox.Image = value;
|
||||||
|
imageTimeStamp = DateTime.Now;
|
||||||
|
ledPictureBox.BackColor = Color.Red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Image Image
|
||||||
|
{
|
||||||
|
set { pictureBox.Image = value; }
|
||||||
|
get { return pictureBox.Image; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime TimeStamp
|
||||||
|
{
|
||||||
|
set { imageTimeStamp = value; }
|
||||||
|
get { return imageTimeStamp; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Caption
|
||||||
|
{
|
||||||
|
set { captionLabel.Text = value; }
|
||||||
|
get { return captionLabel.Text; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public CameraPictureCtrl2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
captionLabel.Text = "No info available";
|
||||||
|
}
|
||||||
|
|
||||||
|
public CameraPictureCtrl2(ICameraPicture oriCamPicture)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
captionLabel.Text = oriCamPicture.Caption;
|
||||||
|
pictureBox.Image = oriCamPicture.Image;
|
||||||
|
imageTimeStamp = oriCamPicture.TimeStamp;
|
||||||
|
|
||||||
|
UpdateLed(DateTime.Now);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void UpdateLed(DateTime now)
|
||||||
|
{
|
||||||
|
ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500))
|
||||||
|
? SystemColors.Control
|
||||||
|
: Color.Red;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maxButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,130 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
partial class CameraPictureCtrl3
|
||||||
|
{
|
||||||
|
/// <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.captionLabel = new System.Windows.Forms.Label();
|
||||||
|
this.ledPictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
this.stopButton = new System.Windows.Forms.Button();
|
||||||
|
this.saveButton = new System.Windows.Forms.Button();
|
||||||
|
this.maxButton = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// captionLabel
|
||||||
|
//
|
||||||
|
this.captionLabel.AutoSize = true;
|
||||||
|
this.captionLabel.ForeColor = System.Drawing.Color.Black;
|
||||||
|
this.captionLabel.Location = new System.Drawing.Point(16, 4);
|
||||||
|
this.captionLabel.Name = "captionLabel";
|
||||||
|
this.captionLabel.Size = new System.Drawing.Size(86, 13);
|
||||||
|
this.captionLabel.TabIndex = 6;
|
||||||
|
this.captionLabel.Text = "No info available";
|
||||||
|
//
|
||||||
|
// ledPictureBox
|
||||||
|
//
|
||||||
|
this.ledPictureBox.Location = new System.Drawing.Point(2, 4);
|
||||||
|
this.ledPictureBox.Name = "ledPictureBox";
|
||||||
|
this.ledPictureBox.Size = new System.Drawing.Size(12, 12);
|
||||||
|
this.ledPictureBox.TabIndex = 5;
|
||||||
|
this.ledPictureBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// pictureBox
|
||||||
|
//
|
||||||
|
this.pictureBox.Location = new System.Drawing.Point(2, 20);
|
||||||
|
this.pictureBox.Name = "pictureBox";
|
||||||
|
this.pictureBox.Size = new System.Drawing.Size(640, 480);
|
||||||
|
this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||||
|
this.pictureBox.TabIndex = 0;
|
||||||
|
this.pictureBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// stopButton
|
||||||
|
//
|
||||||
|
this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.stopButton.Location = new System.Drawing.Point(569, 1);
|
||||||
|
this.stopButton.Name = "stopButton";
|
||||||
|
this.stopButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.stopButton.TabIndex = 7;
|
||||||
|
this.stopButton.UseVisualStyleBackColor = true;
|
||||||
|
this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
|
||||||
|
//
|
||||||
|
// saveButton
|
||||||
|
//
|
||||||
|
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.saveButton.Location = new System.Drawing.Point(594, 1);
|
||||||
|
this.saveButton.Name = "saveButton";
|
||||||
|
this.saveButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.saveButton.TabIndex = 8;
|
||||||
|
this.saveButton.UseVisualStyleBackColor = true;
|
||||||
|
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||||
|
//
|
||||||
|
// maxButton
|
||||||
|
//
|
||||||
|
this.maxButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.maxButton.Location = new System.Drawing.Point(619, 1);
|
||||||
|
this.maxButton.Name = "maxButton";
|
||||||
|
this.maxButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.maxButton.TabIndex = 9;
|
||||||
|
this.maxButton.UseVisualStyleBackColor = true;
|
||||||
|
this.maxButton.Click += new System.EventHandler(this.maxButton_Click);
|
||||||
|
//
|
||||||
|
// CameraPictureCtrl3
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.Controls.Add(this.maxButton);
|
||||||
|
this.Controls.Add(this.saveButton);
|
||||||
|
this.Controls.Add(this.stopButton);
|
||||||
|
this.Controls.Add(this.pictureBox);
|
||||||
|
this.Controls.Add(this.captionLabel);
|
||||||
|
this.Controls.Add(this.ledPictureBox);
|
||||||
|
this.Name = "CameraPictureCtrl3";
|
||||||
|
this.Size = new System.Drawing.Size(644, 502);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox ledPictureBox;
|
||||||
|
private System.Windows.Forms.Label captionLabel;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox;
|
||||||
|
private System.Windows.Forms.Button stopButton;
|
||||||
|
private System.Windows.Forms.Button saveButton;
|
||||||
|
private System.Windows.Forms.Button maxButton;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TBF.Resources;
|
||||||
|
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
public partial class CameraPictureCtrl3 : UserControl, ICameraPicture
|
||||||
|
{
|
||||||
|
private DateTime imageTimeStamp;
|
||||||
|
|
||||||
|
public Image NewImage
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
pictureBox.Image = value;
|
||||||
|
imageTimeStamp = DateTime.Now;
|
||||||
|
ledPictureBox.BackColor = Color.Red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Image Image
|
||||||
|
{
|
||||||
|
set { pictureBox.Image = value; }
|
||||||
|
get { return pictureBox.Image; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime TimeStamp
|
||||||
|
{
|
||||||
|
set { imageTimeStamp = value; }
|
||||||
|
get { return imageTimeStamp; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Caption
|
||||||
|
{
|
||||||
|
set { captionLabel.Text = value; }
|
||||||
|
get { return captionLabel.Text; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public CameraPictureCtrl3()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
captionLabel.Text = "No info available";
|
||||||
|
}
|
||||||
|
|
||||||
|
public CameraPictureCtrl3(ICameraPicture oriCamPicture)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
captionLabel.Text = oriCamPicture.Caption;
|
||||||
|
pictureBox.Image = oriCamPicture.Image;
|
||||||
|
imageTimeStamp = oriCamPicture.TimeStamp;
|
||||||
|
|
||||||
|
UpdateLed(DateTime.Now);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void UpdateLed(DateTime now)
|
||||||
|
{
|
||||||
|
ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500))
|
||||||
|
? SystemColors.Control
|
||||||
|
: Color.Red;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maxButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,161 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
partial class CameraPictureFullCtrl
|
||||||
|
{
|
||||||
|
/// <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.captionLabel = new System.Windows.Forms.Label();
|
||||||
|
this.ledPictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
this.stopButton = new System.Windows.Forms.Button();
|
||||||
|
this.saveButton = new System.Windows.Forms.Button();
|
||||||
|
this.maxButton = new System.Windows.Forms.Button();
|
||||||
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
|
this.splitContainer1.Panel2.SuspendLayout();
|
||||||
|
this.splitContainer1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// captionLabel
|
||||||
|
//
|
||||||
|
this.captionLabel.AutoSize = true;
|
||||||
|
this.captionLabel.ForeColor = System.Drawing.Color.Black;
|
||||||
|
this.captionLabel.Location = new System.Drawing.Point(16, 2);
|
||||||
|
this.captionLabel.Name = "captionLabel";
|
||||||
|
this.captionLabel.Size = new System.Drawing.Size(86, 13);
|
||||||
|
this.captionLabel.TabIndex = 6;
|
||||||
|
this.captionLabel.Text = "No info available";
|
||||||
|
//
|
||||||
|
// ledPictureBox
|
||||||
|
//
|
||||||
|
this.ledPictureBox.Location = new System.Drawing.Point(4, 2);
|
||||||
|
this.ledPictureBox.Name = "ledPictureBox";
|
||||||
|
this.ledPictureBox.Size = new System.Drawing.Size(12, 12);
|
||||||
|
this.ledPictureBox.TabIndex = 5;
|
||||||
|
this.ledPictureBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// pictureBox
|
||||||
|
//
|
||||||
|
this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.pictureBox.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.pictureBox.Name = "pictureBox";
|
||||||
|
this.pictureBox.Size = new System.Drawing.Size(964, 720);
|
||||||
|
this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
|
this.pictureBox.TabIndex = 0;
|
||||||
|
this.pictureBox.TabStop = false;
|
||||||
|
//
|
||||||
|
// stopButton
|
||||||
|
//
|
||||||
|
this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.stopButton.Location = new System.Drawing.Point(890, 0);
|
||||||
|
this.stopButton.Name = "stopButton";
|
||||||
|
this.stopButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.stopButton.TabIndex = 7;
|
||||||
|
this.stopButton.UseVisualStyleBackColor = true;
|
||||||
|
this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
|
||||||
|
//
|
||||||
|
// saveButton
|
||||||
|
//
|
||||||
|
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.saveButton.Location = new System.Drawing.Point(915, 0);
|
||||||
|
this.saveButton.Name = "saveButton";
|
||||||
|
this.saveButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.saveButton.TabIndex = 8;
|
||||||
|
this.saveButton.UseVisualStyleBackColor = true;
|
||||||
|
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
|
||||||
|
//
|
||||||
|
// maxButton
|
||||||
|
//
|
||||||
|
this.maxButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.maxButton.Location = new System.Drawing.Point(940, 0);
|
||||||
|
this.maxButton.Name = "maxButton";
|
||||||
|
this.maxButton.Size = new System.Drawing.Size(24, 18);
|
||||||
|
this.maxButton.TabIndex = 9;
|
||||||
|
this.maxButton.UseVisualStyleBackColor = true;
|
||||||
|
this.maxButton.Click += new System.EventHandler(this.maxButton_Click);
|
||||||
|
//
|
||||||
|
// splitContainer1
|
||||||
|
//
|
||||||
|
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.splitContainer1.IsSplitterFixed = true;
|
||||||
|
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.splitContainer1.Name = "splitContainer1";
|
||||||
|
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||||
|
//
|
||||||
|
// splitContainer1.Panel1
|
||||||
|
//
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.captionLabel);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.maxButton);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.ledPictureBox);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.saveButton);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.stopButton);
|
||||||
|
this.splitContainer1.Panel1MinSize = 18;
|
||||||
|
//
|
||||||
|
// splitContainer1.Panel2
|
||||||
|
//
|
||||||
|
this.splitContainer1.Panel2.Controls.Add(this.pictureBox);
|
||||||
|
this.splitContainer1.Size = new System.Drawing.Size(964, 742);
|
||||||
|
this.splitContainer1.SplitterDistance = 18;
|
||||||
|
this.splitContainer1.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// CameraPictureFullCtrl
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||||
|
this.Controls.Add(this.splitContainer1);
|
||||||
|
this.Name = "CameraPictureFullCtrl";
|
||||||
|
this.Size = new System.Drawing.Size(964, 742);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.ledPictureBox)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||||
|
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||||
|
this.splitContainer1.Panel1.PerformLayout();
|
||||||
|
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||||
|
this.splitContainer1.Panel2.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||||
|
this.splitContainer1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.PictureBox ledPictureBox;
|
||||||
|
private System.Windows.Forms.Label captionLabel;
|
||||||
|
private System.Windows.Forms.PictureBox pictureBox;
|
||||||
|
private System.Windows.Forms.Button stopButton;
|
||||||
|
private System.Windows.Forms.Button saveButton;
|
||||||
|
private System.Windows.Forms.Button maxButton;
|
||||||
|
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
///
|
||||||
|
/// Copyright (c) 2017 Sensus Metering Systems
|
||||||
|
///
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using TBF.Resources;
|
||||||
|
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
public partial class CameraPictureFullCtrl : UserControl, ICameraPicture
|
||||||
|
{
|
||||||
|
private DateTime imageTimeStamp;
|
||||||
|
|
||||||
|
public Image NewImage
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
pictureBox.Image = value;
|
||||||
|
imageTimeStamp = DateTime.Now;
|
||||||
|
ledPictureBox.BackColor = Color.Red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Image Image
|
||||||
|
{
|
||||||
|
set { pictureBox.Image = value; }
|
||||||
|
get { return pictureBox.Image; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime TimeStamp
|
||||||
|
{
|
||||||
|
set { imageTimeStamp = value; }
|
||||||
|
get { return imageTimeStamp; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Caption
|
||||||
|
{
|
||||||
|
set { captionLabel.Text = value; }
|
||||||
|
get { return captionLabel.Text; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public CameraPictureFullCtrl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
captionLabel.Text = "No info available";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateLed(DateTime now)
|
||||||
|
{
|
||||||
|
ledPictureBox.BackColor = (now - imageTimeStamp > TimeSpan.FromMilliseconds(500))
|
||||||
|
? SystemColors.Control
|
||||||
|
: Color.Red;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maxButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace TBF.UiControls
|
||||||
|
{
|
||||||
|
public interface ICameraPicture
|
||||||
|
{
|
||||||
|
Image NewImage { set; }
|
||||||
|
|
||||||
|
string Caption { get; set; }
|
||||||
|
Image Image { get; set; }
|
||||||
|
DateTime TimeStamp { get; set; }
|
||||||
|
|
||||||
|
void UpdateLed(DateTime now);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user