rimozione form inutilizzate

This commit is contained in:
Samuele E. Locatelli
2021-02-18 19:18:31 +01:00
parent f9ce06f2b1
commit fc04bf50f5
7 changed files with 0 additions and 1156 deletions
-108
View File
@@ -1,108 +0,0 @@
namespace Thermo.Cam.Setup
{
partial class PlaybackForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.buttonPlay = new System.Windows.Forms.Button();
this.buttonStop = new System.Windows.Forms.Button();
this.buttonPause = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(711, 423);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// buttonPlay
//
this.buttonPlay.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonPlay.Location = new System.Drawing.Point(221, 441);
this.buttonPlay.Name = "buttonPlay";
this.buttonPlay.Size = new System.Drawing.Size(75, 23);
this.buttonPlay.TabIndex = 1;
this.buttonPlay.Text = "Play";
this.buttonPlay.UseVisualStyleBackColor = true;
this.buttonPlay.Click += new System.EventHandler(this.buttonPlay_Click);
//
// buttonStop
//
this.buttonStop.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonStop.Location = new System.Drawing.Point(383, 441);
this.buttonStop.Name = "buttonStop";
this.buttonStop.Size = new System.Drawing.Size(75, 23);
this.buttonStop.TabIndex = 1;
this.buttonStop.Text = "Stop";
this.buttonStop.UseVisualStyleBackColor = true;
this.buttonStop.Click += new System.EventHandler(this.buttonStop_Click);
//
// buttonPause
//
this.buttonPause.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonPause.Location = new System.Drawing.Point(302, 441);
this.buttonPause.Name = "buttonPause";
this.buttonPause.Size = new System.Drawing.Size(75, 23);
this.buttonPause.TabIndex = 1;
this.buttonPause.Text = "Pause";
this.buttonPause.UseVisualStyleBackColor = true;
this.buttonPause.Click += new System.EventHandler(this.buttonPause_Click);
//
// PlaybackForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(735, 469);
this.Controls.Add(this.buttonStop);
this.Controls.Add(this.buttonPause);
this.Controls.Add(this.buttonPlay);
this.Controls.Add(this.pictureBox1);
this.Name = "PlaybackForm";
this.Text = "Playback";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PlaybackForm_FormClosing);
this.Load += new System.EventHandler(this.PlaybackForm_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button buttonPlay;
private System.Windows.Forms.Button buttonStop;
private System.Windows.Forms.Button buttonPause;
}
}
-103
View File
@@ -1,103 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Flir.Atlas.Image;
namespace Thermo.Cam.Setup
{
// Simple playback of a SEQ (radiometric data) file.
// Also see IRImageReaderDemo on how to open Thermal image files.
public partial class PlaybackForm : Form
{
#region Private Fields
private readonly Timer _timer = new Timer();
private ThermalImageFile _imageFile;
#endregion Private Fields
#region Public Constructors
public PlaybackForm(string path)
{
Path = path;
InitializeComponent();
}
#endregion Public Constructors
#region Private Properties
private bool IsDirty { get; set; }
private string Path { get; set; }
#endregion Private Properties
#region Private Methods
private void _imageFile_Changed(object sender, ImageChangedEventArgs e)
{
IsDirty = true;
}
private void _timer_Tick(object sender, EventArgs e)
{
if (!IsDirty) return;
IsDirty = false;
_imageFile.EnterLock();
try
{
pictureBox1.Image = _imageFile.Image;
}
catch (Exception exception)
{
MessageBox.Show(exception.Message);
throw;
}
finally
{
_imageFile.ExitLock();
}
}
private void buttonPause_Click(object sender, EventArgs e)
{
_imageFile.ThermalSequencePlayer.Pause();
}
private void buttonPlay_Click(object sender, EventArgs e)
{
_imageFile.ThermalSequencePlayer.Play();
}
private void buttonStop_Click(object sender, EventArgs e)
{
_imageFile.ThermalSequencePlayer.Stop();
}
private void PlaybackForm_FormClosing(object sender, FormClosingEventArgs e)
{
_timer.Stop();
}
private void PlaybackForm_Load(object sender, EventArgs e)
{
_imageFile = new ThermalImageFile(Path);
_imageFile.Changed += _imageFile_Changed;
pictureBox1.Image = _imageFile.Image;
if (_imageFile.ThermalSequencePlayer.Count() > 1)
{
_timer.Interval = 20;
_timer.Tick += _timer_Tick;
_timer.Start();
}
}
#endregion Private Methods
}
}
-120
View File
@@ -1,120 +0,0 @@
<?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>
-361
View File
@@ -1,361 +0,0 @@
namespace Thermo.Cam.Setup
{
partial class RecorderForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.buttonPause = new System.Windows.Forms.Button();
this.labelOutputPath = new System.Windows.Forms.Label();
this.buttonRec = new System.Windows.Forms.Button();
this.buttonBrowse = new System.Windows.Forms.Button();
this.textBoxNumFramesPreRec = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.checkBoxPreRecording = new System.Windows.Forms.CheckBox();
this.groupBoxPreRecording = new System.Windows.Forms.GroupBox();
this.textBoxTimeSpan = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.radioButtonRecSpeed = new System.Windows.Forms.RadioButton();
this.radioButtonRecSpeedInterval = new System.Windows.Forms.RadioButton();
this.listViewRecordings = new System.Windows.Forms.ListView();
this.groupBoxRecSpeed = new System.Windows.Forms.GroupBox();
this.labelElapsedTime = new System.Windows.Forms.Label();
this.labelLostImages = new System.Windows.Forms.Label();
this.labelFrameCounter = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.labelStatus = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.btnTakeImage = new System.Windows.Forms.Button();
this.groupBoxPreRecording.SuspendLayout();
this.groupBoxRecSpeed.SuspendLayout();
this.SuspendLayout();
//
// columnHeader1
//
this.columnHeader1.Text = "Recordings";
this.columnHeader1.Width = 71;
//
// buttonPause
//
this.buttonPause.Enabled = false;
this.buttonPause.Location = new System.Drawing.Point(200, 300);
this.buttonPause.Name = "buttonPause";
this.buttonPause.Size = new System.Drawing.Size(48, 23);
this.buttonPause.TabIndex = 36;
this.buttonPause.Text = "Pause";
this.buttonPause.UseVisualStyleBackColor = true;
this.buttonPause.Click += new System.EventHandler(this.buttonPause_Click);
//
// labelOutputPath
//
this.labelOutputPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelOutputPath.Location = new System.Drawing.Point(19, 328);
this.labelOutputPath.Name = "labelOutputPath";
this.labelOutputPath.Size = new System.Drawing.Size(229, 19);
this.labelOutputPath.TabIndex = 23;
this.labelOutputPath.Text = "Path";
//
// buttonRec
//
this.buttonRec.Enabled = false;
this.buttonRec.Location = new System.Drawing.Point(146, 300);
this.buttonRec.Name = "buttonRec";
this.buttonRec.Size = new System.Drawing.Size(48, 23);
this.buttonRec.TabIndex = 35;
this.buttonRec.Text = "Rec";
this.buttonRec.UseVisualStyleBackColor = true;
this.buttonRec.Click += new System.EventHandler(this.buttonRec_Click);
//
// buttonBrowse
//
this.buttonBrowse.Location = new System.Drawing.Point(19, 300);
this.buttonBrowse.Name = "buttonBrowse";
this.buttonBrowse.Size = new System.Drawing.Size(60, 23);
this.buttonBrowse.TabIndex = 34;
this.buttonBrowse.Text = "Browse...";
this.buttonBrowse.UseVisualStyleBackColor = true;
this.buttonBrowse.Click += new System.EventHandler(this.buttonBrowse_Click);
//
// textBoxNumFramesPreRec
//
this.textBoxNumFramesPreRec.Location = new System.Drawing.Point(67, 44);
this.textBoxNumFramesPreRec.Name = "textBoxNumFramesPreRec";
this.textBoxNumFramesPreRec.Size = new System.Drawing.Size(55, 20);
this.textBoxNumFramesPreRec.TabIndex = 2;
this.textBoxNumFramesPreRec.Text = "30";
this.textBoxNumFramesPreRec.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(17, 47);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Frames:";
//
// checkBoxPreRecording
//
this.checkBoxPreRecording.AutoSize = true;
this.checkBoxPreRecording.Location = new System.Drawing.Point(17, 24);
this.checkBoxPreRecording.Name = "checkBoxPreRecording";
this.checkBoxPreRecording.Size = new System.Drawing.Size(59, 17);
this.checkBoxPreRecording.TabIndex = 0;
this.checkBoxPreRecording.Text = "Enable";
this.checkBoxPreRecording.UseVisualStyleBackColor = true;
this.checkBoxPreRecording.CheckStateChanged += new System.EventHandler(this.checkBoxPreRecording_CheckStateChanged);
//
// groupBoxPreRecording
//
this.groupBoxPreRecording.Controls.Add(this.textBoxNumFramesPreRec);
this.groupBoxPreRecording.Controls.Add(this.label2);
this.groupBoxPreRecording.Controls.Add(this.checkBoxPreRecording);
this.groupBoxPreRecording.Enabled = false;
this.groupBoxPreRecording.Location = new System.Drawing.Point(19, 222);
this.groupBoxPreRecording.Name = "groupBoxPreRecording";
this.groupBoxPreRecording.Size = new System.Drawing.Size(229, 72);
this.groupBoxPreRecording.TabIndex = 33;
this.groupBoxPreRecording.TabStop = false;
this.groupBoxPreRecording.Text = "Pre-recording";
//
// textBoxTimeSpan
//
this.textBoxTimeSpan.Location = new System.Drawing.Point(43, 65);
this.textBoxTimeSpan.Name = "textBoxTimeSpan";
this.textBoxTimeSpan.Size = new System.Drawing.Size(62, 20);
this.textBoxTimeSpan.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(108, 68);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(113, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Time span in seconds.";
//
// radioButtonRecSpeed
//
this.radioButtonRecSpeed.AutoSize = true;
this.radioButtonRecSpeed.Location = new System.Drawing.Point(12, 19);
this.radioButtonRecSpeed.Name = "radioButtonRecSpeed";
this.radioButtonRecSpeed.Size = new System.Drawing.Size(61, 17);
this.radioButtonRecSpeed.TabIndex = 2;
this.radioButtonRecSpeed.TabStop = true;
this.radioButtonRecSpeed.Text = "Highest";
this.radioButtonRecSpeed.UseVisualStyleBackColor = true;
this.radioButtonRecSpeed.CheckedChanged += new System.EventHandler(this.radioButtonRecSpeed_CheckedChanged);
//
// radioButtonRecSpeedInterval
//
this.radioButtonRecSpeedInterval.AutoSize = true;
this.radioButtonRecSpeedInterval.Location = new System.Drawing.Point(12, 42);
this.radioButtonRecSpeedInterval.Name = "radioButtonRecSpeedInterval";
this.radioButtonRecSpeedInterval.Size = new System.Drawing.Size(60, 17);
this.radioButtonRecSpeedInterval.TabIndex = 2;
this.radioButtonRecSpeedInterval.TabStop = true;
this.radioButtonRecSpeedInterval.Text = "Interval";
this.radioButtonRecSpeedInterval.UseVisualStyleBackColor = true;
//
// listViewRecordings
//
this.listViewRecordings.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1});
this.listViewRecordings.HideSelection = false;
this.listViewRecordings.Location = new System.Drawing.Point(173, 10);
this.listViewRecordings.Name = "listViewRecordings";
this.listViewRecordings.Size = new System.Drawing.Size(75, 108);
this.listViewRecordings.TabIndex = 37;
this.listViewRecordings.UseCompatibleStateImageBehavior = false;
this.listViewRecordings.View = System.Windows.Forms.View.Details;
this.listViewRecordings.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewRecordings_MouseDoubleClick);
//
// groupBoxRecSpeed
//
this.groupBoxRecSpeed.Controls.Add(this.textBoxTimeSpan);
this.groupBoxRecSpeed.Controls.Add(this.label1);
this.groupBoxRecSpeed.Controls.Add(this.radioButtonRecSpeed);
this.groupBoxRecSpeed.Controls.Add(this.radioButtonRecSpeedInterval);
this.groupBoxRecSpeed.Enabled = false;
this.groupBoxRecSpeed.Location = new System.Drawing.Point(19, 124);
this.groupBoxRecSpeed.Name = "groupBoxRecSpeed";
this.groupBoxRecSpeed.Size = new System.Drawing.Size(229, 92);
this.groupBoxRecSpeed.TabIndex = 32;
this.groupBoxRecSpeed.TabStop = false;
this.groupBoxRecSpeed.Text = "Recording speed";
//
// labelElapsedTime
//
this.labelElapsedTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelElapsedTime.Location = new System.Drawing.Point(84, 91);
this.labelElapsedTime.Name = "labelElapsedTime";
this.labelElapsedTime.Size = new System.Drawing.Size(83, 23);
this.labelElapsedTime.TabIndex = 24;
this.labelElapsedTime.Text = "0";
this.labelElapsedTime.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// labelLostImages
//
this.labelLostImages.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelLostImages.Location = new System.Drawing.Point(84, 64);
this.labelLostImages.Name = "labelLostImages";
this.labelLostImages.Size = new System.Drawing.Size(83, 23);
this.labelLostImages.TabIndex = 25;
this.labelLostImages.Text = "0";
this.labelLostImages.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// labelFrameCounter
//
this.labelFrameCounter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelFrameCounter.Location = new System.Drawing.Point(84, 37);
this.labelFrameCounter.Name = "labelFrameCounter";
this.labelFrameCounter.Size = new System.Drawing.Size(83, 23);
this.labelFrameCounter.TabIndex = 26;
this.labelFrameCounter.Text = "0";
this.labelFrameCounter.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(16, 96);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(70, 13);
this.label9.TabIndex = 27;
this.label9.Text = "Elapsed time:";
//
// labelStatus
//
this.labelStatus.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.labelStatus.Location = new System.Drawing.Point(84, 10);
this.labelStatus.Name = "labelStatus";
this.labelStatus.Size = new System.Drawing.Size(83, 23);
this.labelStatus.TabIndex = 28;
this.labelStatus.Text = "Stopped";
this.labelStatus.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(16, 69);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(66, 13);
this.label6.TabIndex = 29;
this.label6.Text = "Lost images:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 42);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 13);
this.label5.TabIndex = 30;
this.label5.Text = "Images:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 15);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(40, 13);
this.label3.TabIndex = 31;
this.label3.Text = "Status:";
//
// btnTakeImage
//
this.btnTakeImage.Location = new System.Drawing.Point(19, 359);
this.btnTakeImage.Name = "btnTakeImage";
this.btnTakeImage.Size = new System.Drawing.Size(105, 23);
this.btnTakeImage.TabIndex = 38;
this.btnTakeImage.Text = "Take Image";
this.btnTakeImage.UseVisualStyleBackColor = true;
this.btnTakeImage.Click += new System.EventHandler(this.btnTakeImage_Click);
//
// RecorderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(264, 417);
this.Controls.Add(this.btnTakeImage);
this.Controls.Add(this.buttonPause);
this.Controls.Add(this.labelOutputPath);
this.Controls.Add(this.buttonRec);
this.Controls.Add(this.buttonBrowse);
this.Controls.Add(this.groupBoxPreRecording);
this.Controls.Add(this.listViewRecordings);
this.Controls.Add(this.groupBoxRecSpeed);
this.Controls.Add(this.labelElapsedTime);
this.Controls.Add(this.labelLostImages);
this.Controls.Add(this.labelFrameCounter);
this.Controls.Add(this.label9);
this.Controls.Add(this.labelStatus);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label3);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "RecorderForm";
this.Text = "Recorder";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.RecorderForm_FormClosing);
this.Load += new System.EventHandler(this.RecorderForm_Load);
this.groupBoxPreRecording.ResumeLayout(false);
this.groupBoxPreRecording.PerformLayout();
this.groupBoxRecSpeed.ResumeLayout(false);
this.groupBoxRecSpeed.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.Button buttonPause;
private System.Windows.Forms.Label labelOutputPath;
private System.Windows.Forms.Button buttonRec;
private System.Windows.Forms.Button buttonBrowse;
private System.Windows.Forms.TextBox textBoxNumFramesPreRec;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox checkBoxPreRecording;
private System.Windows.Forms.GroupBox groupBoxPreRecording;
private System.Windows.Forms.TextBox textBoxTimeSpan;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.RadioButton radioButtonRecSpeed;
private System.Windows.Forms.RadioButton radioButtonRecSpeedInterval;
private System.Windows.Forms.ListView listViewRecordings;
private System.Windows.Forms.GroupBox groupBoxRecSpeed;
private System.Windows.Forms.Label labelElapsedTime;
private System.Windows.Forms.Label labelLostImages;
private System.Windows.Forms.Label labelFrameCounter;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label labelStatus;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnTakeImage;
}
}
-326
View File
@@ -1,326 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Flir.Atlas.Image;
using Flir.Atlas.Live;
using Flir.Atlas.Live.Device;
using Flir.Atlas.Live.Recorder;
namespace Thermo.Cam.Setup
{
public partial class RecorderForm : Form
{
#region Private Fields
private readonly Stopwatch _elapedTimeRecording = new Stopwatch();
private readonly Timer _timer = new Timer();
private int _nextIndex = 1;
private Camera _stream;
#endregion Private Fields
#region Public Constructors
public RecorderForm()
{
InitializeComponent();
}
#endregion Public Constructors
#region Public Events
/// <summary>
/// Event fired when the selected file is double clicked.
/// </summary>
public event EventHandler<SelectedFileEventArgs> SelectedFileMouseDoubleClick;
#endregion Public Events
#region Private Properties
private bool IsInitalizing { get; set; }
#endregion Private Properties
#region Private Methods
private void _stream_ConnectionStatusChanged(object sender, ConnectionStatusChangedEventArgs e)
{
BeginInvoke((Action)UpdateStatus);
}
private void _timer_Tick(object sender, EventArgs e)
{
RefreshData();
}
private void btnTakeImage_Click(object sender, EventArgs e)
{
ThermalImage myImg = (ThermalImage)_stream.GetImage();
myImg.TemperatureUnit = TemperatureUnit.Celsius;
string currPath = $"{labelOutputPath.Text}\\{DateTime.Now:yyyyMMyy_HHmmss}.jpg";
myImg.SaveSnapshot(currPath);
}
private void buttonBrowse_Click(object sender, EventArgs e)
{
var dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
labelOutputPath.Text = dialog.SelectedPath;
}
}
private void buttonPause_Click(object sender, EventArgs e)
{
switch (_stream.Recorder.Status)
{
case RecorderState.Paused:
_stream.Recorder.Continue();
buttonPause.Text = "Pause";
break;
case RecorderState.Recording:
_stream.Recorder.Pause();
buttonPause.Text = "Continue";
break;
}
}
private void buttonRec_Click(object sender, EventArgs e)
{
if (_stream.Recorder.Status == RecorderState.Stopped || _stream.Recorder.Status == RecorderState.PreRecording)
{
// start recording
if (radioButtonRecSpeedInterval.Checked && _stream.Recorder.IsTimeSpanEnabled == false)
{
int sec;
if (int.TryParse(textBoxTimeSpan.Text, out sec) && sec > 0)
{
_stream.Recorder.EnableTimeSpan(TimeSpan.FromSeconds(sec));
}
else
{
MessageBox.Show("Error parsing time span.");
return;
}
}
else if (radioButtonRecSpeed.Checked && _stream.Recorder.IsTimeSpanEnabled)
{
_stream.Recorder.DisableTimeSpan();
}
buttonRec.Text = "Stop";
_stream.Recorder.Start(GetNextFileName());
_elapedTimeRecording.Reset();
_elapedTimeRecording.Start();
}
else
{
_stream.Recorder.Stop();
buttonRec.Text = "Rec";
_elapedTimeRecording.Stop();
var lv = new ListViewItem(_stream.Recorder.FileName) { Tag = _stream.Recorder.FullPath };
listViewRecordings.Items.Add(lv);
}
}
private void checkBoxPreRecording_CheckStateChanged(object sender, EventArgs e)
{
if (!(_stream.Recorder is ThermalImageRecorder)) return;
if (checkBoxPreRecording.Checked)
{
int frames;
if (int.TryParse(textBoxNumFramesPreRec.Text, out frames) && frames > 0)
{
(_stream.Recorder as ThermalImageRecorder).EnablePreRecording(frames);
}
else
{
MessageBox.Show("Error parsing number of frames in pre-recording.");
}
}
else
{
(_stream.Recorder as ThermalImageRecorder).DisablePreRecording();
}
}
private string CreateFileName()
{
var fileName = labelOutputPath.Text;
fileName += string.Format("{0:0000}", _nextIndex++);
return fileName + _stream.Recorder.Extension;
}
private string GetNextFileName()
{
string fileName;
do
{
fileName = CreateFileName();
} while (System.IO.File.Exists(fileName));
return fileName;
}
private void listViewRecordings_MouseDoubleClick(object sender, MouseEventArgs e)
{
var items = listViewRecordings.SelectedItems;
if (items.Count > 0)
{
var lv = items[0];
var fullPath = lv.Tag as string;
OnMouseDoubleClick(new SelectedFileEventArgs(fullPath));
}
}
private void OnMouseDoubleClick(SelectedFileEventArgs args)
{
if (SelectedFileMouseDoubleClick != null)
{
SelectedFileMouseDoubleClick(this, args);
}
}
private void radioButtonRecSpeed_CheckedChanged(object sender, EventArgs e)
{
if (IsInitalizing) return;
if (radioButtonRecSpeed.Checked)
{
_stream.Recorder.DisableTimeSpan();
textBoxTimeSpan.Enabled = false;
}
else
{ // time span
textBoxTimeSpan.Enabled = true;
}
}
private void RecorderForm_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
Hide();
}
private void RecorderForm_Load(object sender, EventArgs e)
{
}
private void RefreshData()
{
if (_stream.Recorder == null) return;
labelStatus.Text = _stream.Recorder.Status.ToString();
labelFrameCounter.Text = _stream.Recorder.FrameCount.ToString(CultureInfo.InvariantCulture);
labelLostImages.Text = _stream.Recorder.LostImages.ToString(CultureInfo.InvariantCulture);
labelElapsedTime.Text = _elapedTimeRecording.Elapsed.ToString();
}
private void UpdateStatus()
{
IsInitalizing = true;
if (_stream != null && _stream.ConnectionStatus == ConnectionStatus.Connected)
{
if (_stream.Recorder.IsTimeSpanEnabled)
{
radioButtonRecSpeedInterval.Checked = true;
textBoxTimeSpan.Enabled = true;
}
else
{
radioButtonRecSpeed.Checked = true;
textBoxTimeSpan.Enabled = false;
}
if (_stream.Recorder is ThermalImageRecorder)
{
groupBoxPreRecording.Enabled = true;
checkBoxPreRecording.Checked = (_stream.Recorder as ThermalImageRecorder).IsPreRecordingEnabled;
textBoxNumFramesPreRec.Text =
(_stream.Recorder as ThermalImageRecorder).NumberOfFramesToPreRecord.ToString(
CultureInfo.InvariantCulture);
}
groupBoxRecSpeed.Enabled = true;
buttonPause.Enabled = true;
buttonRec.Enabled = true;
textBoxTimeSpan.Text = _stream.Recorder.TimeSpan.TotalSeconds.ToString(CultureInfo.InvariantCulture);
}
else
{
groupBoxPreRecording.Enabled = false;
groupBoxRecSpeed.Enabled = false;
buttonPause.Enabled = false;
buttonRec.Enabled = false;
}
IsInitalizing = false;
}
#endregion Private Methods
#region Public Methods
/// <summary>
///
/// </summary>
/// <param name="camera"></param>
public void Initialize(Camera camera)
{
if (camera == null)
{
throw new InvalidOperationException("camera is null");
}
_stream = camera;
_stream.ConnectionStatusChanged += _stream_ConnectionStatusChanged;
labelOutputPath.Text = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures) + @"\FLIR\";
_timer.Interval = 110;
_timer.Tick += _timer_Tick;
_timer.Start();
UpdateStatus();
}
/// <summary>
/// Un-initialize the recorder component.
/// </summary>
public void UnInitialize()
{
_timer.Stop();
if (_stream != null)
_stream.ConnectionStatusChanged -= _stream_ConnectionStatusChanged;
_stream = null;
}
#endregion Public Methods
}
/// <summary>
/// Event Args for Selected file event
/// </summary>
public class SelectedFileEventArgs : EventArgs
{
#region Internal Constructors
internal SelectedFileEventArgs(string path)
{
FilePath = path;
}
#endregion Internal Constructors
#region Public Properties
/// <summary>
/// The full path to the file.
/// </summary>
public string FilePath { get; private set; }
#endregion Public Properties
}
}
-120
View File
@@ -1,120 +0,0 @@
<?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>
-18
View File
@@ -93,12 +93,6 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="PlaybackForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PlaybackForm.Designer.cs">
<DependentUpon>PlaybackForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
@@ -106,29 +100,17 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="RecorderForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="RecorderForm.Designer.cs">
<DependentUpon>RecorderForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="DiscoveryForm.resx">
<DependentUpon>DiscoveryForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlaybackForm.resx">
<DependentUpon>PlaybackForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="RecorderForm.resx">
<DependentUpon>RecorderForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">