Upload from CMSource
This commit is contained in:
111
Calibry/5.0/PS_Deployment/Files/capture/0x0409.ini
Normal file
111
Calibry/5.0/PS_Deployment/Files/capture/0x0409.ini
Normal file
@@ -0,0 +1,111 @@
|
||||
|
||||
[0x0409]
|
||||
TITLE=Choose Setup Language
|
||||
DESCRIPTION=Select the language for this installation from the choices below.
|
||||
REBOOTMESSAGE=The installer must restart your system to complete configuring the Windows Installer service. Click Yes to restart now or No if you plan to restart later.
|
||||
ONUPGRADE=This setup will perform an upgrade of '%s'. Do you want to continue?
|
||||
LATERVERSIONINSTALLED=A later version of '%s' is already installed on this machine. The setup cannot continue.
|
||||
OK=OK
|
||||
Cancel=Cancel
|
||||
Password=Password:
|
||||
Install=Install
|
||||
1100=Setup Initialization Error
|
||||
1101=%s
|
||||
1102=%s Setup is preparing the %s, which will guide you through the program setup process. Please wait.
|
||||
1103=Checking Operating System Version
|
||||
1104=Checking Windows(R) Installer Version
|
||||
1105=Configuring Windows Installer
|
||||
1106=Configuring %s
|
||||
1107=Setup has completed configuring the Windows Installer on your system. The system needs to be restarted in order to continue with the installation. Please click Restart to reboot the system.
|
||||
1108=%s
|
||||
1150=Setup has detected an incompatible version of Windows. Please click OK and verify that the target system is running either Windows 95 (or later version), or Windows NT 4.0 Service Pack 6 (or later version), before relaunching the installation
|
||||
1151=Error writing to the temporary location
|
||||
1152=Error extracting %s to the temporary location
|
||||
1153=Error reading setup initialization file
|
||||
1154=Installer not found in %s
|
||||
1155=File %s not found
|
||||
1156=Internal error in Windows Installer
|
||||
1158=Error populating strings. Verify that all strings in Setup.ini are valid.
|
||||
1200=Restart
|
||||
1603=Error installing Windows Installer engine. A file which needs to be replaced may be held in use. Close all applications and try again.
|
||||
1201=Setup needs %lu KB free disk space in %s. Please free up some space and try again
|
||||
1202=You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation
|
||||
1203=Command line parameters:
|
||||
1204=/L language ID
|
||||
1205=/S Hide intialization dialog. For silent mode use: /S /v/qn.
|
||||
1206=/V parameters to MsiExec.exe
|
||||
1207=Windows(R) Installer %s found. This is an older version of the Windows(R) Installer. Click OK to continue.
|
||||
1208=ANSI code page for %s is not installed on the system and therefore setup cannot run in the selected language. Run the setup and select another language.
|
||||
1210=Setup requires Windows Installer version %s or higher to install the Microsoft .NET Framework version 2.0. Please install the Windows Installer version %s or higher and try again.
|
||||
1604=This setup does not contain the Windows Installer engine (%s) required to run the installation on this operating system.
|
||||
1607=Unable to install %s Scripting Runtime.
|
||||
1608=Unable to create InstallDriver instance, Return code: %d
|
||||
1609=Please specify a location to save the installation package.
|
||||
1611=Unable to extract the file %s.
|
||||
1612=Extracting files.
|
||||
1613=Downloading file %s.
|
||||
1614=An error occurred while downloading the file %s. What would you like to do?
|
||||
1615=hr
|
||||
1616=min
|
||||
1617=sec
|
||||
1618=MB
|
||||
1619=KB
|
||||
1620=/sec
|
||||
1621=Failed to verify signature of file %s.
|
||||
1622=Estimated time remaining:
|
||||
1623=%d KB of %d KB downloaded at
|
||||
1624=Preparing to Install...
|
||||
1625=Get help for this installation.
|
||||
1626=Help
|
||||
1627=Unable to save file: %s
|
||||
1628=Failed to complete installation.
|
||||
1629=Invalid command line.
|
||||
1630=/UA<url to InstMsiA.exe>
|
||||
1631=/UW<url to InstMsiW.exe>
|
||||
1632=/UM<url to msi package>
|
||||
1633=/US<url to IsScript.msi>
|
||||
1634=Setup Initialization Error, failed to clone the process.
|
||||
1635=The file %s already exists. Would you like to replace it?
|
||||
1636=/P password mode
|
||||
1637=/A administrative installation
|
||||
1638=/J advertise mode
|
||||
1639=/X uninstall mode
|
||||
1640=/F repair mode
|
||||
1641=/B cache installation locally
|
||||
1642=Could not verify signature. You need Internet Explorer 3.02 or later with Authenticode update.
|
||||
1643=Setup requires a newer version of WinInet.dll. You may need to install Internet Explorer 3.02 or later.
|
||||
1644=You do not have sufficient privileges to complete this installation. Log on as administrator and then retry this installation
|
||||
1645=Error installing Microsoft(R) .NET Framework, Return Code: %d
|
||||
1646=%s optionally uses the Microsoft (R) .NET %s Framework. Would you like to install it now?
|
||||
1648=Setup has detected an incompatible version of Windows. Please click OK and verify that the target system is running either Windows 95 (or later version), or Windows NT 4.0 Service Pack 3 (or later version), before relaunching the installation
|
||||
1649=%s optionally uses the Visual J# Redistributable Package. Would you like to install it now?
|
||||
1650= (This will also install the .NET Framework.)
|
||||
1651=Setup has detected an incompatible version of Windows. Please click OK and verify that the target system is running Windows 2000 Service Pack 3 (or later version), before relaunching the installation
|
||||
|
||||
1652=%s requires that the following requirements be installed on your computer prior to installing this application. Click Install to begin installing these requirements:
|
||||
1653=Installing %s
|
||||
1654=Would you like to cancel the setup after %s has finished installing?
|
||||
1655=The files for installation requirement %s could not be found. The installation will now stop. This is probably due to a failed, or canceled download.
|
||||
1656=The installation of %s appears to have failed. Do you want to continue the installation?
|
||||
1657=Succeeded
|
||||
1658=Installing
|
||||
1659=Pending
|
||||
1660=Installed
|
||||
1661=Status
|
||||
1662=Requirement
|
||||
1663=Failed
|
||||
1664=Extracting
|
||||
1665=Downloading
|
||||
1666=Skipped
|
||||
1667=The installation of %s has failed. Setup will now exit.
|
||||
1668=The installation of %s requires a reboot. Click Yes to restart now or No if you plan to restart later.
|
||||
1669=%1 optionally uses %2. Would you like to install it now?
|
||||
|
||||
1670=Unable to load module %s, Error Code: %d
|
||||
1671=Downloading file %2 of %3: %1
|
||||
1700=An error occurred initializing the InstallScript engine
|
||||
1701=Unable to extract InstallScript engine support files to temp location
|
||||
|
||||
[Languages]
|
||||
0x0404=Chinese (Traditional)
|
||||
0x0804=Chinese (Simplified)
|
||||
2
Calibry/5.0/PS_Deployment/Files/capture/Autorun.inf
Normal file
2
Calibry/5.0/PS_Deployment/Files/capture/Autorun.inf
Normal file
@@ -0,0 +1,2 @@
|
||||
[autorun]
|
||||
OPEN=setup.exe
|
||||
BIN
Calibry/5.0/PS_Deployment/Files/capture/Calibry capture tool.msi
Normal file
BIN
Calibry/5.0/PS_Deployment/Files/capture/Calibry capture tool.msi
Normal file
Binary file not shown.
182
Calibry/5.0/PS_Deployment/Files/capture/Setup.ini
Normal file
182
Calibry/5.0/PS_Deployment/Files/capture/Setup.ini
Normal file
@@ -0,0 +1,182 @@
|
||||
[Info]
|
||||
Name=INTL
|
||||
Version=1.00.000
|
||||
DiskSpace=8000 ;DiskSpace requirement in KB
|
||||
|
||||
[Startup]
|
||||
CmdLine=
|
||||
SuppressWrongOS=Y
|
||||
ScriptDriven=0
|
||||
ScriptVer=1.0.0.1
|
||||
DotNetOptionalInstallIfSilent=N
|
||||
OnUpgrade=1
|
||||
RequireExactLangMatch=0404,0804
|
||||
Product=Calibry capture tool
|
||||
PackageName=Calibry capture tool.msi
|
||||
EnableLangDlg=N
|
||||
LogResults=N
|
||||
DoMaintenance=N
|
||||
ProductCode={1E246158-8BA8-4729-AA70-FB0CD1002D41}
|
||||
ProductVersion=1.00.0000
|
||||
SuppressReboot=Y
|
||||
LauncherName=setup.exe
|
||||
AdvertiseWhileElevated=Y
|
||||
DotNetVersion=v2.0.50727
|
||||
DotNetSPRequired=
|
||||
UseDotNetUI=N
|
||||
DotNetCoreSetupUILang=1033
|
||||
DotNetLangPacks=
|
||||
DotNetFxCmd=
|
||||
DotNetLangPackCmd=
|
||||
DotNetOptional=Y
|
||||
DotNetDelayReboot=Y
|
||||
PackageCode={7110E558-4E83-4C5C-AD2E-D81DE89A7A95}
|
||||
|
||||
[MsiVersion]
|
||||
3.1.4000.2435=SupportOSMsi30
|
||||
|
||||
[SupportOSMsi11] ;Supported platforms for MSI 1.1
|
||||
Win95=1
|
||||
Win98=1
|
||||
WinNT4SP3=1
|
||||
|
||||
[SupportOSMsi12] ;Supported platforms for MSI 1.2
|
||||
Win95=1
|
||||
Win98=1
|
||||
WinME=1
|
||||
WinNT4SP3=1
|
||||
|
||||
[SupportOS] ;Supported platforms for MSI 2.0
|
||||
Win95=1
|
||||
Win98=1
|
||||
WinME=1
|
||||
WinNT4SP6=1
|
||||
Win2K=1
|
||||
|
||||
[SupportOSMsi30] ;Supported platforms for MSI 3.0
|
||||
Win2KSP3=1
|
||||
WinXP=1
|
||||
Win2003Server=1
|
||||
|
||||
[Win95]
|
||||
MajorVer=4
|
||||
MinorVer=0
|
||||
MinorVerMax=1
|
||||
BuildNo=950
|
||||
PlatformId=1
|
||||
|
||||
[Win98]
|
||||
MajorVer=4
|
||||
MinorVer=10
|
||||
MinorVerMax=11
|
||||
BuildNo=1998
|
||||
PlatformId=1
|
||||
|
||||
[WinME]
|
||||
MajorVer=4
|
||||
MinorVer=90
|
||||
MinorVerMax=91
|
||||
BuildNo=3000
|
||||
PlatformId=1
|
||||
|
||||
[WinNT4SP3]
|
||||
MajorVer=4
|
||||
MinorVer=0
|
||||
MinorVerMax=1
|
||||
BuildNo=1381
|
||||
PlatformId=2
|
||||
ServicePack=768
|
||||
|
||||
[WinNT4SP6]
|
||||
MajorVer=4
|
||||
MinorVer=0
|
||||
MinorVerMax=1
|
||||
BuildNo=1381
|
||||
PlatformId=2
|
||||
ServicePack=1536
|
||||
|
||||
[Win2K]
|
||||
MajorVer=5
|
||||
MinorVer=0
|
||||
MinorVerMax=1
|
||||
BuildNo=2195
|
||||
PlatformId=2
|
||||
|
||||
[Win2KSP3]
|
||||
MajorVer=5
|
||||
MinorVer=0
|
||||
MinorVerMax=1
|
||||
BuildNo=2195
|
||||
PlatformId=2
|
||||
ServicePack=768
|
||||
|
||||
[WinXP]
|
||||
MajorVer=5
|
||||
MinorVer=1
|
||||
MinorVerMax=2
|
||||
BuildNo=2600
|
||||
PlatformId=2
|
||||
|
||||
[Win2003Server]
|
||||
MajorVer=5
|
||||
MinorVer=2
|
||||
MinorVerMax=3
|
||||
BuildNo=2600
|
||||
PlatformId=2
|
||||
|
||||
[0x0409]
|
||||
TITLE=Choose Setup Language
|
||||
DESCRIPTION=Select the language for this installation from the choices below.
|
||||
OK=OK
|
||||
Cancel=Cancel
|
||||
0x0409=English (United States)
|
||||
0x0411=Japanese
|
||||
0x0401=Arabic (Saudi Arabia)
|
||||
0x042d=Basque
|
||||
0x0402=Bulgarian
|
||||
0x0403=Catalan
|
||||
0x0804=Chinese (PRC)
|
||||
0x0404=Chinese (Taiwan)
|
||||
0x041a=Croatian
|
||||
0x0405=Czech
|
||||
0x0406=Danish
|
||||
0x0413=Dutch (Netherlands)
|
||||
0x040b=Finnish
|
||||
0x0c0c=French (Canada)
|
||||
0x040c=French (France)
|
||||
0x0407=German (Germany)
|
||||
0x0408=Greek
|
||||
0x040d=Hebrew
|
||||
0x040e=Hungarian
|
||||
0x0421=Indonesian
|
||||
0x0410=Italian (Italy)
|
||||
0x0412=Korean
|
||||
0x0414=Norwegian (Bokmal)
|
||||
0x0415=Polish
|
||||
0x0416=Portuguese (Brazil)
|
||||
0x0816=Portuguese (Portugal)
|
||||
0x0418=Romanian
|
||||
0x0419=Russian
|
||||
0x0c1a=Serbian (Cyrillic)
|
||||
0x041b=Slovak
|
||||
0x0424=Slovenian
|
||||
0x040a=Spanish (Traditional Sort)
|
||||
0x041d=Swedish
|
||||
0x041e=Thai
|
||||
0x041f=Turkish
|
||||
|
||||
[Languages]
|
||||
count=1
|
||||
default=409
|
||||
key0=409
|
||||
[Calibry capture tool.msi]
|
||||
Type=0
|
||||
Location=Calibry capture tool.msi
|
||||
[Setup.bmp]
|
||||
Type=0
|
||||
[dotnetfx.exe]
|
||||
Type=0
|
||||
Location=isnetfx.exe
|
||||
[WindowsInstaller-KB893803-x86.exe]
|
||||
Type=0
|
||||
Location=WindowsInstaller-KB893803-x86.exe
|
||||
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace TestoCaptureTool
|
||||
{
|
||||
/// <summary>
|
||||
/// State object for reading client data asynchronously
|
||||
/// </summary>
|
||||
public class StateObject
|
||||
{
|
||||
public Socket workSocket; // Client socket.
|
||||
public const int BufferSize = 1024; // Size of receive buffer.
|
||||
public byte[] buffer = new byte[BufferSize]; // Receive buffer.
|
||||
public StringBuilder sb = new StringBuilder(); // Received data string.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class which listen to incoming request from calibry and reply to the query
|
||||
/// </summary>
|
||||
class Communication
|
||||
{
|
||||
Socket listenSocket;
|
||||
bool _listening;
|
||||
bool _closing = false;
|
||||
|
||||
public static System.Threading.ManualResetEvent allDone = new System.Threading.ManualResetEvent(false);
|
||||
|
||||
public void StopListening()
|
||||
{
|
||||
_closing = true;
|
||||
allDone.Set();
|
||||
listenSocket.Close();
|
||||
_listening = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function which open the connection and start listening for incoming
|
||||
/// requests.
|
||||
/// </summary>
|
||||
public void OpenCommunication()
|
||||
{
|
||||
try
|
||||
{
|
||||
// create the socket
|
||||
listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
// bind the listening socket to the port (specified in the settings.settings file
|
||||
IPEndPoint ep = new IPEndPoint(IPAddress.Any, Properties.Settings.Default.NetworkPort);
|
||||
listenSocket.Bind(ep);
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
listenSocket.Close();
|
||||
System.Diagnostics.Trace.TraceError(String.Format("{0}: {1}", e.ErrorCode, e.Message));
|
||||
return;
|
||||
}
|
||||
// start listening
|
||||
|
||||
_listening = true;
|
||||
}
|
||||
|
||||
public void StartListening()
|
||||
{
|
||||
listenSocket.Listen(100);
|
||||
|
||||
//Listen to incoming request until the application ends.
|
||||
while (!_closing)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Set the event to nonsignaled state.
|
||||
allDone.Reset();
|
||||
|
||||
// Start an asynchronous socket to listen for connections.
|
||||
listenSocket.BeginAccept(new AsyncCallback(AcceptCallback), listenSocket);
|
||||
|
||||
// Wait until a connection is made before continuing.
|
||||
allDone.WaitOne();
|
||||
|
||||
}
|
||||
catch (System.Threading.ThreadInterruptedException)
|
||||
{
|
||||
_closing=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsListening
|
||||
{
|
||||
get { return _listening; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function which handle an incoming request.
|
||||
/// </summary>
|
||||
/// <param name="ar"></param>
|
||||
private static void AcceptCallback(IAsyncResult ar)
|
||||
{
|
||||
// Signal the main thread to continue.
|
||||
allDone.Set();
|
||||
|
||||
// Get the socket that handles the client request.
|
||||
Socket listener = (Socket)ar.AsyncState;
|
||||
|
||||
try
|
||||
{
|
||||
Socket handler = listener.EndAccept(ar);
|
||||
|
||||
// Create the state object.
|
||||
StateObject state = new StateObject();
|
||||
state.workSocket = handler;
|
||||
handler.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReadCallback), state);
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
System.Diagnostics.Trace.TraceInformation("Socket closed");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function which interpret the receiving string
|
||||
/// </summary>
|
||||
/// <param name="ar"></param>
|
||||
private static void ReadCallback(IAsyncResult ar)
|
||||
{
|
||||
// Retrieve the state object and the handler socket
|
||||
// from the asynchronous state object.
|
||||
StateObject state = (StateObject)ar.AsyncState;
|
||||
Socket handler = state.workSocket;
|
||||
int bytesRead = handler.EndReceive(ar);;
|
||||
|
||||
|
||||
// There might be more data, so store the data received so far.
|
||||
state.sb.Append(Encoding.ASCII.GetString(state.buffer, 0, bytesRead));
|
||||
string receivedString = state.sb.ToString();
|
||||
|
||||
//If format is not Calibry format, closing the communication
|
||||
if (!receivedString.StartsWith("<bal m=\"r\">"))
|
||||
{
|
||||
handler.Shutdown(SocketShutdown.Both);
|
||||
handler.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
//Retrieving the different value for the different parameter received
|
||||
//from calibry. Could be used to request the data from a specific device
|
||||
//depending on these parameters
|
||||
int dvnStart=receivedString.IndexOf("<dvn>");
|
||||
int dsnStart = receivedString.IndexOf("<dsn>");
|
||||
int locStart = receivedString.IndexOf("<loc>");
|
||||
|
||||
string deviceNumber = receivedString.Substring(dvnStart + 5, dsnStart - (dvnStart + 5));
|
||||
string serialNumber = receivedString.Substring(dsnStart + 5, locStart - (dsnStart + 5));
|
||||
string location = receivedString.Substring(locStart+5);
|
||||
|
||||
//Proceeding with the reply
|
||||
Send(handler, deviceNumber, serialNumber, location);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Building the answer to the request
|
||||
/// Sending the answer
|
||||
/// Terminating the communication
|
||||
/// </summary>
|
||||
/// <param name="handler"></param>
|
||||
/// <param name="deviceNumber"></param>
|
||||
/// <param name="serialNumber"></param>
|
||||
/// <param name="location"></param>
|
||||
private static void Send(Socket handler, string deviceNumber, string serialNumber, string location)
|
||||
{
|
||||
//Sending only the parameter for which a channel is configured.
|
||||
StringBuilder sentDate = new StringBuilder();
|
||||
sentDate.Append("<bal m=\"r\"><dvn>");
|
||||
sentDate.Append(deviceNumber);
|
||||
|
||||
if (Program._device.IsConnected)
|
||||
{
|
||||
if (Program._device.AirTemperatureChannel > -1)
|
||||
{
|
||||
sentDate.Append("<tea>");
|
||||
sentDate.Append(Program._device.AirTemperature.ToString("0.00",System.Globalization.CultureInfo.CurrentUICulture));
|
||||
sentDate.Append(";");
|
||||
sentDate.Append(Program._device.DeviceSN);
|
||||
}
|
||||
|
||||
if (Program._device.WaterTemperatureChannel > -1)
|
||||
{
|
||||
sentDate.Append("<tew>");
|
||||
sentDate.Append(Program._device.WaterTemperature.ToString("0.00",System.Globalization.CultureInfo.CurrentUICulture));
|
||||
sentDate.Append(";");
|
||||
sentDate.Append(Program._device.DeviceSN);
|
||||
}
|
||||
|
||||
if (Program._device.HumidityChannel > -1)
|
||||
{
|
||||
sentDate.Append("<hgr>");
|
||||
sentDate.Append(Program._device.Humidity.ToString("0.00",System.Globalization.CultureInfo.CurrentUICulture));
|
||||
sentDate.Append(";");
|
||||
sentDate.Append(Program._device.DeviceSN);
|
||||
}
|
||||
|
||||
if (Program._device.PressureChannel > -1)
|
||||
{
|
||||
sentDate.Append("<prs>");
|
||||
sentDate.Append(Program._device.Pressure.ToString("0.00",System.Globalization.CultureInfo.CurrentUICulture));
|
||||
sentDate.Append(";");
|
||||
sentDate.Append(Program._device.DeviceSN);
|
||||
}
|
||||
}
|
||||
|
||||
// Convert the string data to byte data using ASCII encoding.
|
||||
byte[] byteData = Encoding.ASCII.GetBytes(sentDate.ToString());
|
||||
|
||||
// Begin sending the data to the remote device.
|
||||
handler.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), handler);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When all data have been send, terminating the communication
|
||||
/// </summary>
|
||||
/// <param name="ar"></param>
|
||||
private static void SendCallback(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Retrieve the socket from the state object.
|
||||
Socket handler = (Socket)ar.AsyncState;
|
||||
|
||||
// Complete sending the data to the remote device.
|
||||
handler.EndSend(ar);
|
||||
|
||||
handler.Shutdown(SocketShutdown.Both);
|
||||
handler.Close();
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Diagnostics.Trace.WriteLine(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
458
Calibry/5.0/PS_Deployment/Files/capture/Source code/ConfigurationForm.Designer.cs
generated
Normal file
458
Calibry/5.0/PS_Deployment/Files/capture/Source code/ConfigurationForm.Designer.cs
generated
Normal file
@@ -0,0 +1,458 @@
|
||||
namespace TestoCaptureTool
|
||||
{
|
||||
partial class ConfigurationForm
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigurationForm));
|
||||
this.lblAirTemperature = new System.Windows.Forms.Label();
|
||||
this.lblWaterTemperature = new System.Windows.Forms.Label();
|
||||
this.lblHumidity = new System.Windows.Forms.Label();
|
||||
this.lblPressure = new System.Windows.Forms.Label();
|
||||
this.txtAirTemperature = new System.Windows.Forms.TextBox();
|
||||
this.txtPressure = new System.Windows.Forms.TextBox();
|
||||
this.txtHumidity = new System.Windows.Forms.TextBox();
|
||||
this.txtWaterTemperature = new System.Windows.Forms.TextBox();
|
||||
this.lblDeviceSN = new System.Windows.Forms.Label();
|
||||
this.lblCaptureTime = new System.Windows.Forms.Label();
|
||||
this.txtDeviceSN = new System.Windows.Forms.TextBox();
|
||||
this.txtCaptureTime = new System.Windows.Forms.TextBox();
|
||||
this.lblDeviceModel = new System.Windows.Forms.Label();
|
||||
this.txtDeviceModel = new System.Windows.Forms.TextBox();
|
||||
this.lblConnectionStatus = new System.Windows.Forms.Label();
|
||||
this.txtConnectionStatus = new System.Windows.Forms.TextBox();
|
||||
this.grbCapture = new System.Windows.Forms.GroupBox();
|
||||
this.lblAutoReadingNameHeader = new System.Windows.Forms.Label();
|
||||
this.lblAutoReadingPortHeader = new System.Windows.Forms.Label();
|
||||
this.lblCalibrySetup = new System.Windows.Forms.Label();
|
||||
this.lblAutoReadingHeader = new System.Windows.Forms.Label();
|
||||
this.lblAutoReadingValue = new System.Windows.Forms.Label();
|
||||
this.lblAutoReadingNameValue = new System.Windows.Forms.Label();
|
||||
this.lblAutoReadingPortValue = new System.Windows.Forms.Label();
|
||||
this.grbConfigureCalibry = new System.Windows.Forms.GroupBox();
|
||||
this.cmbDeviceModel = new System.Windows.Forms.ComboBox();
|
||||
this.lblDevice = new System.Windows.Forms.Label();
|
||||
this.btnConnect = new System.Windows.Forms.Button();
|
||||
this.lblComPort = new System.Windows.Forms.Label();
|
||||
this.cmbCOMPort = new System.Windows.Forms.ComboBox();
|
||||
this.grbConnect = new System.Windows.Forms.GroupBox();
|
||||
this.cmbAirTempChannel = new System.Windows.Forms.ComboBox();
|
||||
this.cmbWaterTempChannel = new System.Windows.Forms.ComboBox();
|
||||
this.cmbHumdityChannel = new System.Windows.Forms.ComboBox();
|
||||
this.cmbPressureChannel = new System.Windows.Forms.ComboBox();
|
||||
this.lblAirTemperatureChannel = new System.Windows.Forms.Label();
|
||||
this.lblWaterTemperatureChannel = new System.Windows.Forms.Label();
|
||||
this.lblHumidityChannel = new System.Windows.Forms.Label();
|
||||
this.lblPressureChannel = new System.Windows.Forms.Label();
|
||||
this.grpConfiguration = new System.Windows.Forms.GroupBox();
|
||||
this.lblInformation = new System.Windows.Forms.Label();
|
||||
this.grbInformation = new System.Windows.Forms.GroupBox();
|
||||
this.timRefresh = new System.Windows.Forms.Timer(this.components);
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.grbCapture.SuspendLayout();
|
||||
this.grbConfigureCalibry.SuspendLayout();
|
||||
this.grbConnect.SuspendLayout();
|
||||
this.grpConfiguration.SuspendLayout();
|
||||
this.grbInformation.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblAirTemperature
|
||||
//
|
||||
resources.ApplyResources(this.lblAirTemperature, "lblAirTemperature");
|
||||
this.lblAirTemperature.Name = "lblAirTemperature";
|
||||
//
|
||||
// lblWaterTemperature
|
||||
//
|
||||
resources.ApplyResources(this.lblWaterTemperature, "lblWaterTemperature");
|
||||
this.lblWaterTemperature.Name = "lblWaterTemperature";
|
||||
//
|
||||
// lblHumidity
|
||||
//
|
||||
resources.ApplyResources(this.lblHumidity, "lblHumidity");
|
||||
this.lblHumidity.Name = "lblHumidity";
|
||||
//
|
||||
// lblPressure
|
||||
//
|
||||
resources.ApplyResources(this.lblPressure, "lblPressure");
|
||||
this.lblPressure.Name = "lblPressure";
|
||||
//
|
||||
// txtAirTemperature
|
||||
//
|
||||
this.txtAirTemperature.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtAirTemperature, "txtAirTemperature");
|
||||
this.txtAirTemperature.Name = "txtAirTemperature";
|
||||
this.txtAirTemperature.ReadOnly = true;
|
||||
//
|
||||
// txtPressure
|
||||
//
|
||||
this.txtPressure.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtPressure, "txtPressure");
|
||||
this.txtPressure.Name = "txtPressure";
|
||||
this.txtPressure.ReadOnly = true;
|
||||
//
|
||||
// txtHumidity
|
||||
//
|
||||
this.txtHumidity.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtHumidity, "txtHumidity");
|
||||
this.txtHumidity.Name = "txtHumidity";
|
||||
this.txtHumidity.ReadOnly = true;
|
||||
//
|
||||
// txtWaterTemperature
|
||||
//
|
||||
this.txtWaterTemperature.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtWaterTemperature, "txtWaterTemperature");
|
||||
this.txtWaterTemperature.Name = "txtWaterTemperature";
|
||||
this.txtWaterTemperature.ReadOnly = true;
|
||||
//
|
||||
// lblDeviceSN
|
||||
//
|
||||
resources.ApplyResources(this.lblDeviceSN, "lblDeviceSN");
|
||||
this.lblDeviceSN.Name = "lblDeviceSN";
|
||||
//
|
||||
// lblCaptureTime
|
||||
//
|
||||
resources.ApplyResources(this.lblCaptureTime, "lblCaptureTime");
|
||||
this.lblCaptureTime.Name = "lblCaptureTime";
|
||||
//
|
||||
// txtDeviceSN
|
||||
//
|
||||
this.txtDeviceSN.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtDeviceSN, "txtDeviceSN");
|
||||
this.txtDeviceSN.Name = "txtDeviceSN";
|
||||
this.txtDeviceSN.ReadOnly = true;
|
||||
//
|
||||
// txtCaptureTime
|
||||
//
|
||||
this.txtCaptureTime.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtCaptureTime, "txtCaptureTime");
|
||||
this.txtCaptureTime.Name = "txtCaptureTime";
|
||||
this.txtCaptureTime.ReadOnly = true;
|
||||
//
|
||||
// lblDeviceModel
|
||||
//
|
||||
resources.ApplyResources(this.lblDeviceModel, "lblDeviceModel");
|
||||
this.lblDeviceModel.Name = "lblDeviceModel";
|
||||
//
|
||||
// txtDeviceModel
|
||||
//
|
||||
this.txtDeviceModel.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtDeviceModel, "txtDeviceModel");
|
||||
this.txtDeviceModel.Name = "txtDeviceModel";
|
||||
this.txtDeviceModel.ReadOnly = true;
|
||||
//
|
||||
// lblConnectionStatus
|
||||
//
|
||||
resources.ApplyResources(this.lblConnectionStatus, "lblConnectionStatus");
|
||||
this.lblConnectionStatus.Name = "lblConnectionStatus";
|
||||
//
|
||||
// txtConnectionStatus
|
||||
//
|
||||
this.txtConnectionStatus.BackColor = System.Drawing.SystemColors.Control;
|
||||
resources.ApplyResources(this.txtConnectionStatus, "txtConnectionStatus");
|
||||
this.txtConnectionStatus.Name = "txtConnectionStatus";
|
||||
this.txtConnectionStatus.ReadOnly = true;
|
||||
//
|
||||
// grbCapture
|
||||
//
|
||||
this.grbCapture.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.grbCapture.Controls.Add(this.txtConnectionStatus);
|
||||
this.grbCapture.Controls.Add(this.lblConnectionStatus);
|
||||
this.grbCapture.Controls.Add(this.txtDeviceModel);
|
||||
this.grbCapture.Controls.Add(this.lblDeviceModel);
|
||||
this.grbCapture.Controls.Add(this.txtCaptureTime);
|
||||
this.grbCapture.Controls.Add(this.txtDeviceSN);
|
||||
this.grbCapture.Controls.Add(this.lblCaptureTime);
|
||||
this.grbCapture.Controls.Add(this.lblDeviceSN);
|
||||
this.grbCapture.Controls.Add(this.txtWaterTemperature);
|
||||
this.grbCapture.Controls.Add(this.txtHumidity);
|
||||
this.grbCapture.Controls.Add(this.txtPressure);
|
||||
this.grbCapture.Controls.Add(this.txtAirTemperature);
|
||||
this.grbCapture.Controls.Add(this.lblPressure);
|
||||
this.grbCapture.Controls.Add(this.lblHumidity);
|
||||
this.grbCapture.Controls.Add(this.lblWaterTemperature);
|
||||
this.grbCapture.Controls.Add(this.lblAirTemperature);
|
||||
resources.ApplyResources(this.grbCapture, "grbCapture");
|
||||
this.grbCapture.Name = "grbCapture";
|
||||
this.grbCapture.TabStop = false;
|
||||
//
|
||||
// lblAutoReadingNameHeader
|
||||
//
|
||||
resources.ApplyResources(this.lblAutoReadingNameHeader, "lblAutoReadingNameHeader");
|
||||
this.lblAutoReadingNameHeader.Name = "lblAutoReadingNameHeader";
|
||||
//
|
||||
// lblAutoReadingPortHeader
|
||||
//
|
||||
resources.ApplyResources(this.lblAutoReadingPortHeader, "lblAutoReadingPortHeader");
|
||||
this.lblAutoReadingPortHeader.Name = "lblAutoReadingPortHeader";
|
||||
//
|
||||
// lblCalibrySetup
|
||||
//
|
||||
resources.ApplyResources(this.lblCalibrySetup, "lblCalibrySetup");
|
||||
this.lblCalibrySetup.Name = "lblCalibrySetup";
|
||||
//
|
||||
// lblAutoReadingHeader
|
||||
//
|
||||
resources.ApplyResources(this.lblAutoReadingHeader, "lblAutoReadingHeader");
|
||||
this.lblAutoReadingHeader.Name = "lblAutoReadingHeader";
|
||||
//
|
||||
// lblAutoReadingValue
|
||||
//
|
||||
resources.ApplyResources(this.lblAutoReadingValue, "lblAutoReadingValue");
|
||||
this.lblAutoReadingValue.Name = "lblAutoReadingValue";
|
||||
//
|
||||
// lblAutoReadingNameValue
|
||||
//
|
||||
resources.ApplyResources(this.lblAutoReadingNameValue, "lblAutoReadingNameValue");
|
||||
this.lblAutoReadingNameValue.Name = "lblAutoReadingNameValue";
|
||||
//
|
||||
// lblAutoReadingPortValue
|
||||
//
|
||||
resources.ApplyResources(this.lblAutoReadingPortValue, "lblAutoReadingPortValue");
|
||||
this.lblAutoReadingPortValue.Name = "lblAutoReadingPortValue";
|
||||
//
|
||||
// grbConfigureCalibry
|
||||
//
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblAutoReadingPortValue);
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblAutoReadingNameValue);
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblAutoReadingValue);
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblAutoReadingHeader);
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblCalibrySetup);
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblAutoReadingPortHeader);
|
||||
this.grbConfigureCalibry.Controls.Add(this.lblAutoReadingNameHeader);
|
||||
resources.ApplyResources(this.grbConfigureCalibry, "grbConfigureCalibry");
|
||||
this.grbConfigureCalibry.Name = "grbConfigureCalibry";
|
||||
this.grbConfigureCalibry.TabStop = false;
|
||||
//
|
||||
// cmbDeviceModel
|
||||
//
|
||||
this.cmbDeviceModel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbDeviceModel.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cmbDeviceModel, "cmbDeviceModel");
|
||||
this.cmbDeviceModel.Name = "cmbDeviceModel";
|
||||
this.cmbDeviceModel.SelectedIndexChanged += new System.EventHandler(this.cmbDeviceModel_SelectedIndexChanged);
|
||||
this.cmbDeviceModel.Click += new System.EventHandler(this.cmbDeviceModel_SelectedIndexChanged);
|
||||
//
|
||||
// lblDevice
|
||||
//
|
||||
resources.ApplyResources(this.lblDevice, "lblDevice");
|
||||
this.lblDevice.Name = "lblDevice";
|
||||
//
|
||||
// btnConnect
|
||||
//
|
||||
resources.ApplyResources(this.btnConnect, "btnConnect");
|
||||
this.btnConnect.Name = "btnConnect";
|
||||
this.btnConnect.UseVisualStyleBackColor = true;
|
||||
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
|
||||
//
|
||||
// lblComPort
|
||||
//
|
||||
resources.ApplyResources(this.lblComPort, "lblComPort");
|
||||
this.lblComPort.Name = "lblComPort";
|
||||
//
|
||||
// cmbCOMPort
|
||||
//
|
||||
this.cmbCOMPort.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cmbCOMPort, "cmbCOMPort");
|
||||
this.cmbCOMPort.Name = "cmbCOMPort";
|
||||
//
|
||||
// grbConnect
|
||||
//
|
||||
this.grbConnect.Controls.Add(this.cmbCOMPort);
|
||||
this.grbConnect.Controls.Add(this.lblComPort);
|
||||
this.grbConnect.Controls.Add(this.btnConnect);
|
||||
this.grbConnect.Controls.Add(this.lblDevice);
|
||||
this.grbConnect.Controls.Add(this.cmbDeviceModel);
|
||||
resources.ApplyResources(this.grbConnect, "grbConnect");
|
||||
this.grbConnect.Name = "grbConnect";
|
||||
this.grbConnect.TabStop = false;
|
||||
//
|
||||
// cmbAirTempChannel
|
||||
//
|
||||
this.cmbAirTempChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbAirTempChannel.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cmbAirTempChannel, "cmbAirTempChannel");
|
||||
this.cmbAirTempChannel.Name = "cmbAirTempChannel";
|
||||
this.cmbAirTempChannel.SelectedIndexChanged += new System.EventHandler(this.cmbChannel_SelectedIndexChanged);
|
||||
//
|
||||
// cmbWaterTempChannel
|
||||
//
|
||||
this.cmbWaterTempChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbWaterTempChannel.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cmbWaterTempChannel, "cmbWaterTempChannel");
|
||||
this.cmbWaterTempChannel.Name = "cmbWaterTempChannel";
|
||||
this.cmbWaterTempChannel.SelectedIndexChanged += new System.EventHandler(this.cmbChannel_SelectedIndexChanged);
|
||||
//
|
||||
// cmbHumdityChannel
|
||||
//
|
||||
this.cmbHumdityChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbHumdityChannel.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cmbHumdityChannel, "cmbHumdityChannel");
|
||||
this.cmbHumdityChannel.Name = "cmbHumdityChannel";
|
||||
this.cmbHumdityChannel.SelectedIndexChanged += new System.EventHandler(this.cmbChannel_SelectedIndexChanged);
|
||||
//
|
||||
// cmbPressureChannel
|
||||
//
|
||||
this.cmbPressureChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbPressureChannel.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cmbPressureChannel, "cmbPressureChannel");
|
||||
this.cmbPressureChannel.Name = "cmbPressureChannel";
|
||||
this.cmbPressureChannel.SelectedIndexChanged += new System.EventHandler(this.cmbChannel_SelectedIndexChanged);
|
||||
//
|
||||
// lblAirTemperatureChannel
|
||||
//
|
||||
resources.ApplyResources(this.lblAirTemperatureChannel, "lblAirTemperatureChannel");
|
||||
this.lblAirTemperatureChannel.Name = "lblAirTemperatureChannel";
|
||||
//
|
||||
// lblWaterTemperatureChannel
|
||||
//
|
||||
resources.ApplyResources(this.lblWaterTemperatureChannel, "lblWaterTemperatureChannel");
|
||||
this.lblWaterTemperatureChannel.Name = "lblWaterTemperatureChannel";
|
||||
//
|
||||
// lblHumidityChannel
|
||||
//
|
||||
resources.ApplyResources(this.lblHumidityChannel, "lblHumidityChannel");
|
||||
this.lblHumidityChannel.Name = "lblHumidityChannel";
|
||||
//
|
||||
// lblPressureChannel
|
||||
//
|
||||
resources.ApplyResources(this.lblPressureChannel, "lblPressureChannel");
|
||||
this.lblPressureChannel.Name = "lblPressureChannel";
|
||||
//
|
||||
// grpConfiguration
|
||||
//
|
||||
this.grpConfiguration.Controls.Add(this.lblPressureChannel);
|
||||
this.grpConfiguration.Controls.Add(this.lblHumidityChannel);
|
||||
this.grpConfiguration.Controls.Add(this.lblWaterTemperatureChannel);
|
||||
this.grpConfiguration.Controls.Add(this.lblAirTemperatureChannel);
|
||||
this.grpConfiguration.Controls.Add(this.cmbPressureChannel);
|
||||
this.grpConfiguration.Controls.Add(this.cmbHumdityChannel);
|
||||
this.grpConfiguration.Controls.Add(this.cmbWaterTempChannel);
|
||||
this.grpConfiguration.Controls.Add(this.cmbAirTempChannel);
|
||||
resources.ApplyResources(this.grpConfiguration, "grpConfiguration");
|
||||
this.grpConfiguration.Name = "grpConfiguration";
|
||||
this.grpConfiguration.TabStop = false;
|
||||
//
|
||||
// lblInformation
|
||||
//
|
||||
resources.ApplyResources(this.lblInformation, "lblInformation");
|
||||
this.lblInformation.Name = "lblInformation";
|
||||
//
|
||||
// grbInformation
|
||||
//
|
||||
this.grbInformation.Controls.Add(this.lblInformation);
|
||||
resources.ApplyResources(this.grbInformation, "grbInformation");
|
||||
this.grbInformation.Name = "grbInformation";
|
||||
this.grbInformation.TabStop = false;
|
||||
//
|
||||
// timRefresh
|
||||
//
|
||||
this.timRefresh.Interval = 5000;
|
||||
this.timRefresh.Tick += new System.EventHandler(this.timRefresh_Tick);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// ConfigurationForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.Controls.Add(this.grbConfigureCalibry);
|
||||
this.Controls.Add(this.grbCapture);
|
||||
this.Controls.Add(this.grbInformation);
|
||||
this.Controls.Add(this.grbConnect);
|
||||
this.Controls.Add(this.grpConfiguration);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Name = "ConfigurationForm";
|
||||
this.Load += new System.EventHandler(this.ConfigurationForm_Load);
|
||||
this.grbCapture.ResumeLayout(false);
|
||||
this.grbCapture.PerformLayout();
|
||||
this.grbConfigureCalibry.ResumeLayout(false);
|
||||
this.grbConfigureCalibry.PerformLayout();
|
||||
this.grbConnect.ResumeLayout(false);
|
||||
this.grpConfiguration.ResumeLayout(false);
|
||||
this.grbInformation.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lblAirTemperature;
|
||||
private System.Windows.Forms.Label lblWaterTemperature;
|
||||
private System.Windows.Forms.Label lblHumidity;
|
||||
private System.Windows.Forms.Label lblPressure;
|
||||
private System.Windows.Forms.TextBox txtAirTemperature;
|
||||
private System.Windows.Forms.TextBox txtPressure;
|
||||
private System.Windows.Forms.TextBox txtHumidity;
|
||||
private System.Windows.Forms.TextBox txtWaterTemperature;
|
||||
private System.Windows.Forms.Label lblDeviceSN;
|
||||
private System.Windows.Forms.Label lblCaptureTime;
|
||||
private System.Windows.Forms.TextBox txtDeviceSN;
|
||||
private System.Windows.Forms.TextBox txtCaptureTime;
|
||||
private System.Windows.Forms.Label lblDeviceModel;
|
||||
private System.Windows.Forms.TextBox txtDeviceModel;
|
||||
private System.Windows.Forms.Label lblConnectionStatus;
|
||||
private System.Windows.Forms.TextBox txtConnectionStatus;
|
||||
private System.Windows.Forms.GroupBox grbCapture;
|
||||
private System.Windows.Forms.Label lblAutoReadingNameHeader;
|
||||
private System.Windows.Forms.Label lblAutoReadingPortHeader;
|
||||
private System.Windows.Forms.Label lblCalibrySetup;
|
||||
private System.Windows.Forms.Label lblAutoReadingHeader;
|
||||
private System.Windows.Forms.Label lblAutoReadingValue;
|
||||
private System.Windows.Forms.Label lblAutoReadingNameValue;
|
||||
private System.Windows.Forms.Label lblAutoReadingPortValue;
|
||||
private System.Windows.Forms.GroupBox grbConfigureCalibry;
|
||||
private System.Windows.Forms.ComboBox cmbDeviceModel;
|
||||
private System.Windows.Forms.Label lblDevice;
|
||||
private System.Windows.Forms.Button btnConnect;
|
||||
private System.Windows.Forms.Label lblComPort;
|
||||
private System.Windows.Forms.ComboBox cmbCOMPort;
|
||||
private System.Windows.Forms.GroupBox grbConnect;
|
||||
private System.Windows.Forms.ComboBox cmbAirTempChannel;
|
||||
private System.Windows.Forms.ComboBox cmbWaterTempChannel;
|
||||
private System.Windows.Forms.ComboBox cmbHumdityChannel;
|
||||
private System.Windows.Forms.ComboBox cmbPressureChannel;
|
||||
private System.Windows.Forms.Label lblAirTemperatureChannel;
|
||||
private System.Windows.Forms.Label lblWaterTemperatureChannel;
|
||||
private System.Windows.Forms.Label lblHumidityChannel;
|
||||
private System.Windows.Forms.Label lblPressureChannel;
|
||||
private System.Windows.Forms.GroupBox grpConfiguration;
|
||||
private System.Windows.Forms.Label lblInformation;
|
||||
private System.Windows.Forms.GroupBox grbInformation;
|
||||
private System.Windows.Forms.Timer timRefresh;
|
||||
private System.Windows.Forms.Button btnClose;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TestoCaptureTool
|
||||
{
|
||||
public partial class ConfigurationForm : Form
|
||||
{
|
||||
public ConfigurationForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
Program._device.ConnectionStatusChanged += new EventHandler(Device_ConnectionStatusChanged);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the information according to the status of the device
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void Device_ConnectionStatusChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateDeviceStatus();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get the environmental conditions from the device and display it to the user.
|
||||
/// </summary>
|
||||
private void GetValue()
|
||||
{
|
||||
txtAirTemperature.Text = Program._device.AirTemperature.ToString("0.00",System.Globalization.CultureInfo.CurrentUICulture);
|
||||
txtWaterTemperature.Text = Program._device.WaterTemperature.ToString("0.00", System.Globalization.CultureInfo.CurrentUICulture);
|
||||
txtPressure.Text = Program._device.Pressure.ToString("0.00", System.Globalization.CultureInfo.CurrentUICulture);
|
||||
txtHumidity.Text = Program._device.Humidity.ToString("0.00", System.Globalization.CultureInfo.CurrentUICulture);
|
||||
txtDeviceSN.Text = Program._device.DeviceSN.ToString(System.Globalization.CultureInfo.CurrentUICulture);
|
||||
txtCaptureTime.Text = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
|
||||
txtDeviceModel.Text = cmbDeviceModel.Text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh the environmental conditions (automatic)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void timRefresh_Tick(object sender, EventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fill the list of the supported devices model displayed to the user
|
||||
/// Selects the current device from the list (if defined)
|
||||
/// Display the device status to the user
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ConfigurationForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
cmbCOMPort.Items.Clear();
|
||||
cmbCOMPort.Items.AddRange(System.IO.Ports.SerialPort.GetPortNames());
|
||||
cmbDeviceModel.Items.Add(new CaptionObject("testo 435-635-735", "testo435-635-735"));
|
||||
cmbDeviceModel.DisplayMember = "Caption";
|
||||
cmbDeviceModel.ValueMember = "Name";
|
||||
|
||||
foreach (CaptionObject item in cmbDeviceModel.Items)
|
||||
{
|
||||
if (item.Name == Program._device.DeviceType)
|
||||
{
|
||||
cmbDeviceModel.SelectedItem = item;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (string port in cmbCOMPort.Items)
|
||||
{
|
||||
if(String.Compare(port.Remove(0,3),Program._device.ComPort.ToString())==0)
|
||||
{
|
||||
cmbCOMPort.SelectedItem=port;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateDeviceStatus();
|
||||
lblAutoReadingNameValue.Text = System.Net.Dns.GetHostName();
|
||||
lblAutoReadingPortValue.Text = Properties.Settings.Default.NetworkPort.ToString();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When the user select an other device in the list,
|
||||
/// defining the selection as current model.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void cmbDeviceModel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cmbDeviceModel.SelectedItem != null)
|
||||
{
|
||||
CaptionObject selectedDevice = (CaptionObject)cmbDeviceModel.SelectedItem;
|
||||
|
||||
if (Program._device != null)
|
||||
{
|
||||
if (TestoDevice.IsUsbDevice(selectedDevice.Name))
|
||||
{
|
||||
cmbCOMPort.Enabled = false;
|
||||
cmbCOMPort.DropDownStyle = ComboBoxStyle.DropDown;
|
||||
cmbCOMPort.Text = "USB";
|
||||
}
|
||||
else
|
||||
{
|
||||
cmbCOMPort.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
cmbCOMPort.Enabled = true;
|
||||
cmbCOMPort.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating the information related to the status of the device to the user
|
||||
/// </summary>
|
||||
private void UpdateDeviceStatus()
|
||||
{
|
||||
timRefresh.Enabled = Program._device.IsConnected;
|
||||
|
||||
//The list of available channel is cleared and filled with the new settings.
|
||||
cmbAirTempChannel.Items.Clear();
|
||||
cmbWaterTempChannel.Items.Clear();
|
||||
cmbPressureChannel.Items.Clear();
|
||||
cmbHumdityChannel.Items.Clear();
|
||||
|
||||
if (Program._device.IsConnected)
|
||||
{
|
||||
CaptionObject channelItem = new CaptionObject(Properties.Resources.NotAvailable, "-1");
|
||||
cmbAirTempChannel.Items.Add(channelItem);
|
||||
cmbWaterTempChannel.Items.Add(channelItem);
|
||||
cmbPressureChannel.Items.Add(channelItem);
|
||||
cmbHumdityChannel.Items.Add(channelItem);
|
||||
|
||||
for (int channel = 0; channel < Program._device.AvailableChannelCount; channel++)
|
||||
{
|
||||
channelItem = new CaptionObject(String.Format(System.Globalization.CultureInfo.CurrentUICulture, Properties.Resources.channelNumber, channel + 1), channel.ToString(System.Globalization.CultureInfo.InvariantCulture));
|
||||
cmbAirTempChannel.Items.Add(channelItem);
|
||||
cmbWaterTempChannel.Items.Add(channelItem);
|
||||
cmbPressureChannel.Items.Add(channelItem);
|
||||
cmbHumdityChannel.Items.Add(channelItem);
|
||||
}
|
||||
|
||||
//Selecting the value for each channel if already defined
|
||||
cmbAirTempChannel.SelectedIndex = Program._device.AirTemperatureChannel+1;
|
||||
cmbWaterTempChannel.SelectedIndex = Program._device.WaterTemperatureChannel+1;
|
||||
cmbHumdityChannel.SelectedIndex = Program._device.HumidityChannel+1;
|
||||
cmbPressureChannel.SelectedIndex = Program._device.PressureChannel+1;
|
||||
|
||||
//Displaying the current value retrieved on the device
|
||||
GetValue();
|
||||
|
||||
txtConnectionStatus.ForeColor = Color.Green;
|
||||
txtConnectionStatus.Text = Properties.Resources.deviceConnected;
|
||||
}
|
||||
cmbAirTempChannel.DisplayMember = "Caption";
|
||||
cmbWaterTempChannel.DisplayMember = "Caption";
|
||||
cmbPressureChannel.DisplayMember = "Caption";
|
||||
cmbHumdityChannel.DisplayMember = "Caption";
|
||||
|
||||
cmbAirTempChannel.ValueMember = "Name";
|
||||
cmbWaterTempChannel.ValueMember = "Name";
|
||||
cmbPressureChannel.ValueMember = "Name";
|
||||
cmbHumdityChannel.ValueMember = "Name";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connecting to the device with the specified model type and
|
||||
/// specified COM Port (if not USB device)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnConnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
CaptionObject selectedDevice = (CaptionObject)cmbDeviceModel.SelectedItem;
|
||||
|
||||
if (selectedDevice == null)
|
||||
{
|
||||
MessageBox.Show(Properties.Resources.selectDevice, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Program._device.Disconnect();
|
||||
Program._device.DeviceType = selectedDevice.Name;
|
||||
if (!TestoDevice.IsUsbDevice(selectedDevice.Name))
|
||||
{
|
||||
short comPortOut;
|
||||
string comPort = cmbCOMPort.Text.Remove(0, 3);
|
||||
if (!short.TryParse(comPort, out comPortOut))
|
||||
{
|
||||
MessageBox.Show(Properties.Resources.specifyCOMPort, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
Program._device.ComPort = comPortOut;
|
||||
}
|
||||
|
||||
TestoDevice.OperationResult result = Program._device.Connect();
|
||||
|
||||
if (result != TestoDevice.OperationResult.Ok)
|
||||
{
|
||||
txtConnectionStatus.ForeColor = Color.Red;
|
||||
txtConnectionStatus.Text = TestoDevice.ErrorMessage(result);
|
||||
txtAirTemperature.Text = "";
|
||||
txtWaterTemperature.Text = "";
|
||||
txtPressure.Text = "";
|
||||
txtHumidity.Text = "";
|
||||
txtDeviceSN.Text = "";
|
||||
txtCaptureTime.Text = "";
|
||||
MessageBox.Show(TestoDevice.ErrorMessage(result), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private void cmbChannel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ComboBox cmbSender = (ComboBox)sender;
|
||||
if (cmbSender == cmbAirTempChannel)
|
||||
Program._device.AirTemperatureChannel = System.Convert.ToInt16(((CaptionObject)cmbSender.SelectedItem).Name);
|
||||
|
||||
if(cmbSender==cmbWaterTempChannel)
|
||||
Program._device.WaterTemperatureChannel = System.Convert.ToInt16(((CaptionObject)cmbSender.SelectedItem).Name);
|
||||
|
||||
if(cmbSender==cmbHumdityChannel)
|
||||
Program._device.HumidityChannel = System.Convert.ToInt16(((CaptionObject)cmbSender.SelectedItem).Name);
|
||||
|
||||
if(cmbSender==cmbPressureChannel)
|
||||
Program._device.PressureChannel = System.Convert.ToInt16(((CaptionObject)cmbSender.SelectedItem).Name);
|
||||
|
||||
GetValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
137
Calibry/5.0/PS_Deployment/Files/capture/Source code/Program.cs
Normal file
137
Calibry/5.0/PS_Deployment/Files/capture/Source code/Program.cs
Normal file
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
namespace TestoCaptureTool
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static Communication CalibryListener;
|
||||
static public TestoDevice _device;
|
||||
static private string deviceConfigurationFile = System.IO.Path.Combine(Application.CommonAppDataPath, "DeviceSetting.xml");
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
//If the file exist, deserializing the configuration saved at the last shutdown.
|
||||
System.Xml.Serialization.XmlSerializer serializer;
|
||||
if (System.IO.File.Exists(deviceConfigurationFile))
|
||||
{
|
||||
serializer = new System.Xml.Serialization.XmlSerializer(typeof(TestoDevice));
|
||||
System.IO.StreamReader streamReader = new System.IO.StreamReader(deviceConfigurationFile);
|
||||
try
|
||||
{
|
||||
_device = (TestoDevice)serializer.Deserialize(streamReader);
|
||||
}
|
||||
catch
|
||||
{
|
||||
System.IO.File.Delete(deviceConfigurationFile);
|
||||
}
|
||||
finally
|
||||
{
|
||||
streamReader.Close();
|
||||
streamReader.Dispose();
|
||||
}
|
||||
|
||||
if (_device != null)
|
||||
{
|
||||
_device.Connect();
|
||||
}
|
||||
}
|
||||
|
||||
//If no configuration was saved or if the deserialization failed, instantiating a new object
|
||||
if (_device == null)
|
||||
_device = new TestoDevice();
|
||||
|
||||
//Starting the process to listen to calibry request
|
||||
CalibryListener = new Communication();
|
||||
//CalibryListener.StartListening();
|
||||
|
||||
CalibryListener.OpenCommunication();
|
||||
|
||||
System.Threading.Thread listener = new System.Threading.Thread(new System.Threading.ThreadStart(CalibryListener.StartListening));
|
||||
listener.Start();
|
||||
|
||||
//Displaying the UI to the user
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new ConfigurationForm());
|
||||
|
||||
CalibryListener.StopListening();
|
||||
//On shut down, aborting the listening operation and saving the configuration
|
||||
listener.Interrupt();
|
||||
|
||||
serializer = new System.Xml.Serialization.XmlSerializer(typeof(TestoDevice));
|
||||
System.IO.StreamWriter streamWriter = new System.IO.StreamWriter(deviceConfigurationFile);
|
||||
serializer.Serialize(streamWriter, _device);
|
||||
streamWriter.Close();
|
||||
streamWriter.Dispose();
|
||||
}
|
||||
|
||||
internal static string AssemblyVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
internal static string AssemblyDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Description attributes on this assembly
|
||||
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyDescriptionAttribute), false);
|
||||
// If there aren't any Description attributes, return an empty string
|
||||
if (attributes.Length == 0)
|
||||
return "";
|
||||
// If there is a Description attribute, return its value
|
||||
return ((System.Reflection.AssemblyDescriptionAttribute)attributes[0]).Description;
|
||||
}
|
||||
}
|
||||
|
||||
internal static string AssemblyCopyright
|
||||
{
|
||||
get
|
||||
{
|
||||
// Get all Copyright attributes on this assembly
|
||||
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyCopyrightAttribute), false);
|
||||
// If there aren't any Copyright attributes, return an empty string
|
||||
if (attributes.Length == 0)
|
||||
return "";
|
||||
// If there is a Copyright attribute, return its value
|
||||
return ((System.Reflection.AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class which contains a displayed value and a value used internally
|
||||
/// </summary>
|
||||
class CaptionObject
|
||||
{
|
||||
private string _caption;
|
||||
private string _name;
|
||||
|
||||
public CaptionObject(string Caption, string Name)
|
||||
{
|
||||
_caption = Caption;
|
||||
_name = Name;
|
||||
}
|
||||
|
||||
public string Caption
|
||||
{
|
||||
get { return _caption; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("d5c7c598-fe09-4ee1-bcc2-d046cbb55f89")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
108
Calibry/5.0/PS_Deployment/Files/capture/Source code/Properties/Resources.Designer.cs
generated
Normal file
108
Calibry/5.0/PS_Deployment/Files/capture/Source code/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.832
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TestoCaptureTool.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TestoCaptureTool.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channel {0}.
|
||||
/// </summary>
|
||||
internal static string channelNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("channelNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Device is connected.
|
||||
/// </summary>
|
||||
internal static string deviceConnected {
|
||||
get {
|
||||
return ResourceManager.GetString("deviceConnected", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Not available on the device.
|
||||
/// </summary>
|
||||
internal static string NotAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("NotAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Select a device in the list.
|
||||
/// </summary>
|
||||
internal static string selectDevice {
|
||||
get {
|
||||
return ResourceManager.GetString("selectDevice", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to COM Port is invalid. Please provide a valid COM Port number..
|
||||
/// </summary>
|
||||
internal static string specifyCOMPort {
|
||||
get {
|
||||
return ResourceManager.GetString("specifyCOMPort", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="channelNumber" xml:space="preserve">
|
||||
<value>Channel {0}</value>
|
||||
</data>
|
||||
<data name="deviceConnected" xml:space="preserve">
|
||||
<value>Device is connected</value>
|
||||
</data>
|
||||
<data name="NotAvailable" xml:space="preserve">
|
||||
<value>Not available on the device</value>
|
||||
</data>
|
||||
<data name="selectDevice" xml:space="preserve">
|
||||
<value>Select a device in the list</value>
|
||||
</data>
|
||||
<data name="specifyCOMPort" xml:space="preserve">
|
||||
<value>COM Port is invalid. Please provide a valid COM Port number.</value>
|
||||
</data>
|
||||
</root>
|
||||
35
Calibry/5.0/PS_Deployment/Files/capture/Source code/Properties/Settings.Designer.cs
generated
Normal file
35
Calibry/5.0/PS_Deployment/Files/capture/Source code/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.832
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TestoCaptureTool.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("50907")]
|
||||
public int NetworkPort {
|
||||
get {
|
||||
return ((int)(this["NetworkPort"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="TestoCaptureTool.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="NetworkPort" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">50907</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
namespace TestoCaptureTool.Properties {
|
||||
|
||||
|
||||
// This class allows you to handle specific events on the settings class:
|
||||
// The SettingChanging event is raised before a setting's value is changed.
|
||||
// The PropertyChanged event is raised after a setting's value is changed.
|
||||
// The SettingsLoaded event is raised after the setting values are loaded.
|
||||
// The SettingsSaving event is raised before the setting values are saved.
|
||||
internal sealed partial class Settings {
|
||||
|
||||
public Settings() {
|
||||
// // To add event handlers for saving and changing settings, uncomment the lines below:
|
||||
//
|
||||
// this.SettingChanging += this.SettingChangingEventHandler;
|
||||
//
|
||||
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
||||
//
|
||||
}
|
||||
|
||||
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
|
||||
// Add code to handle the SettingChangingEvent event here.
|
||||
}
|
||||
|
||||
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
|
||||
// Add code to handle the SettingsSaving event here.
|
||||
}
|
||||
}
|
||||
}
|
||||
488
Calibry/5.0/PS_Deployment/Files/capture/Source code/Testo435.cs
Normal file
488
Calibry/5.0/PS_Deployment/Files/capture/Source code/Testo435.cs
Normal file
@@ -0,0 +1,488 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml;
|
||||
|
||||
namespace TestoCaptureTool
|
||||
{
|
||||
/// <summary>
|
||||
/// This class provide the communication functionality with a testo device.
|
||||
/// </summary>
|
||||
public class TestoDevice : IDisposable
|
||||
{
|
||||
public event EventHandler ConnectionStatusChanged;
|
||||
|
||||
public enum OperationResult
|
||||
{
|
||||
Ok = 0,
|
||||
DeviceTypeNotSpecified,
|
||||
DeviceTypeNotSupported,
|
||||
ComPortNotSpecified,
|
||||
DeviceNotFound,
|
||||
DeviceNotResponding,
|
||||
DriverNotInstalled
|
||||
|
||||
}
|
||||
Tcddka.tcddk _testoDevice;
|
||||
|
||||
short _airTemperatureChannel = -1;
|
||||
short _waterTemperatureChannel = -1;
|
||||
short _pressureChannel = -1;
|
||||
short _humidityChannel = -1;
|
||||
short _availableChannelCount = -1;
|
||||
|
||||
int _deviceSN;
|
||||
int _timeOut;
|
||||
string _deviceType;
|
||||
short _comPort;
|
||||
|
||||
bool _deviceConnected;
|
||||
|
||||
~TestoDevice()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
public static string ErrorMessage(OperationResult result)
|
||||
{
|
||||
switch(result)
|
||||
{
|
||||
case OperationResult.ComPortNotSpecified: return "COM Port not specified";
|
||||
case OperationResult.DeviceNotFound: return "Device not found";
|
||||
case OperationResult.DeviceNotResponding: return "Device is not responding";
|
||||
case OperationResult.DeviceTypeNotSpecified: return "Device type is not specified";
|
||||
case OperationResult.DeviceTypeNotSupported: return "Device type is not supported";
|
||||
case OperationResult.DriverNotInstalled: return "Driver is not installed";
|
||||
default: return result.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open a connection with a testo device using a serial port.
|
||||
/// If the device is an USB device, the correct function will be called.
|
||||
/// </summary>
|
||||
/// <param name="COMPort">Port number where the device is connected</param>
|
||||
/// <returns>Operation result</returns>
|
||||
public OperationResult Connect(short COMPort)
|
||||
{
|
||||
|
||||
if (_deviceConnected)
|
||||
return OperationResult.Ok;
|
||||
|
||||
if (TestoDevice.IsUsbDevice(_deviceType))
|
||||
return this.Connect();
|
||||
|
||||
_comPort = COMPort;
|
||||
if (_comPort == 0)
|
||||
throw new InvalidOperationException("Specified COM Port is invalid");
|
||||
|
||||
try
|
||||
{
|
||||
_testoDevice = new Tcddka.tcddk();
|
||||
if (_testoDevice.Init(_comPort, _deviceType, _timeOut))
|
||||
{
|
||||
_deviceConnected = true;
|
||||
if (ConnectionStatusChanged != null)
|
||||
ConnectionStatusChanged(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
catch (System.Runtime.InteropServices.COMException)
|
||||
{
|
||||
return OperationResult.DeviceNotResponding;
|
||||
}
|
||||
|
||||
return OperationResult.Ok;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open a connection with a testo device using an USB connection.
|
||||
/// If the device uses a serial port, the correct function will be called.
|
||||
/// </summary>
|
||||
/// <returns>Operation result</returns>
|
||||
public OperationResult Connect()
|
||||
{
|
||||
|
||||
if (String.IsNullOrEmpty(_deviceType))
|
||||
return OperationResult.DeviceTypeNotSpecified;
|
||||
|
||||
if (!TestoDevice.IsUsbDevice(_deviceType))
|
||||
return this.Connect(_comPort);
|
||||
|
||||
//get a reference to the interface for USB devices
|
||||
Tcddka.tcusbserials connectedDevices=null;
|
||||
try
|
||||
{
|
||||
connectedDevices = new Tcddka.tcusbserials();
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (connectedDevices == null)
|
||||
return OperationResult.DriverNotInstalled;
|
||||
}
|
||||
|
||||
//Get a reference to a specific device type (e.g Testo 435)
|
||||
try
|
||||
{
|
||||
connectedDevices.Init(_deviceType);
|
||||
}
|
||||
catch (System.Runtime.InteropServices.COMException)
|
||||
{
|
||||
_deviceConnected = false;
|
||||
return OperationResult.DeviceNotFound;
|
||||
}
|
||||
|
||||
//If a device was found, configure it.
|
||||
//This version supports only 1 device. The first device found will be used.
|
||||
if (connectedDevices.Count > 0)
|
||||
{
|
||||
System.Collections.IEnumerator testoEnum = (System.Collections.IEnumerator)connectedDevices._NewEnum;
|
||||
|
||||
while (testoEnum.MoveNext())
|
||||
{
|
||||
//Getting the device Serial number
|
||||
int deviceSN = 0;
|
||||
|
||||
if (Int32.TryParse(testoEnum.Current.ToString(), out deviceSN))
|
||||
{
|
||||
//Get a reference to the device.
|
||||
_testoDevice = new Tcddka.tcddk();
|
||||
try
|
||||
{
|
||||
//Initialize the communication between the computer and the device.
|
||||
_testoDevice.InitSerial(deviceSN, _deviceType, _timeOut);
|
||||
_availableChannelCount = _testoDevice.NumCols;
|
||||
|
||||
int.TryParse(_testoDevice.Ident, out _deviceSN);
|
||||
_deviceConnected = true;
|
||||
|
||||
//trying to configure the channel.
|
||||
//The channel configuration is based on the unit returned by each channel.
|
||||
//It is assumed that the water temperature is colder than the air temperature.
|
||||
for (short channelNumber = 0; channelNumber < _availableChannelCount; channelNumber++)
|
||||
{
|
||||
string channelUnit = _testoDevice.get_Unit(channelNumber);
|
||||
if (string.Compare(channelUnit, "<22>C") == 0 || string.Compare(channelUnit, "<22>F") == 0)
|
||||
{
|
||||
if (this.AirTemperatureChannel == -1)
|
||||
{
|
||||
this.AirTemperatureChannel = channelNumber;
|
||||
if (this.WaterTemperatureChannel == -1)
|
||||
{
|
||||
this.WaterTemperatureChannel = channelNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
double temperature1 = _testoDevice.get_RecentVal(this.AirTemperatureChannel);
|
||||
double temperature2 = _testoDevice.get_RecentVal(this.WaterTemperatureChannel);
|
||||
if (temperature1 < temperature2)
|
||||
{
|
||||
this.AirTemperatureChannel = this.WaterTemperatureChannel;
|
||||
this.WaterTemperatureChannel = channelNumber;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.WaterTemperatureChannel == -1)
|
||||
{
|
||||
this.WaterTemperatureChannel = channelNumber;
|
||||
}
|
||||
double temperature1 = _testoDevice.get_RecentVal(this.AirTemperatureChannel);
|
||||
double temperature2 = _testoDevice.get_RecentVal(channelNumber);
|
||||
if (temperature1 < temperature2)
|
||||
{
|
||||
this.WaterTemperatureChannel = this.AirTemperatureChannel;
|
||||
this.AirTemperatureChannel = channelNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WaterTemperatureChannel = channelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (string.Compare(channelUnit, "hPa") == 0 || string.Compare(channelUnit, "kPa") == 0 || string.Compare(channelUnit, "inW") == 0 || string.Compare(channelUnit, "mbar") == 0 || string.Compare(channelUnit, "Pa") == 0)
|
||||
{
|
||||
if (this.PressureChannel == -1)
|
||||
this.PressureChannel = channelNumber;
|
||||
}
|
||||
else if (string.Compare(channelUnit, "%rH") == 0)
|
||||
{
|
||||
if (this.HumidityChannel == -1)
|
||||
this.HumidityChannel = channelNumber;
|
||||
}
|
||||
|
||||
}
|
||||
if (ConnectionStatusChanged != null)
|
||||
ConnectionStatusChanged(this, new EventArgs());
|
||||
break;
|
||||
}
|
||||
catch (System.Runtime.InteropServices.COMException)
|
||||
{
|
||||
return OperationResult.DeviceNotResponding;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return OperationResult.DeviceNotFound;
|
||||
}
|
||||
|
||||
return OperationResult.Ok;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Close the connection with the device.
|
||||
/// </summary>
|
||||
public void Disconnect()
|
||||
{
|
||||
if (!_deviceConnected)
|
||||
return;
|
||||
|
||||
Dispose(true);
|
||||
_deviceConnected = false;
|
||||
if (ConnectionStatusChanged != null)
|
||||
ConnectionStatusChanged(this, new EventArgs());
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get { return _deviceConnected; }
|
||||
}
|
||||
|
||||
static public bool IsUsbDevice (string deviceType)
|
||||
{
|
||||
if (string.Compare(deviceType, "testo435-635-735", true, System.Globalization.CultureInfo.InvariantCulture) == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public short ComPort
|
||||
{
|
||||
get { return _comPort; }
|
||||
set { _comPort = value; }
|
||||
}
|
||||
|
||||
public string DeviceType
|
||||
{
|
||||
get { return _deviceType; }
|
||||
set
|
||||
{
|
||||
if (_deviceConnected)
|
||||
Disconnect();
|
||||
|
||||
_deviceType = value;
|
||||
switch (_deviceType)
|
||||
{
|
||||
case "testostor175":
|
||||
_timeOut = 7000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testostor171":
|
||||
_timeOut = 7000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo400-650-950":
|
||||
_timeOut = 30000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo445-645-945-946-545":
|
||||
_timeOut = 7000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo454-2000":
|
||||
_timeOut = 38000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo175-177":
|
||||
_timeOut = 7000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo174":
|
||||
_timeOut = 12000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo300-M-XL":
|
||||
_timeOut = 7000;
|
||||
_deviceType = DeviceType;
|
||||
break;
|
||||
case "testo435-635-735":
|
||||
_deviceType = DeviceType;
|
||||
_timeOut = 7000;
|
||||
break;
|
||||
default:
|
||||
_deviceType = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int AvailableChannelCount
|
||||
{
|
||||
get { return _availableChannelCount; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the Air temperature. The value is in <20>C.
|
||||
/// If the device provides the temperature in <20>F, it will be converted to <20>C
|
||||
/// </summary>
|
||||
public double AirTemperature
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_deviceConnected)
|
||||
return 0;
|
||||
|
||||
_testoDevice.Get();
|
||||
if (_availableChannelCount > _airTemperatureChannel && _airTemperatureChannel > -1)
|
||||
{
|
||||
double temperature = _testoDevice.get_RecentVal(_airTemperatureChannel);
|
||||
string unit = _testoDevice.get_Unit(_airTemperatureChannel);
|
||||
if (string.Compare(unit, "<22>C") == 0)
|
||||
return temperature;
|
||||
else if (string.Compare(unit, "<22>F") == 0)
|
||||
return (temperature-32)/1.8;
|
||||
else
|
||||
return temperature;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the Water temperature. The value is in <20>C.
|
||||
/// If the device provides the temperature in <20>F, it will be converted to <20>C
|
||||
/// </summary>
|
||||
public double WaterTemperature
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_deviceConnected)
|
||||
return 0;
|
||||
|
||||
|
||||
if (_availableChannelCount > _waterTemperatureChannel && _waterTemperatureChannel > -1)
|
||||
{
|
||||
double temperature = _testoDevice.get_RecentVal(_waterTemperatureChannel);
|
||||
string unit = _testoDevice.get_Unit(_waterTemperatureChannel);
|
||||
if (string.Compare(unit, "<22>C") == 0)
|
||||
return temperature;
|
||||
else if (string.Compare(unit, "<22>F") == 0)
|
||||
return (temperature - 32) / 1.8;
|
||||
else
|
||||
return temperature;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the Pressure. The value is in kPa.
|
||||
/// If the device provides the temperature in hPa, mbar or Pa, it will be converted to kPa
|
||||
/// </summary>
|
||||
public double Pressure
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_deviceConnected)
|
||||
return 0;
|
||||
|
||||
|
||||
if (_availableChannelCount > _pressureChannel & _pressureChannel > -1)
|
||||
{
|
||||
double pressure = _testoDevice.get_RecentVal(_pressureChannel);
|
||||
string unit = _testoDevice.get_Unit(_pressureChannel);
|
||||
if (string.Compare(unit, "hPa") == 0)
|
||||
return pressure / 10;
|
||||
else if (string.Compare(unit, "kPa") == 0)
|
||||
return pressure;
|
||||
else if (string.Compare(unit, "inW") == 0)
|
||||
return pressure / (10 / 1013);
|
||||
else if (string.Compare(unit, "mbar") == 0)
|
||||
return pressure / 10;
|
||||
else if (string.Compare(unit, "Pa") == 0)
|
||||
return pressure / 1000;
|
||||
else
|
||||
return pressure;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the Humidity. The value is in %rH.
|
||||
/// </summary>
|
||||
public double Humidity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_deviceConnected)
|
||||
return 0;
|
||||
|
||||
|
||||
if (_availableChannelCount > _humidityChannel && _humidityChannel > -1)
|
||||
return _testoDevice.get_RecentVal(_humidityChannel);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int DeviceSN
|
||||
{
|
||||
get { return _deviceSN; }
|
||||
}
|
||||
|
||||
public short AirTemperatureChannel
|
||||
{
|
||||
get { return _airTemperatureChannel; }
|
||||
set { _airTemperatureChannel = value; }
|
||||
}
|
||||
|
||||
public short WaterTemperatureChannel
|
||||
{
|
||||
get { return _waterTemperatureChannel; }
|
||||
set { _waterTemperatureChannel = value; }
|
||||
}
|
||||
|
||||
public short PressureChannel
|
||||
{
|
||||
get { return _pressureChannel; }
|
||||
set { _pressureChannel = value; }
|
||||
}
|
||||
|
||||
public short HumidityChannel
|
||||
{
|
||||
get { return _humidityChannel; }
|
||||
set { _humidityChannel = value; }
|
||||
}
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
|
||||
}
|
||||
if (_testoDevice != null)
|
||||
System.Runtime.InteropServices.Marshal.ReleaseComObject(_testoDevice);
|
||||
|
||||
_testoDevice = null;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{AA47E4A9-0625-49FB-ABC2-2E90FB34B471}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TestoCaptureTool</RootNamespace>
|
||||
<AssemblyName>TestoCapture</AssemblyName>
|
||||
<StartupObject>TestoCaptureTool.Program</StartupObject>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<ManifestCertificateThumbprint>5B4B94893678DB9BDE24EC0F0BD2AFC06B3DE386</ManifestCertificateThumbprint>
|
||||
<ManifestKeyFile>TestoCapture_TemporaryKey.pfx</ManifestKeyFile>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
<SignManifests>false</SignManifests>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationVersion>1.0.0.1</ApplicationVersion>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Communication.cs" />
|
||||
<Compile Include="ConfigurationForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ConfigurationForm.Designer.cs">
|
||||
<DependentUpon>ConfigurationForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Testo435.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ConfigurationForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ConfigurationForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Tcddka">
|
||||
<Guid>{933CB583-B37E-11D2-B9E5-0000C0A215C3}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>2</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Resources\capture_header_image.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\DataSources\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="TestoCaptureTool.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<applicationSettings>
|
||||
<TestoCaptureTool.Properties.Settings>
|
||||
<setting name="NetworkPort" serializeAs="String">
|
||||
<value>50907</value>
|
||||
</setting>
|
||||
</TestoCaptureTool.Properties.Settings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
Binary file not shown.
BIN
Calibry/5.0/PS_Deployment/Files/capture/dotnetfx20.exe
Normal file
BIN
Calibry/5.0/PS_Deployment/Files/capture/dotnetfx20.exe
Normal file
Binary file not shown.
BIN
Calibry/5.0/PS_Deployment/Files/capture/isnetfx.exe
Normal file
BIN
Calibry/5.0/PS_Deployment/Files/capture/isnetfx.exe
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="TestoCaptureTool.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<applicationSettings>
|
||||
<TestoCaptureTool.Properties.Settings>
|
||||
<setting name="NetworkPort" serializeAs="String">
|
||||
<value>50907</value>
|
||||
</setting>
|
||||
</TestoCaptureTool.Properties.Settings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
BIN
Calibry/5.0/PS_Deployment/Files/capture/setup.exe
Normal file
BIN
Calibry/5.0/PS_Deployment/Files/capture/setup.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user