Add (develop) GCI - interface of GCI and Laatzen

This commit is contained in:
Marek Frniak 2026-04-14 12:34:50 +02:00
parent 5b73835d94
commit eda0644b4b
26 changed files with 614 additions and 13344 deletions

View File

@ -2,6 +2,7 @@
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@ -11,6 +12,7 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Security.Policy;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@ -20,6 +22,7 @@ using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications.Const;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers.DataTypes;
@ -27,9 +30,9 @@ using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
using Xylem.Common.Logic.SoftwareAccessHelper;
using Xylem.Common.Utils.Logging;
using static Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.GenesisMeter;
using Access = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Access;
using Register = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Register;
using System.Collections.Concurrent;
namespace GenesisCordonelInterface.API
{
@ -69,7 +72,7 @@ namespace GenesisCordonelInterface.API
/// }
/// </code>
/// </example>
internal class InterfaceGCIToLaatzen
public class InterfaceGCIToLaatzen
{
#region Declaration region
private static readonly Lazy<ILogger> Logger = new Lazy<ILogger>(() => NLogHelper.CreateOrGetLogger("GenesisCordonelInterface"));
@ -97,6 +100,17 @@ namespace GenesisCordonelInterface.API
get;
set;
}
/// <summary>
/// Gets a value indicating whether the meter is connected and logged on.
/// </summary>
public bool IsConnected
{
get
{
return _currentGenesis != null && _currentGenesis.IsLoggedOn;
}
}
#endregion
#region API - Port Detection region(extracted from FrmSetup:DgvConfig_CellContentClick)
@ -267,6 +281,72 @@ namespace GenesisCordonelInterface.API
#endregion
#region Password and Login
/// <summary>
/// Sets meter password.
/// </summary>
public bool SetMeterPassword(string password)
{
EnsureConnected();
if (string.IsNullOrWhiteSpace(password))
throw new ArgumentException("Password cannot be null or empty.", nameof(password));
try
{
// Replace this with the real Genesis API call if available.
// Example:
// return _currentGenesis.SetMeterPassword(password);
var result = WriteRegister("SECURITY_Password", password, true, true);
return result.Success;
}
catch (Exception ex)
{
Logger.Value.Error(ex, "SetMeterPassword failed.");
return false;
}
}
/// <summary>
/// Performs login using provided password.
/// </summary>
public bool Login(string password)
{
if (_currentGenesis == null)
throw new InvalidOperationException("Genesis meter is not initialized. Call Connect first.");
if (string.IsNullOrWhiteSpace(password))
throw new ArgumentException("Password cannot be null or empty.", nameof(password));
try
{
// IMPORTANT:
// Replace with actual Genesis API method if available
// Variant A direct login method (preferred)
// return _currentGenesis.Login(password);
// Variant B if password must be set first
// _currentGenesis.Password = password;
// return _currentGenesis.Login();
// TEMP fallback (if no direct method known)
bool result = _currentGenesis.Login();
if (!result)
Logger.Value.Warn("Login failed.");
return result;
}
catch (Exception ex)
{
Logger.Value.Error(ex, "Login failed.");
return false;
}
}
#endregion
#region API - Connect
/// <summary>
/// Represents the result of a connect operation.
@ -359,7 +439,7 @@ namespace GenesisCordonelInterface.API
/// }
/// </code>
/// </example>
public ConnectResult Connect(int slotNo, bool useOfflinePasswords)
public ConnectResult Connect(int slotNo, PasswordSource usePasswordSource, List<string> externPasswords)
{
try
{
@ -371,10 +451,12 @@ namespace GenesisCordonelInterface.API
_currentGenesis = null;
_currentGenesis = new GenesisMeter();
_currentGenesis.UseOfflinePasswords = useOfflinePasswords;
_currentGenesis.UseOfflinePasswords = usePasswordSource == PasswordSource.OfflineFile;
_currentGenesis.usePasswordSource = usePasswordSource;
_currentGenesis.SetupFromConfigFile(slotNo);
_meterBatch.AddMeter(_currentGenesis);
_meterBatch._externPasswords = externPasswords;
_meterBatch.MetersLogin();
if (!_currentGenesis.IsLoggedOn && string.IsNullOrEmpty(_currentGenesis.PcbId))
@ -442,5 +524,380 @@ namespace GenesisCordonelInterface.API
#endregion
#region Meter Registers
/// <summary>
/// Result of a register read operation.
/// </summary>
public class RegisterReadResult
{
/// <summary>
/// Indicates whether the read operation was successful.
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Name of the register.
/// </summary>
public string RegisterName { get; set; }
/// <summary>
/// Raw bytes returned from the device.
/// </summary>
public byte[] RawBytes { get; set; }
/// <summary>
/// Raw value formatted as hexadecimal string.
/// </summary>
public string RawHex { get; set; }
/// <summary>
/// Converted value based on register data type (if possible).
/// </summary>
public object TypedValue { get; set; }
/// <summary>
/// String representation of the converted value.
/// </summary>
public string TypedValueText { get; set; }
/// <summary>
/// Data type of the register.
/// </summary>
public string DataType { get; set; }
/// <summary>
/// Error message if operation failed.
/// </summary>
public string ErrorMessage { get; set; }
}
/// <summary>
/// Result of a register write operation.
/// </summary>
public class RegisterWriteResult
{
/// <summary>
/// Indicates whether the write operation was successful.
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Name of the register.
/// </summary>
public string RegisterName { get; set; }
/// <summary>
/// Value that was written to the register.
/// </summary>
public object WrittenValue { get; set; }
/// <summary>
/// Indicates whether configuration was stored to the device.
/// </summary>
public bool StoreToDevice { get; set; }
/// <summary>
/// Indicates whether system state refresh was triggered.
/// </summary>
public bool RefreshSystemState { get; set; }
/// <summary>
/// Error message if operation failed.
/// </summary>
public string ErrorMessage { get; set; }
}
//Helper methods
/// <summary>
/// Ensures that the meter is connected and logged on.
/// </summary>
private void EnsureConnected()
{
if (_currentGenesis == null)
throw new InvalidOperationException("Genesis meter is not initialized. Call Connect first.");
if (!_currentGenesis.IsLoggedOn)
throw new InvalidOperationException("Genesis meter is not logged on. Call Connect first.");
}
/// <summary>
/// Finds register definition by name.
/// </summary>
private RegisterDefinition FindRegisterDefinition(string registerName)
{
if (string.IsNullOrWhiteSpace(registerName))
throw new ArgumentException("Register name cannot be null or empty.", nameof(registerName));
var match = _currentGenesis
.GetRegistersDic()
.Keys
.FirstOrDefault(r => string.Equals(r.GetIdent(), registerName, StringComparison.OrdinalIgnoreCase));
if (match == null)
throw new KeyNotFoundException($"Register '{registerName}' was not found.");
return match;
}
/// <summary>
/// Converts byte array to hex string.
/// </summary>
private string ToHex(byte[] data)
{
if (data == null || data.Length == 0)
return string.Empty;
return BitConverter.ToString(data).Replace("-", " ");
}
//Read register
/// <summary>
/// Reads register value by register name.
/// </summary>
public RegisterReadResult ReadRegister(string registerName)
{
try
{
EnsureConnected();
var register = FindRegisterDefinition(registerName);
var raw = _currentGenesis.ReadRegister(registerName);
object typedValue = null;
string typedValueText = null;
try
{
typedValue = ConvertRegisterValue(register, raw);
typedValueText = typedValue?.ToString();
}
catch
{
// Ignore conversion errors, raw value is still valid
}
return new RegisterReadResult
{
Success = true,
RegisterName = registerName,
RawBytes = raw,
RawHex = ToHex(raw),
TypedValue = typedValue,
TypedValueText = typedValueText,
DataType = register.DataType?.Name
};
}
catch (Exception ex)
{
Logger.Value.Error(ex, $"ReadRegister failed for '{registerName}'.");
return new RegisterReadResult
{
Success = false,
RegisterName = registerName,
ErrorMessage = ex.Message
};
}
}
//Typed conversion
/// <summary>
/// Converts raw register value to a typed value based on register definition.
/// </summary>
private object ConvertRegisterValue(RegisterDefinition register, byte[] raw)
{
var typeName = register.DataType?.Name;
switch (typeName)
{
case "Boolean":
return RegisterConverter.ByteArrayToValue<bool>(raw);
case "Byte":
return RegisterConverter.ByteArrayToValue<byte>(raw);
case "Int32":
return RegisterConverter.ByteArrayToValue<int>(raw);
case "UInt32":
return RegisterConverter.ByteArrayToValue<uint>(raw);
case "Double":
return RegisterConverter.ByteArrayToValue<double>(raw);
case "Single":
return RegisterConverter.ByteArrayToValue<float>(raw);
case "String":
return Encoding.ASCII.GetString(raw).TrimEnd('\0');
default:
return ToHex(raw);
}
}
//Generic login
/// <summary>
/// Reads register and converts it directly to specified type.
/// </summary>
public T ReadRegisterValue<T>(string registerName)
{
EnsureConnected();
var raw = _currentGenesis.ReadRegister(registerName);
return RegisterConverter.ByteArrayToValue<T>(raw);
}
//Write register
/// <summary>
/// Writes value to register.
/// </summary>
public RegisterWriteResult WriteRegister(
string registerName,
object value,
bool storeToDevice = false,
bool refreshSystemState = false)
{
try
{
EnsureConnected();
bool writeOk = _currentGenesis.WriteRegister(registerName, value);
if (!writeOk)
{
return new RegisterWriteResult
{
Success = false,
RegisterName = registerName,
WrittenValue = value,
ErrorMessage = "Write operation failed."
};
}
if (storeToDevice)
{
if (!_currentGenesis.StoreAllConfigurations())
{
return new RegisterWriteResult
{
Success = false,
RegisterName = registerName,
WrittenValue = value,
ErrorMessage = "StoreAllConfigurations failed."
};
}
}
if (refreshSystemState)
{
if (!_currentGenesis.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0xFF, true, false))
{
return new RegisterWriteResult
{
Success = false,
RegisterName = registerName,
WrittenValue = value,
ErrorMessage = "System state refresh failed."
};
}
}
return new RegisterWriteResult
{
Success = true,
RegisterName = registerName,
WrittenValue = value,
StoreToDevice = storeToDevice,
RefreshSystemState = refreshSystemState
};
}
catch (Exception ex)
{
Logger.Value.Error(ex, $"WriteRegister failed for '{registerName}'.");
return new RegisterWriteResult
{
Success = false,
RegisterName = registerName,
WrittenValue = value,
ErrorMessage = ex.Message
};
}
}
//Bulk operations
/// <summary>
/// Reads multiple registers.
/// </summary>
public List<RegisterReadResult> ReadRegisters(IEnumerable<string> registerNames)
{
var result = new List<RegisterReadResult>();
foreach (var name in registerNames)
{
result.Add(ReadRegister(name));
}
return result;
}
/// <summary>
/// Writes multiple registers.
/// </summary>
public List<RegisterWriteResult> WriteRegisters(
Dictionary<string, object> registerValues,
bool storeToDevice = false,
bool refreshSystemState = false)
{
var results = new List<RegisterWriteResult>();
int index = 0;
int total = registerValues.Count;
foreach (var pair in registerValues)
{
bool doStore = storeToDevice && index == total - 1;
bool doRefresh = refreshSystemState && index == total - 1;
results.Add(WriteRegister(pair.Key, pair.Value, doStore, doRefresh));
index++;
}
return results;
}
//Disconnect
/// <summary>
/// Disconnects from the meter and releases resources.
/// </summary>
public void Disconnect()
{
try
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
_currentGenesis.Logout();
}
}
catch (Exception ex)
{
Logger.Value.Error(ex, "Disconnect failed.");
}
finally
{
_meterBatch.RemoveAllMeters();
_currentGenesis?.DisposeMeter();
_currentGenesis = null;
_currentPcbId = string.Empty;
}
}
#endregion
}
}

View File

@ -1,12 +1,99 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GenesisCordonelInterface.API
{
internal class InterfaceOutsideToGCI
/// <summary>
/// Outside-facing facade for Genesis Cordonel Interface.
/// Exposes only selected operations intended for external callers.
/// </summary>
public class InterfaceOutsideToGCI
{
private readonly InterfaceGCIToLaatzen _innerMeterAPI;
/// <summary>
/// Initializes a new instance of the <see cref="InterfaceOutsideToGCI"/> class.
/// </summary>
public InterfaceOutsideToGCI()
{
_innerMeterAPI = new InterfaceGCIToLaatzen();
}
/// <summary>
/// Gets a value indicating whether the meter is currently connected and logged on.
/// </summary>
public bool IsConnected
{
get
{
return _innerMeterAPI.IsConnected;
}
}
/// <summary>
/// Connects to the meter on the specified slot.
/// </summary>
/// <param name="slotNo">Slot number.</param>
/// <param name="usePasswordsSource">Specifies whether offline passwords should be used.</param>
/// <returns>Connect operation result.</returns>
public InterfaceGCIToLaatzen.ConnectResult Connect(int slotNo, int usePasswordSource, List<string> externPasswords)
{
return _innerMeterAPI.Connect(slotNo, usePasswordSource, externPasswords);
}
/// <summary>
/// Disconnects from the currently connected meter.
/// </summary>
public void Disconnect()
{
_innerMeterAPI.Disconnect();
}
/// <summary>
/// Reads PCB ID from the specified slot.
/// </summary>
/// <param name="slot">Slot number.</param>
/// <returns>PCB ID string.</returns>
public string GetPcbId(int slot)
{
return _innerMeterAPI.GetPcbId(slot);
}
/// <summary>
/// Reads a register by name.
/// </summary>
/// <param name="registerName">Register name.</param>
/// <returns>Register read result.</returns>
public InterfaceGCIToLaatzen.RegisterReadResult ReadRegister(string registerName)
{
return _innerMeterAPI.ReadRegister(registerName);
}
/// <summary>
/// Writes a value to a register.
/// </summary>
/// <param name="registerName">Register name.</param>
/// <param name="value">Value to write.</param>
/// <param name="storeToDevice">Specifies whether configuration should be stored after write.</param>
/// <param name="refreshSystemState">Specifies whether system state refresh should be triggered after write.</param>
/// <returns>Register write result.</returns>
public InterfaceGCIToLaatzen.RegisterWriteResult WriteRegister(
string registerName,
object value,
bool storeToDevice = false,
bool refreshSystemState = false)
{
return _innerMeterAPI.WriteRegister(registerName, value, storeToDevice, refreshSystemState);
}
/// <summary>
/// Sets meter password.
/// </summary>
/// <param name="password">Password value.</param>
/// <returns>True if operation succeeded; otherwise false.</returns>
public bool SetMeterPassword(string password)
{
return _innerMeterAPI.SetMeterPassword(password);
}
}
}
}

View File

@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GenesisCordonelInterface.API
{
internal class InterfaceToApp
{
}
}

View File

@ -1,446 +0,0 @@
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.Applications.Const;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers.DataTypes;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
using Xylem.Common.Logic.SoftwareAccessHelper;
using Xylem.Common.Utils.Logging;
using Access = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Access;
using Register = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Register;
using System.Collections.Concurrent;
namespace GenesisCordonelInterface.API
{
/// <summary>
/// Provides a public API for Genesis meter operations.
///
/// This class exposes reusable functionality extracted from the original UI code
/// so it can be used from other projects within the solution.
///
/// The API is intended to gradually consolidate meter-related operations such as:
/// - port detection
/// - PCB ID reading
/// - communication setup
/// - requests and commands
/// - additional service actions
/// </summary>
/// <remarks>
/// This class should contain business logic only and should not depend on UI elements
/// such as forms, controls, MessageBox, or DataGridView.
///
/// UI-specific code should remain outside this class and call this API instead.
/// </remarks>
/// <example>
/// <code>
/// var api = new Api2();
///
/// var request = api.DetectRequestPort(3);
/// if (request.Success)
/// {
/// Console.WriteLine($"PCB ID: {request.PcbId}");
/// }
///
/// var streaming = api.DetectStreamingPort(3);
/// if (streaming.Success)
/// {
/// Console.WriteLine($"Streaming port: {streaming.PortName}");
/// }
/// </code>
/// </example>
internal class InterfaceToLaatzen
{
#region Declaration region
private static readonly Lazy<ILogger> Logger = new Lazy<ILogger>(() => NLogHelper.CreateOrGetLogger("GenesisCordonelInterface"));
public class regStore
{
public String PcbId;
public DateTimeOffset created;
public List<regDefValue> keyValues;
}
public class regDefValue
{
public RegisterDefinition def;
public String value;
}
private GenesisMeter _currentGenesis;
private MeterBatch _meterBatch = new MeterBatch();
private regStore _regsToStore;
private String _currentPcbId = "";
private Boolean IsBusy
{
get;
set;
}
#endregion
#region API - Port Detection region(extracted from FrmSetup:DgvConfig_CellContentClick)
public class PortDetectionResult
{
/// <summary>
/// Indicates whether the detection was successful.
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Slot number used for the detection.
/// </summary>
public int Slot { get; set; }
/// <summary>
/// Name of the detected communication port.
/// </summary>
public string PortName { get; set; }
/// <summary>
/// PCB ID read from the device (available for request detection).
/// </summary>
public string PcbId { get; set; }
/// <summary>
/// Error message describing why detection failed (if not successful).
/// </summary>
public string ErrorMessage { get; set; }
}
/// </summary>
/// <param name="slot">Slot number.</param>
/// <returns>
/// Result containing success status and detected port name.
/// </returns>
/// <example>
/// <code>
/// var api = new Api2();
/// var result = api.DetectStreamingPort(3);
///
/// if (result.Success)
/// {
/// Console.WriteLine($"Port: {result.PortName}");
/// }
/// else
/// {
/// Console.WriteLine("Streaming detection failed");
/// }
/// </code>
/// </example>
public PortDetectionResult DetectStreamingPort(int slot)
{
if (slot <= 0)
throw new ArgumentOutOfRangeException(nameof(slot));
using (var mb = new MeterBatch())
using (var meter = new GenesisMeter())
{
meter.SetupFromConfigFile(slot, false);
mb.AddMeter(meter);
var rawData = new ConcurrentBag<string>();
meter.StreamingPort.OnRawRecordReceived += (o, rawMsg) =>
{
var data = (string)rawMsg.GetData();
rawData.Add(data);
};
Thread.Sleep(500);
var success = rawData.Any();
var portName = meter.StreamingPort.GetPortName();
return new PortDetectionResult
{
Success = success,
Slot = slot,
PortName = portName,
ErrorMessage = success ? null : "No streaming data received."
};
}
}
/// <summary>
/// Detects the request port by attempting to read the PCB ID.
/// </summary>
/// <param name="slot">Slot number.</param>
/// <returns>
/// Result containing success status, port name, and PCB ID if successful.
/// </returns>
/// <example>
/// <code>
/// var api = new Api2();
/// var result = api.DetectRequestPort(3);
///
/// if (result.Success)
/// {
/// Console.WriteLine($"PCB ID: {result.PcbId}");
/// }
/// else
/// {
/// Console.WriteLine("Detection failed");
/// }
/// </code>
/// </example>
public PortDetectionResult DetectRequestPort(int slot)
{
if (slot <= 0)
throw new ArgumentOutOfRangeException(nameof(slot));
using (var mb = new MeterBatch())
using (var meter = new GenesisMeter())
{
meter.SetupFromConfigFile(slot, false);
mb.AddMeter(meter);
meter.Logout();
var pcbId = meter.GetPcbId();
var success = !string.IsNullOrEmpty(pcbId);
var portName = meter.RequestPort.GetPortName();
return new PortDetectionResult
{
Success = success,
Slot = slot,
PortName = portName,
PcbId = pcbId,
ErrorMessage = success ? null : "PCB ID was empty."
};
}
}
#endregion
#region API - PCB ID region
/// <summary>
/// Reads PCB ID for the specified slot.
/// </summary>
/// <param name="slot">Slot number.</param>
/// <returns>PCB ID read from the meter.</returns>
/// <example>
/// <code>
/// var api = new Api2();
/// string pcbId = api.GetPcbId(3);
/// Console.WriteLine(pcbId);
/// </code>
/// </example>
public string GetPcbId(int slot)
{
if (slot <= 0)
throw new ArgumentOutOfRangeException(nameof(slot), "Slot number must be greater than zero.");
using (var mb = new MeterBatch())
using (var meter = new GenesisMeter())
{
meter.SetupFromConfigFile(slot, false);
mb.AddMeter(meter);
meter.Logout();
return meter.GetPcbId();
}
}
#endregion
#region API - Connect
/// <summary>
/// Represents the result of a connect operation.
/// </summary>
public class ConnectResult
{
/// <summary>
/// Indicates whether the connect operation was successful.
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Slot number used for connect.
/// </summary>
public int Slot { get; set; }
/// <summary>
/// Connected PCB ID.
/// </summary>
public string PcbId { get; set; }
/// <summary>
/// Indicates whether the meter is logged on.
/// </summary>
public bool IsLoggedOn { get; set; }
/// <summary>
/// Firmware version reported by the meter.
/// </summary>
public string FwVersion { get; set; }
/// <summary>
/// Interface version from configuration.
/// </summary>
public string InterfaceVersion { get; set; }
/// <summary>
/// Indicates whether the loaded configuration supports the detected firmware version.
/// </summary>
public bool InterfaceSupportsFwVersion { get; set; }
/// <summary>
/// Registers available after successful connect.
/// </summary>
public List<RegisterSnapshot> Registers { get; set; } = new List<RegisterSnapshot>();
/// <summary>
/// Error message if connect failed.
/// </summary>
public string ErrorMessage { get; set; }
}
/// <summary>
/// Represents one register returned after connect.
/// </summary>
public class RegisterSnapshot
{
public string Name { get; set; }
public string Type { get; set; }
public string RawValue { get; set; }
public string Min { get; set; }
public string Max { get; set; }
public string Description { get; set; }
public string Version { get; set; }
public string IsAvailable { get; set; }
public string Privilege { get; set; }
}
/// <summary>
/// Connects to a Genesis meter for the specified slot.
/// </summary>
/// <param name="slotNo">Slot number.</param>
/// <param name="useOfflinePasswords">Specifies whether offline passwords should be used.</param>
/// <returns>
/// Connect operation result including PCB ID, firmware/configuration info, and register snapshots.
/// </returns>
/// <example>
/// <code>
/// var api = new GenesisAPI();
/// var result = api.Connect(3, true);
///
/// if (result.Success)
/// {
/// Console.WriteLine(result.PcbId);
/// Console.WriteLine(result.InterfaceVersion);
/// }
/// else
/// {
/// Console.WriteLine(result.ErrorMessage);
/// }
/// </code>
/// </example>
public ConnectResult Connect(int slotNo, bool useOfflinePasswords)
{
try
{
if (slotNo <= 0)
throw new ArgumentOutOfRangeException(nameof(slotNo), "Slot number must be greater than zero.");
_currentGenesis?.DisposeMeter();
_meterBatch.RemoveAllMeters();
_currentGenesis = null;
_currentGenesis = new GenesisMeter();
_currentGenesis.UseOfflinePasswords = useOfflinePasswords;
_currentGenesis.SetupFromConfigFile(slotNo);
_meterBatch.AddMeter(_currentGenesis);
_meterBatch.MetersLogin();
if (!_currentGenesis.IsLoggedOn && string.IsNullOrEmpty(_currentGenesis.PcbId))
{
return new ConnectResult
{
Success = false,
Slot = slotNo,
IsLoggedOn = false,
PcbId = _currentGenesis.PcbId,
ErrorMessage = "Cannot read out PcbId. Access to Cordonel denied."
};
}
var result = new ConnectResult
{
Success = _currentGenesis.IsLoggedOn,
Slot = slotNo,
PcbId = _currentGenesis.PcbId,
IsLoggedOn = _currentGenesis.IsLoggedOn,
FwVersion = _currentGenesis.FwVersion,
InterfaceVersion = _currentGenesis.InterfaceInfo?.InterfaceVersion,
InterfaceSupportsFwVersion = _currentGenesis.InterfaceSupportsFwVersion
};
foreach (var item in _currentGenesis.GetRegistersDic())
{
var from = item.Key.RegisterDetail.Version.First.HasValue
? item.Key.RegisterDetail.Version.First.Value.ToString()
: "-";
var to = item.Key.RegisterDetail.Version.Last.HasValue
? item.Key.RegisterDetail.Version.Last.Value.ToString()
: "-";
result.Registers.Add(new RegisterSnapshot
{
Name = item.Key.GetIdent(),
Type = item.Key.DataType.Name,
RawValue = BitConverter.ToString(item.Value).Replace("-", " "),
Min = item.Key.Minimum?.ToString(),
Max = item.Key.Maximum?.ToString(),
Description = item.Key.RegisterDetail.Description,
Version = $"from {from} to {to}",
IsAvailable = item.Key.IsAvailable.ToString(),
Privilege = item.Key.RegisterDetail.Privilege.Lvl8.ToString()
});
}
return result;
}
catch (Exception ex)
{
_meterBatch.RemoveAllMeters();
_currentGenesis?.DisposeMeter();
return new ConnectResult
{
Success = false,
Slot = slotNo,
ErrorMessage = ex.Message
};
}
}
#endregion
}
}

View File

@ -56,31 +56,33 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="API\InterfaceToApp.cs" />
<Compile Include="API\InterfaceToLaatzen.cs" />
<Compile Include="API\InterfaceOutsideToGCI.cs" />
<Compile Include="API\InterfaceGCIToLaatzen.cs" />
<Compile Include="Core\Logging\UiLogBus.cs" />
<Compile Include="Core\Logging\UiTarget.cs" />
<Compile Include="Core\Secondary.cs" />
<Compile Include="UI\FrmConfigurations.cs">
<Compile Include="UI\Laatzen_GenesisToolBox\FrmConfigurations.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmConfigurations.Designer.cs">
<Compile Include="UI\Laatzen_GenesisToolBox\FrmConfigurations.Designer.cs">
<DependentUpon>FrmConfigurations.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmCordonelPreadjustmentUI.cs" />
<Compile Include="UI\FrmCordonelPreadjustmentUI.Designer.cs">
<Compile Include="UI\Laatzen_CordonelPreadjustmentUI\FrmCordonelPreadjustmentUI.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Laatzen_CordonelPreadjustmentUI\FrmCordonelPreadjustmentUI.Designer.cs">
<DependentUpon>FrmCordonelPreadjustmentUI.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmRegisterStore.cs">
<Compile Include="UI\Laatzen_GenesisToolBox\FrmRegisterStore.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmRegisterStore.Designer.cs">
<Compile Include="UI\Laatzen_GenesisToolBox\FrmRegisterStore.Designer.cs">
<DependentUpon>FrmRegisterStore.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmSetup.cs">
<Compile Include="UI\Laatzen_GenesisToolBox\FrmSetup.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmSetup.Designer.cs">
<Compile Include="UI\Laatzen_GenesisToolBox\FrmSetup.Designer.cs">
<DependentUpon>FrmSetup.cs</DependentUpon>
</Compile>
<Compile Include="UI\MainForm.cs">
@ -91,6 +93,12 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\Laatzen_CordonelPreadjustmentUI\PreAdjustmentControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UI\Laatzen_CordonelPreadjustmentUI\PreAdjustmentControl.Designer.cs">
<DependentUpon>PreAdjustmentControl.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@ -101,7 +109,7 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="UI\FrmSetup.resx">
<EmbeddedResource Include="UI\Laatzen_GenesisToolBox\FrmSetup.resx">
<DependentUpon>FrmSetup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\MainForm.resx">
@ -111,6 +119,9 @@
<Content Include="nlog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="UI\Laatzen_CordonelPreadjustmentUI\PreAdjustmentControl.resx">
<DependentUpon>PreAdjustmentControl.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

@ -1,553 +0,0 @@
namespace Xylem.Common.Ui.GenesisToolBox
{
partial class FrmConfigurations
{
/// <summary>
/// <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.lblState = new System.Windows.Forms.Label();
this.btnConnect = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.cbComSlot = new System.Windows.Forms.ComboBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.cbPulseWiegth = new System.Windows.Forms.ComboBox();
this.panel1 = new System.Windows.Forms.Panel();
this.rbEvenDistOff = new System.Windows.Forms.RadioButton();
this.rbEvenDistOn = new System.Windows.Forms.RadioButton();
this.lblPrencesInMin = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.lblPulseWeightInternal = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.nudPulseResolution = new System.Windows.Forms.NumericUpDown();
this.cbxPulseMode = new System.Windows.Forms.ComboBox();
this.cbxPulseLength = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.nudAdapterPresence = new System.Windows.Forms.NumericUpDown();
this.rbTestModeOff = new System.Windows.Forms.RadioButton();
this.rbTestModeOn = new System.Windows.Forms.RadioButton();
this.lblPulsesequence = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnDisplayDefault = new System.Windows.Forms.Button();
this.btnWrite = new System.Windows.Forms.Button();
this.btnRead = new System.Windows.Forms.Button();
this.btnLogout = new System.Windows.Forms.Button();
this.lblPulseWeightMl = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.lblP2000PulseSetup = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPulseResolution)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudAdapterPresence)).BeginInit();
this.SuspendLayout();
//
// lblState
//
this.lblState.AutoSize = true;
this.lblState.Location = new System.Drawing.Point(12, 51);
this.lblState.Name = "lblState";
this.lblState.Size = new System.Drawing.Size(78, 13);
this.lblState.TabIndex = 9;
this.lblState.Text = "Not connected";
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(212, 8);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(85, 30);
this.btnConnect.TabIndex = 8;
this.btnConnect.Text = "Connect";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(25, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Slot";
//
// cbComSlot
//
this.cbComSlot.FormattingEnabled = true;
this.cbComSlot.Location = new System.Drawing.Point(83, 12);
this.cbComSlot.Name = "cbComSlot";
this.cbComSlot.Size = new System.Drawing.Size(104, 21);
this.cbComSlot.TabIndex = 6;
this.cbComSlot.Text = "1";
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Location = new System.Drawing.Point(6, 92);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(574, 324);
this.tabControl1.TabIndex = 11;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.lblP2000PulseSetup);
this.tabPage1.Controls.Add(this.label12);
this.tabPage1.Controls.Add(this.lblPulseWeightMl);
this.tabPage1.Controls.Add(this.cbPulseWiegth);
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Controls.Add(this.lblPrencesInMin);
this.tabPage1.Controls.Add(this.label13);
this.tabPage1.Controls.Add(this.label14);
this.tabPage1.Controls.Add(this.lblPulseWeightInternal);
this.tabPage1.Controls.Add(this.label11);
this.tabPage1.Controls.Add(this.label10);
this.tabPage1.Controls.Add(this.nudPulseResolution);
this.tabPage1.Controls.Add(this.cbxPulseMode);
this.tabPage1.Controls.Add(this.cbxPulseLength);
this.tabPage1.Controls.Add(this.label8);
this.tabPage1.Controls.Add(this.label9);
this.tabPage1.Controls.Add(this.nudAdapterPresence);
this.tabPage1.Controls.Add(this.rbTestModeOff);
this.tabPage1.Controls.Add(this.rbTestModeOn);
this.tabPage1.Controls.Add(this.lblPulsesequence);
this.tabPage1.Controls.Add(this.label7);
this.tabPage1.Controls.Add(this.label6);
this.tabPage1.Controls.Add(this.label5);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.label3);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.btnDisplayDefault);
this.tabPage1.Controls.Add(this.btnWrite);
this.tabPage1.Controls.Add(this.btnRead);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(566, 298);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Pluse";
this.tabPage1.UseVisualStyleBackColor = true;
this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click);
//
// cbPulseWiegth
//
this.cbPulseWiegth.FormattingEnabled = true;
this.cbPulseWiegth.Items.AddRange(new object[] {
" 1 l/Imp.",
"10 l/Imp.",
"100 l/Imp.",
"1.000 l/Imp.",
"1 Gallons/Imp.",
"10 Gallons/Imp.",
"100 Gallons/Imp.",
"1.000 Gallons/Imp.",
"1 Cub. Feet/Imp.",
"10 Cub. Feet/Imp.",
"100 Cub. Feet/Imp.",
"1.000 Cub. Feet/Imp.",
"1 Barrel/Imp.",
"10 Barrels/Imp.",
"100 Barrels/Imp.",
"1.000 Barrels/Imp.",
"ohne"});
this.cbPulseWiegth.Location = new System.Drawing.Point(237, 180);
this.cbPulseWiegth.Name = "cbPulseWiegth";
this.cbPulseWiegth.Size = new System.Drawing.Size(111, 21);
this.cbPulseWiegth.TabIndex = 37;
this.cbPulseWiegth.SelectedIndexChanged += new System.EventHandler(this.cbPulseWiegth_SelectedIndexChanged);
//
// panel1
//
this.panel1.Controls.Add(this.rbEvenDistOff);
this.panel1.Controls.Add(this.rbEvenDistOn);
this.panel1.Location = new System.Drawing.Point(237, 74);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(124, 21);
this.panel1.TabIndex = 36;
//
// rbEvenDistOff
//
this.rbEvenDistOff.AutoSize = true;
this.rbEvenDistOff.Location = new System.Drawing.Point(59, 3);
this.rbEvenDistOff.Name = "rbEvenDistOff";
this.rbEvenDistOff.Size = new System.Drawing.Size(39, 17);
this.rbEvenDistOff.TabIndex = 27;
this.rbEvenDistOff.TabStop = true;
this.rbEvenDistOff.Text = "Off";
this.rbEvenDistOff.UseVisualStyleBackColor = true;
//
// rbEvenDistOn
//
this.rbEvenDistOn.AutoSize = true;
this.rbEvenDistOn.Location = new System.Drawing.Point(3, 3);
this.rbEvenDistOn.Name = "rbEvenDistOn";
this.rbEvenDistOn.Size = new System.Drawing.Size(39, 17);
this.rbEvenDistOn.TabIndex = 26;
this.rbEvenDistOn.TabStop = true;
this.rbEvenDistOn.Text = "On";
this.rbEvenDistOn.UseVisualStyleBackColor = true;
//
// lblPrencesInMin
//
this.lblPrencesInMin.AutoSize = true;
this.lblPrencesInMin.Location = new System.Drawing.Point(401, 34);
this.lblPrencesInMin.Name = "lblPrencesInMin";
this.lblPrencesInMin.Size = new System.Drawing.Size(13, 13);
this.lblPrencesInMin.TabIndex = 35;
this.lblPrencesInMin.Text = "0";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(485, 34);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(54, 13);
this.label13.TabIndex = 34;
this.label13.Text = "in minutes";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(354, 34);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(41, 13);
this.label14.TabIndex = 33;
this.label14.Text = "internal";
//
// lblPulseWeightInternal
//
this.lblPulseWeightInternal.AutoSize = true;
this.lblPulseWeightInternal.Location = new System.Drawing.Point(467, 206);
this.lblPulseWeightInternal.Name = "lblPulseWeightInternal";
this.lblPulseWeightInternal.Size = new System.Drawing.Size(13, 13);
this.lblPulseWeightInternal.TabIndex = 32;
this.lblPulseWeightInternal.Text = "0";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(467, 183);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(72, 13);
this.label11.TabIndex = 31;
this.label11.Text = "in internal unit";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(354, 183);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(28, 13);
this.label10.TabIndex = 30;
this.label10.Text = "in ml";
//
// nudPulseResolution
//
this.nudPulseResolution.Location = new System.Drawing.Point(237, 152);
this.nudPulseResolution.Maximum = new decimal(new int[] {
7,
0,
0,
0});
this.nudPulseResolution.Name = "nudPulseResolution";
this.nudPulseResolution.Size = new System.Drawing.Size(111, 20);
this.nudPulseResolution.TabIndex = 28;
this.nudPulseResolution.Value = new decimal(new int[] {
7,
0,
0,
0});
//
// cbxPulseMode
//
this.cbxPulseMode.FormattingEnabled = true;
this.cbxPulseMode.Location = new System.Drawing.Point(237, 127);
this.cbxPulseMode.Name = "cbxPulseMode";
this.cbxPulseMode.Size = new System.Drawing.Size(111, 21);
this.cbxPulseMode.TabIndex = 27;
//
// cbxPulseLength
//
this.cbxPulseLength.FormattingEnabled = true;
this.cbxPulseLength.Location = new System.Drawing.Point(237, 103);
this.cbxPulseLength.Name = "cbxPulseLength";
this.cbxPulseLength.Size = new System.Drawing.Size(111, 21);
this.cbxPulseLength.TabIndex = 26;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(6, 178);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(169, 13);
this.label8.TabIndex = 23;
this.label8.Text = "METROLOGYASST_PulseWeight";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(6, 154);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(185, 13);
this.label9.TabIndex = 22;
this.label9.Text = "METROLOGYASST_PulseResolution";
//
// nudAdapterPresence
//
this.nudAdapterPresence.Location = new System.Drawing.Point(237, 27);
this.nudAdapterPresence.Name = "nudAdapterPresence";
this.nudAdapterPresence.Size = new System.Drawing.Size(111, 20);
this.nudAdapterPresence.TabIndex = 21;
this.nudAdapterPresence.ValueChanged += new System.EventHandler(this.nudAdapterPresence_ValueChanged);
//
// rbTestModeOff
//
this.rbTestModeOff.AutoSize = true;
this.rbTestModeOff.Location = new System.Drawing.Point(293, 8);
this.rbTestModeOff.Name = "rbTestModeOff";
this.rbTestModeOff.Size = new System.Drawing.Size(39, 17);
this.rbTestModeOff.TabIndex = 18;
this.rbTestModeOff.TabStop = true;
this.rbTestModeOff.Text = "Off";
this.rbTestModeOff.UseVisualStyleBackColor = true;
//
// rbTestModeOn
//
this.rbTestModeOn.AutoSize = true;
this.rbTestModeOn.Location = new System.Drawing.Point(237, 8);
this.rbTestModeOn.Name = "rbTestModeOn";
this.rbTestModeOn.Size = new System.Drawing.Size(39, 17);
this.rbTestModeOn.TabIndex = 17;
this.rbTestModeOn.TabStop = true;
this.rbTestModeOn.Text = "On";
this.rbTestModeOn.UseVisualStyleBackColor = true;
//
// lblPulsesequence
//
this.lblPulsesequence.AutoSize = true;
this.lblPulsesequence.Location = new System.Drawing.Point(234, 58);
this.lblPulsesequence.Name = "lblPulsesequence";
this.lblPulsesequence.Size = new System.Drawing.Size(13, 13);
this.lblPulsesequence.TabIndex = 16;
this.lblPulsesequence.Text = "0";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(5, 10);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(55, 13);
this.label7.TabIndex = 15;
this.label7.Text = "TestMode";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(6, 130);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(162, 13);
this.label6.TabIndex = 14;
this.label6.Text = "METROLOGYASST_PulseMode";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(6, 106);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(168, 13);
this.label5.TabIndex = 13;
this.label5.Text = "METROLOGYASST_PulseLength";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 82);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(212, 13);
this.label4.TabIndex = 12;
this.label4.Text = "METROLOGYASST_PulseEvenDistribution";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 58);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(114, 13);
this.label3.TabIndex = 11;
this.label3.Text = "IRDA_PulseSequence";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(5, 34);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(142, 13);
this.label2.TabIndex = 10;
this.label2.Text = "IRDA_AdapterPresenceLimit";
//
// btnDisplayDefault
//
this.btnDisplayDefault.Location = new System.Drawing.Point(282, 239);
this.btnDisplayDefault.Name = "btnDisplayDefault";
this.btnDisplayDefault.Size = new System.Drawing.Size(113, 53);
this.btnDisplayDefault.TabIndex = 8;
this.btnDisplayDefault.Text = "Set DisplayDefault";
this.btnDisplayDefault.UseVisualStyleBackColor = true;
this.btnDisplayDefault.Click += new System.EventHandler(this.btnDisplayDefault_Click);
//
// btnWrite
//
this.btnWrite.Location = new System.Drawing.Point(147, 239);
this.btnWrite.Name = "btnWrite";
this.btnWrite.Size = new System.Drawing.Size(129, 53);
this.btnWrite.TabIndex = 1;
this.btnWrite.Text = "Write";
this.btnWrite.UseVisualStyleBackColor = true;
this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
//
// btnRead
//
this.btnRead.Location = new System.Drawing.Point(3, 239);
this.btnRead.Name = "btnRead";
this.btnRead.Size = new System.Drawing.Size(129, 53);
this.btnRead.TabIndex = 0;
this.btnRead.Text = "Read";
this.btnRead.UseVisualStyleBackColor = true;
this.btnRead.Click += new System.EventHandler(this.btnRead_Click);
//
// btnLogout
//
this.btnLogout.Location = new System.Drawing.Point(303, 8);
this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(85, 30);
this.btnLogout.TabIndex = 12;
this.btnLogout.Text = "Logout";
this.btnLogout.UseVisualStyleBackColor = true;
this.btnLogout.Click += new System.EventHandler(this.btnLogout_Click);
//
// lblPulseWeightMl
//
this.lblPulseWeightMl.AutoSize = true;
this.lblPulseWeightMl.Location = new System.Drawing.Point(354, 206);
this.lblPulseWeightMl.Name = "lblPulseWeightMl";
this.lblPulseWeightMl.Size = new System.Drawing.Size(13, 13);
this.lblPulseWeightMl.TabIndex = 38;
this.lblPulseWeightMl.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(466, 223);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(94, 13);
this.label12.TabIndex = 39;
this.label12.Text = "p2000 PulseSetup";
//
// lblP2000PulseSetup
//
this.lblP2000PulseSetup.AutoSize = true;
this.lblP2000PulseSetup.Location = new System.Drawing.Point(467, 249);
this.lblP2000PulseSetup.Name = "lblP2000PulseSetup";
this.lblP2000PulseSetup.Size = new System.Drawing.Size(13, 13);
this.lblP2000PulseSetup.TabIndex = 40;
this.lblP2000PulseSetup.Text = "0";
//
// FrmConfigurations
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(587, 450);
this.Controls.Add(this.btnLogout);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.lblState);
this.Controls.Add(this.btnConnect);
this.Controls.Add(this.label1);
this.Controls.Add(this.cbComSlot);
this.Name = "FrmConfigurations";
this.Text = "FrmConfigurations";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmConfigurations_FormClosing);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPulseResolution)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudAdapterPresence)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblState;
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cbComSlot;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnWrite;
private System.Windows.Forms.Button btnRead;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnDisplayDefault;
private System.Windows.Forms.Label lblPulsesequence;
private System.Windows.Forms.RadioButton rbTestModeOff;
private System.Windows.Forms.RadioButton rbTestModeOn;
private System.Windows.Forms.NumericUpDown nudAdapterPresence;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.NumericUpDown nudPulseResolution;
private System.Windows.Forms.ComboBox cbxPulseMode;
private System.Windows.Forms.ComboBox cbxPulseLength;
private System.Windows.Forms.Label lblPulseWeightInternal;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label lblPrencesInMin;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.RadioButton rbEvenDistOff;
private System.Windows.Forms.RadioButton rbEvenDistOn;
private System.Windows.Forms.ComboBox cbPulseWiegth;
private System.Windows.Forms.Label lblPulseWeightMl;
private System.Windows.Forms.Label lblP2000PulseSetup;
private System.Windows.Forms.Label label12;
}
}

View File

@ -1,405 +0,0 @@
using GenesisCordonelInterface.API;
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Utils.Logging;
namespace Xylem.Common.Ui.GenesisToolBox
{
public enum METROLOGYASST_PulseMode
{
OFF = 0, /* No pulse output */
FOR_REV_AB, /* Forward/reverse on A/B */
FOR_REV_BA, /* Forward/reverse on B/A */
PUL_DIR_AB, /* Pulse/direction on A/B */
PUL_DIR_BA, /* Pulse/direction on B/A */
PUL_BAL_A, /* Balanced pulse on A? */
PUL_BAL_B, /* Balanced pulse on B? */
TEST_PUL_DIR_AB, /* Test mode, pulse/direction on A/B */
};
public enum METROLOGYASST_PulseLength
{
L_1MS_NotSupported = 0, /* 1ms pulse <- not supported */
L_2MS_NotSupported, /* 2ms pulse <- not supported */
L_5MS, /* 5ms pulse */
L_10MS, /* 10ms pulse */
L_20MS, /* 20ms pulse */
L_50MS, /* 50ms pulse */
L_100MS_NotSupported, /* 100ms pulse <- not supported */
L_200MS, /* 200ms pulse */
L_500MS, /* 500ms pulse */
L_DYNAMIC, /* Dynamic pulse width */
L_1_5MS, /* 1.5ms pulse */
};
public partial class FrmConfigurations : Form
{
private static readonly NLog.ILogger Logger = NLog.LogManager.GetLogger("GenesisCordonelInterface");
private readonly InterfaceToLaatzen interfaceToLaatzen = new InterfaceToLaatzen();
private GenesisMeter _currentGenesis;
private String _currentPcbId;
private MeterBatch _meterBatch = new MeterBatch();
public FrmConfigurations()
{
InitializeComponent();
cbxPulseLength.DataSource = Enum.GetValues(typeof(METROLOGYASST_PulseLength));
cbxPulseMode.DataSource = Enum.GetValues(typeof(METROLOGYASST_PulseMode));
_meterBatch = new MeterBatch();
var configfile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Xylem.Common.Hardware.WaterMeter.Genesis), ProgramConfig.SerialConfigFileName);
if (!File.Exists(configfile))
{
throw new ApplicationException($"Configuration file {configfile} not found ");
}
var tr = new StreamReader(configfile);
var meterConfigList = JsonConvert.DeserializeObject<SlotConfig[]>(tr.ReadToEnd());
cbComSlot.Items.Clear();
var listSlots = new List<Int32>();
foreach (var item in meterConfigList)
{
cbComSlot.Items.Add(item.Slot);
listSlots.Add(item.Slot);
}
if (cbComSlot.Items.Count >= 1)
{
cbComSlot.SelectedItem = cbComSlot.Items[0];
}
//foreach (var info in typeof(Register).GetNestedTypes())
//{
// cbPreselection.Items.Add(info.Name);
//}
}
private void btnLogout_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
_currentGenesis.Logout();
}
_currentPcbId = "";
}
private void btnConnect_Click(Object sender, EventArgs e)
{
if (cbComSlot.SelectedItem != null) // && cbComSlot.SelectedValue is ListBoxItem)
{
Int32 slotNR = 0;
if (!string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) &&
int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNR))
{
conntect(slotNR);
}
}
}
private void btnRead_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
Boolean TriggerTest = false;
Boolean PulseEvenDistributio = false;
Byte AdapterPresenceLimit;
Byte PulseSequence;
Int32 PulseLength;
Int32 PulseMode;
Byte PulseResolution = 0;
UInt32 PulseWeight;
TriggerTest = RegisterConverter.ByteArrayToValue<Boolean>(_currentGenesis.ReadRegister("GENESISFLOW_TriggerTest"));
try
{
PulseEvenDistributio = RegisterConverter.ByteArrayToValue<Boolean>(_currentGenesis.ReadRegister("METROLOGYASST_PulseEvenDistribution"));
PulseResolution = RegisterConverter.ByteArrayToValue<Byte>(_currentGenesis.ReadRegister("METROLOGYASST_PulseResolution"));
}
catch (Exception)
{
}
AdapterPresenceLimit = RegisterConverter.ByteArrayToValue<Byte>(_currentGenesis.ReadRegister("IRDA_AdapterPresenceLimit"));
PulseSequence = RegisterConverter.ByteArrayToValue<Byte>(_currentGenesis.ReadRegister("IRDA_PulseSequence"));
PulseLength = RegisterConverter.ByteArrayToValue<Int32>(_currentGenesis.ReadRegister("METROLOGYASST_PulseLength"));
PulseMode = RegisterConverter.ByteArrayToValue<Int32>(_currentGenesis.ReadRegister("METROLOGYASST_PulseMode"));
PulseWeight = RegisterConverter.ByteArrayToValue<UInt32>(_currentGenesis.ReadRegister("METROLOGYASST_PulseWeight"));
rbTestModeOn.Checked = false;
rbTestModeOff.Checked = true;
if (TriggerTest)
{
rbTestModeOff.Checked = false;
rbTestModeOn.Checked = true;
}
rbEvenDistOn.Checked = false;
rbEvenDistOff.Checked = true;
if (PulseEvenDistributio)
{
rbEvenDistOff.Checked = false;
rbEvenDistOn.Checked = true;
}
nudAdapterPresence.Value = AdapterPresenceLimit;
lblPulsesequence.Text = PulseSequence.ToString();
cbxPulseLength.SelectedItem = ((METROLOGYASST_PulseLength)PulseLength);
cbxPulseMode.SelectedItem = ((METROLOGYASST_PulseMode)PulseMode);
nudPulseResolution.Value = PulseResolution;
lblPulseWeightMl.Text = (PulseWeight * (Decimal)0.03125).ToString();
lblPulseWeightInternal.Text = PulseWeight.ToString();
cbPulseWiegth.SelectedText = getText(PulseWeight);
}
}
private void btnWrite_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
Boolean TriggerTest = rbTestModeOn.Checked;
Boolean PulseEvenDistributio = rbEvenDistOn.Checked;
Byte AdapterPresenceLimit = (Byte)nudAdapterPresence.Value;
Int32 PulseLength = ((METROLOGYASST_PulseLength)cbxPulseLength.SelectedItem).GetHashCode();
Int32 PulseMode = ((METROLOGYASST_PulseMode)cbxPulseMode.SelectedItem).GetHashCode();
Byte PulseResolution = (Byte)nudPulseResolution.Value;
UInt32 PulseWeight = getValue(cbPulseWiegth.SelectedText);
actionResult = null;
try
{
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_PulseEvenDistribution", PulseEvenDistributio));
// setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_PulseResolution", PulseResolution));
}
catch (Exception)
{
}
if (TriggerTest)
{
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_TriggerTest", 1));
}
else
{
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_TriggerActive", 1));
}
setActionResult(_currentGenesis.WriteRegister("IRDA_AdapterPresenceLimit", AdapterPresenceLimit));
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_PulseLength", PulseLength));
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_PulseMode", PulseMode));
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_PulseWeight", PulseWeight));
setActionResult(_currentGenesis.StoreAllConfigurations());
setActionResult(_currentGenesis.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0xFF, true, false));
}
}
private void tabPage1_Click(Object sender, EventArgs e)
{
}
private void conntect(Int32 slotNR)
{
try
{
_meterBatch.RemoveAllMeters();
_currentGenesis = new GenesisMeter();
//_currentGenesis.IsDevelopmentUsage = true; //Make sure to set this before login
try
{
_currentGenesis.SetupFromConfigFile(slotNR);
_currentGenesis.EnableAutoLogon();
_meterBatch.AddMeter(_currentGenesis);
}
catch (Exception ex)
{
Logger.Error(ex, $"Slot #{slotNR} failed: {ex.Message}");
}
_currentGenesis.Login();
_currentPcbId = _currentGenesis.PcbId;
}
catch (Exception ex)
{
Logger.Error(ex, ex.Message);
}
}
private void nudAdapterPresence_ValueChanged(Object sender, EventArgs e)
{
lblPrencesInMin.Text = (nudAdapterPresence.Value * 15).ToString();
}
private void nudPulseWeight_ValueChanged(Object sender, EventArgs e)
{
}
private void btnDisplayDefault_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
actionResult = null;
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_SealDisplay", 0));
setActionResult(_currentGenesis.WriteRegister("CUSTOMER_Locale", 0));
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_DisplayPow10", 253));
setActionResult(_currentGenesis.WriteRegister("GENESISFLOW_DisplayUnits", 0));
setActionResult(_currentGenesis.WriteRegister("METROLOGYASST_FlowUnits", 1));
setActionResult(_currentGenesis.StoreAllConfigurations());
setActionResult(_currentGenesis.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0xFF, true, false));
}
}
private void setActionResult(Boolean v)
{
if (!actionResult.HasValue)
{
actionResult = v;
}
if (!v)
{
actionResult = false;
}
}
private Boolean? actionResult = null;
private void FrmConfigurations_FormClosing(Object sender, FormClosingEventArgs e)
{
_meterBatch.Dispose();
}
private void cbPulseWiegth_SelectedIndexChanged(Object sender, EventArgs e)
{
var PInternal = getValue(cbPulseWiegth.SelectedItem.ToString().Trim());
lblPulseWeightMl.Text = (PInternal * (Decimal)0.03125).ToString();
lblPulseWeightInternal.Text = (PInternal).ToString();
var PulseFQm3 = (PInternal * (Decimal)0.03125);
lblP2000PulseSetup.Text = (1000000 / PulseFQm3).ToString();
}
private String getText(UInt32 v)
{
String intHelper = "NA";
switch (v)
{
case 0x00007D00: intHelper = "1 l/Imp."; break;
case 0x0004E200: intHelper = "10 l/Imp."; break;
case 0x0030D400: intHelper = "100 l/Imp."; break;
case 0x01E84800: intHelper = "1.000 l/Imp."; break;
case 0x0001D92D: intHelper = "1 Gallons/Imp."; break;
case 0x00127BC3: intHelper = "10 Gallons/Imp."; break;
case 0x00B8D5A0: intHelper = "100 Gallons/Imp."; break;
case 0x07382500: intHelper = "1.000 Gallons/Imp."; break;
case 0x000DD399: intHelper = "1 Cub. Feet/Imp."; break;
case 0x008A4400: intHelper = "10 Cub. Feet/Imp."; break;
case 0x0566D000: intHelper = "100 Cub. Feet/Imp."; break;
case 0x36042000: intHelper = "1.000 Cub. Feet/Imp."; break;
case 0x004DA169: intHelper = "1 Barrel/Imp."; break;
case 0x03084E1E: intHelper = "10 Barrels/Imp."; break;
case 0x1E530D2F: intHelper = "100 Barrels/Imp."; break;
case 0xFFF0279D: intHelper = "1.000 Barrels/Imp."; break;
case 0x00000000: intHelper = "ohne"; break;
default: intHelper = "ohne"; break;
}
return intHelper;
}
private UInt32 getValue(String v)
{
UInt32 intHelper = 0;
switch (v.Replace(" ", ""))
{
case "1l/Imp.": intHelper = 0x00007D00; break;
case "10l/Imp.": intHelper = 0x0004E200; break;
case "100l/Imp.": intHelper = 0x0030D400; break;
case "1.000l/Imp.": intHelper = 0x01E84800; break;
case "1Gallons/Imp.": intHelper = 0x0001D92D; break;
case "10Gallons/Imp.": intHelper = 0x00127BC3; break;
case "100Gallons/Imp.": intHelper = 0x00B8D5A0; break;
case "1.000Gallons/Imp.": intHelper = 0x07382500; break;
case "1Cub.Feet/Imp.": intHelper = 0x000DD399; break;
case "10Cub.Feet/Imp.": intHelper = 0x008A4400; break;
case "100Cub.Feet/Imp.": intHelper = 0x0566D000; break;
case "1.000Cub.Feet/Imp.": intHelper = 0x36042000; break;
case "1Barrel/Imp.": intHelper = 0x004DA169; break;
case "10Barrels/Imp.": intHelper = 0x03084E1E; break;
case "100Barrels/Imp.": intHelper = 0x1E530D2F; break;
case "1.000Barrels/Imp.": intHelper = 0xFFF0279D; break;
case "ohne": intHelper = 0; break;
default: intHelper = 0; break;
}
return intHelper;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,274 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Ui.CordonelPreadjustmentUi;
namespace GenesisCordonelInterface.UI
{
/*public partial class FrmCordonelPreadjustmentUI : Form
{
private PreAdjustmentControl preadjustCtl;
private PreAdjustmentSettingsContainer mainSettings = new PreAdjustmentSettingsContainer();
public FrmCordonelPreadjustmentUI()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
preadjustCtl = new PreAdjustmentControl(mainSettings);
tab_ZeroFlowCal.Controls.Add(preadjustCtl);
cB_SinglePath.Checked = mainSettings.NumberOfPaths == 1 ? true : false;
nUD_SettingsTempMonitorLowerValue.Value = (decimal)mainSettings.LowerTempLimit;
nUD_SettingsTempMonitorUpperValue.Value = (decimal)mainSettings.UpperTempLimit;
nUD_SettingsTempMonitorDeviation.Value = (decimal)mainSettings.TempDeviationLimit;
// nUD_SettingsPreparationMetersize.Value = mainSettings.MeterSize.GetHashCode();
cB_OffsetTestLogFiles.Checked = mainSettings.OffsetTestGenerateLogfiles;
nUD_Settings_ZeroflowOffsetTestActivityCheckInterval.Value = mainSettings.OffsetTestActivityCheckInverval;
nUD_Settings_ZeroflowOffsetTestNumberOfLines.Value = mainSettings.OffsetTestNumberOfLines;
nUD_Settings_ZeroflowOffsetTestSettlingTime.Value = mainSettings.OffsetTestSettlingTime;
nUD_Settings_ZeroflowOffsetTestOffsetLimit.Value = mainSettings.OffsetTestOffsetLimitPS;
nUD_Settings_ZeroflowOffsetTestLowerLimit.Value = mainSettings.OffsetTestLowerVoltageLimitMV;
nUD_Settings_ZeroflowOffsetTestUpperLimit.Value = mainSettings.OffsetTestUpperVoltageLimitMV;
cB_AmpLogFiles.Checked = mainSettings.AmpTestGenerateLogfiles;
nUD_Settings_AmplitudeActivityCheckInterval.Value = mainSettings.AmpTestActivityCheckInverval;
cB_MeanAmplitudeFiles.Checked = mainSettings.AmpTestGenerateMeanValuesFile;
nUD_PercentageStop.Value = mainSettings.AmpTestPercentageStop;
nUD_PercentageStart.Value = mainSettings.AmpTestPercentageStart;
nUD_Settings_AmplitudeTestMinDistance.Value = mainSettings.AmpTestAmpTestDistance;
nUD_Settings_AmplitudeTestLowerLimit.Value = mainSettings.AmpTestFirstHitLevelPropMin;
nUD_Settings_AmplitudeTestUpperLimit.Value = mainSettings.AmpTestFirstHitLevelPropMax;
nUD_Settings_Samplerate.Value = mainSettings.Samplerate;
}
private void tab_Maintab_Selected(object sender, TabControlEventArgs e)
{
if (e.TabPage.Name == tab_ZeroFlowCal.Name)
{
try
{
var _serialConfigFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Genesis", ProgramConfig.SerialConfigFileName);
SlotConfig[] meterConfigList;
using (var tr = new StreamReader(_serialConfigFile))
{
var _fileString = tr.ReadToEnd();
meterConfigList = JsonConvert.DeserializeObject<SlotConfig[]>(_fileString);
}
mainSettings.Meters = new List<int>();
mainSettings.TempMeters = new List<int>();
foreach (var item in meterConfigList)
{
if (item.Type != SlotType.TemperatureMeter)
{
mainSettings.Meters.Add(item.Slot);
}
else
{
mainSettings.TempMeters.Add(item.Slot);
}
}
}
catch (Exception ex)
{
MessageBox.Show($"use default meters because of {ex.Message}");
}
mainSettings.NumberOfPaths = cB_SinglePath.Checked ? 1 : 3;
mainSettings.LowerTempLimit = (double)nUD_SettingsTempMonitorLowerValue.Value;
mainSettings.UpperTempLimit = (double)nUD_SettingsTempMonitorUpperValue.Value;
mainSettings.TempDeviationLimit = (double)nUD_SettingsTempMonitorDeviation.Value;
//mainSettings.MeterSize = (Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.Consts.MeterSize)nUD_SettingsPreparationMetersize.Value;
mainSettings.TempOnly = cB_TempOnly.Checked;
mainSettings.SetTempUseTempFlansh(true);
if (cB_TempManualAcquisition.Checked)
{
mainSettings.SetTempUseManualInput(true);
mainSettings.SetTempUseTempFlansh(false);
}
else
{
mainSettings.SetTempUseTempFlansh(true);
mainSettings.SetTempUseManualInput(false);
}
mainSettings.OffsetTestGenerateLogfiles = cB_OffsetTestLogFiles.Checked;
mainSettings.OffsetTestActivityCheckInverval = (int)nUD_Settings_ZeroflowOffsetTestActivityCheckInterval.Value;
mainSettings.OffsetTestNumberOfLines = (int)nUD_Settings_ZeroflowOffsetTestNumberOfLines.Value;
mainSettings.OffsetTestSettlingTime = (int)nUD_Settings_ZeroflowOffsetTestSettlingTime.Value;
mainSettings.OffsetTestOffsetLimitPS = (int)nUD_Settings_ZeroflowOffsetTestOffsetLimit.Value;
mainSettings.OffsetTestLowerVoltageLimitMV = (int)nUD_Settings_ZeroflowOffsetTestLowerLimit.Value;
mainSettings.OffsetTestUpperVoltageLimitMV = (int)nUD_Settings_ZeroflowOffsetTestUpperLimit.Value;
mainSettings.AmpTestGenerateLogfiles = cB_AmpLogFiles.Checked;
mainSettings.AmpTestActivityCheckInverval = (int)nUD_Settings_AmplitudeActivityCheckInterval.Value;
mainSettings.AmpTestGenerateMeanValuesFile = cB_MeanAmplitudeFiles.Checked;
mainSettings.AmpTestPercentageStop = (int)nUD_PercentageStop.Value;
mainSettings.AmpTestPercentageStart = (int)nUD_PercentageStart.Value;
mainSettings.AmpTestAmpTestDistance = (int)nUD_Settings_AmplitudeTestMinDistance.Value;
mainSettings.AmpTestFirstHitLevelPropMin = (int)nUD_Settings_AmplitudeTestLowerLimit.Value;
mainSettings.AmpTestFirstHitLevelPropMax = (int)nUD_Settings_AmplitudeTestUpperLimit.Value;
mainSettings.Samplerate = (int)nUD_Settings_Samplerate.Value;
preadjustCtl.SetSettings(mainSettings);
}
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (preadjustCtl != null)
{
preadjustCtl.CloseConnections();
preadjustCtl.Dispose();
}
if (ThermoMeterBatch != null)
{
ThermoMeterBatch.Dispose();
}
if (TempMeterStateCtls != null)
{
foreach (var item in TempMeterStateCtls)
{
item.Dispose();
}
}
}
private MeterBatch ThermoMeterBatch = new MeterBatch();
private List<MeterStateControl> TempMeterStateCtls = new List<MeterStateControl>();
private void tmpStart(int slot, bool RaspiMode = false)
{
var ctlZehn = new TempMeterStateControl(slot);
ctlZehn.Location = new Point(5 + ((TempMeterStateCtls.Count + 1) * ctlZehn.Width), 15);
TempMeterStateCtls.Add(ctlZehn);
gB_TempMeters.Controls.Add(ctlZehn);
ctlZehn.Enabled = true;
var currentMeter = new ZeroFlowGenesisMeter(ctlZehn.Slot, 3, !RaspiMode);
currentMeter.LogOnEnable = true;
currentMeter.LoginFailed = false;
currentMeter.PreparationFailed = false;
currentMeter.AmplitudeFailed = false;
currentMeter.ZeroFlowOffsetFailed = false;
currentMeter.AmplitudeFailed = false;
currentMeter.CompletionFailed = false;
currentMeter.Ok = false;
currentMeter.EmptyPipeCheckEnable = false;
currentMeter.EmptyPipeCheckFailed = false;
ThermoMeterBatch.AddMeter(currentMeter);
ctlZehn.IsEnabled = true;
ctlZehn.Meter = currentMeter;
ctlZehn.EnableOpening = true;
ctlZehn.Ok = ctlZehn.Meter.CheckStreamingPort();
ctlZehn.SetUi();
ctlZehn.Meter.StartRecordData();
ctlZehn.Meter.LogRawData(true);
if (RaspiMode)
{
ctlZehn.StartTempWatch(MeterStateControl.TempMode.CalcTof);
}
else
{
ctlZehn.StartTempWatch(MeterStateControl.TempMode.Meter);
}
ctlZehn.SetTemperature(0);
ctlZehn.DisableTemperatureinput(true);
ctlZehn.IsEnabled = true;
}
private void btn_LoadTempe_Click(object sender, EventArgs e)
{
tmpStart((int)nudTempSlot.Value, false);
}
private void btnTempRaspi_Click(object sender, EventArgs e)
{
tmpStart((int)nudTempSlot.Value, true);
}
private void button1_Click(object sender, EventArgs e)
{
if (TempMeterStateCtls != null)
{
StringBuilder sb = new StringBuilder();
foreach (var item in TempMeterStateCtls)
{
sb.AppendLine();
sb.AppendLine($"##########Meter{item.Slot}#############");
sb.Append(item.GetLog());
sb.AppendLine();
}
richTextBox1.Text = sb.ToString();
richTextBox1.ScrollToCaret();
}
}
private void tab_ZeroFlowCal_Click(object sender, EventArgs e)
{
}
}*/
}

View File

@ -1,410 +0,0 @@
namespace GenesisCordonelInterface.UI
{
partial class FrmRegisterStore
{
/// <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();
this.cbComSlot = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.btnReadRegister = new System.Windows.Forms.Button();
this.registerGridView = new System.Windows.Forms.DataGridView();
this.btnConnect = new System.Windows.Forms.Button();
this.lblState = new System.Windows.Forms.Label();
this.timProgress = new System.Windows.Forms.Timer(this.components);
this.btnGetPCbID = new System.Windows.Forms.Button();
this.pnlBussy = new System.Windows.Forms.Panel();
this.lblProgress = new System.Windows.Forms.Label();
this.lblAction = new System.Windows.Forms.Label();
this.probarBusy = new System.Windows.Forms.ProgressBar();
this.label3 = new System.Windows.Forms.Label();
this.btnReadFwVersions = new System.Windows.Forms.Button();
this.btnCalibrationRestore = new System.Windows.Forms.Button();
this.btnBatteryIdle = new System.Windows.Forms.Button();
this.btnSetDefaultPulse = new System.Windows.Forms.Button();
this.btnStoreAll = new System.Windows.Forms.Button();
this.btnRegisterToFile = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btnBatLife = new System.Windows.Forms.Button();
this.btnRadioPressure = new System.Windows.Forms.Button();
this.nundCalResultID = new System.Windows.Forms.NumericUpDown();
this.lblGtbVersion = new System.Windows.Forms.Label();
this.lblConfigVersion = new System.Windows.Forms.Label();
this.btnFileToRegister = new System.Windows.Forms.Button();
this.cbxUseOfflinePwds = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.registerGridView)).BeginInit();
this.pnlBussy.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nundCalResultID)).BeginInit();
this.SuspendLayout();
//
// cbComSlot
//
this.cbComSlot.FormattingEnabled = true;
this.cbComSlot.Location = new System.Drawing.Point(44, 91);
this.cbComSlot.Name = "cbComSlot";
this.cbComSlot.Size = new System.Drawing.Size(58, 21);
this.cbComSlot.TabIndex = 0;
this.cbComSlot.Text = "1";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 94);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(28, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Slot:";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// btnRead
//
this.btnReadRegister.Location = new System.Drawing.Point(251, 123);
this.btnReadRegister.Name = "btnReadRegister";
this.btnReadRegister.Size = new System.Drawing.Size(110, 30);
this.btnReadRegister.TabIndex = 2;
this.btnReadRegister.Text = "Read Meter";
this.btnReadRegister.UseVisualStyleBackColor = true;
this.btnReadRegister.Click += new System.EventHandler(this.btnRead_Click);
//
// registerGridView
//
this.registerGridView.AllowUserToAddRows = false;
this.registerGridView.AllowUserToDeleteRows = false;
this.registerGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.registerGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.registerGridView.Location = new System.Drawing.Point(8, 171);
this.registerGridView.Name = "registerGridView";
this.registerGridView.Size = new System.Drawing.Size(778, 370);
this.registerGridView.TabIndex = 3;
this.registerGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.registerGridView_CellClick);
this.registerGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.registerGridView_CellEndEdit);
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(125, 87);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(110, 30);
this.btnConnect.TabIndex = 4;
this.btnConnect.Text = "Connect";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
// lblState
//
this.lblState.AutoSize = true;
this.lblState.Location = new System.Drawing.Point(12, 132);
this.lblState.Name = "lblState";
this.lblState.Size = new System.Drawing.Size(78, 13);
this.lblState.TabIndex = 5;
this.lblState.Text = "Not connected";
this.lblState.Click += new System.EventHandler(this.lblState_Click);
//
// timProgress
//
this.timProgress.Tick += new System.EventHandler(this.TimeProgress_tick);
//
// btnGetPCbID
//
this.btnGetPCbID.Location = new System.Drawing.Point(399, 16);
this.btnGetPCbID.Name = "btnGetPCbID";
this.btnGetPCbID.Size = new System.Drawing.Size(110, 30);
this.btnGetPCbID.TabIndex = 11;
this.btnGetPCbID.Text = "Get PCB ID";
this.btnGetPCbID.UseVisualStyleBackColor = true;
this.btnGetPCbID.Click += new System.EventHandler(this.btnGetPCbID_Click);
//
// pnlBussy
//
this.pnlBussy.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pnlBussy.BackColor = System.Drawing.Color.Transparent;
this.pnlBussy.Controls.Add(this.lblProgress);
this.pnlBussy.Controls.Add(this.lblAction);
this.pnlBussy.Controls.Add(this.probarBusy);
this.pnlBussy.Controls.Add(this.label3);
this.pnlBussy.Location = new System.Drawing.Point(8, 171);
this.pnlBussy.Name = "pnlBussy";
this.pnlBussy.Size = new System.Drawing.Size(803, 398);
this.pnlBussy.TabIndex = 51;
this.pnlBussy.Visible = false;
//
// lblProgress
//
this.lblProgress.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblProgress.AutoSize = true;
this.lblProgress.Location = new System.Drawing.Point(240, 334);
this.lblProgress.Name = "lblProgress";
this.lblProgress.Size = new System.Drawing.Size(0, 13);
this.lblProgress.TabIndex = 3;
//
// lblAction
//
this.lblAction.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblAction.AutoSize = true;
this.lblAction.Location = new System.Drawing.Point(240, 312);
this.lblAction.Name = "lblAction";
this.lblAction.Size = new System.Drawing.Size(0, 13);
this.lblAction.TabIndex = 2;
//
// probarBusy
//
this.probarBusy.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.probarBusy.Location = new System.Drawing.Point(12, 286);
this.probarBusy.Name = "probarBusy";
this.probarBusy.Size = new System.Drawing.Size(779, 23);
this.probarBusy.TabIndex = 1;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(240, 270);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 13);
this.label3.TabIndex = 0;
this.label3.Text = "Please wait!";
//
// btnReadFwVersions
//
this.btnReadFwVersions.Location = new System.Drawing.Point(399, 51);
this.btnReadFwVersions.Name = "btnReadFwVersions";
this.btnReadFwVersions.Size = new System.Drawing.Size(110, 30);
this.btnReadFwVersions.TabIndex = 52;
this.btnReadFwVersions.Text = "Read FW Versions";
this.btnReadFwVersions.UseVisualStyleBackColor = true;
this.btnReadFwVersions.Click += new System.EventHandler(this.btnReadFwVersions_Click);
//
// btnCalibrationRestore
//
this.btnCalibrationRestore.Location = new System.Drawing.Point(560, 14);
this.btnCalibrationRestore.Name = "btnCalibrationRestore";
this.btnCalibrationRestore.Size = new System.Drawing.Size(110, 30);
this.btnCalibrationRestore.TabIndex = 58;
this.btnCalibrationRestore.Text = "CalibrationRestore";
this.btnCalibrationRestore.UseVisualStyleBackColor = true;
this.btnCalibrationRestore.Visible = false;
this.btnCalibrationRestore.Click += new System.EventHandler(this.btnCalibrationRestore_Click);
//
// btnBatteryIdle
//
this.btnBatteryIdle.Location = new System.Drawing.Point(399, 87);
this.btnBatteryIdle.Name = "btnBatteryIdle";
this.btnBatteryIdle.Size = new System.Drawing.Size(110, 30);
this.btnBatteryIdle.TabIndex = 60;
this.btnBatteryIdle.Text = "Battery Idle";
this.btnBatteryIdle.UseVisualStyleBackColor = true;
this.btnBatteryIdle.Visible = false;
this.btnBatteryIdle.Click += new System.EventHandler(this.btnBatteryIdle_Click);
//
// btnSetDefaultPulse
//
this.btnSetDefaultPulse.Location = new System.Drawing.Point(560, 85);
this.btnSetDefaultPulse.Name = "btnSetDefaultPulse";
this.btnSetDefaultPulse.Size = new System.Drawing.Size(110, 30);
this.btnSetDefaultPulse.TabIndex = 61;
this.btnSetDefaultPulse.Text = "Set default Pulse";
this.btnSetDefaultPulse.UseVisualStyleBackColor = true;
this.btnSetDefaultPulse.Click += new System.EventHandler(this.btnSetDefaultPulse_Click);
//
// btnStoreAll
//
this.btnStoreAll.Location = new System.Drawing.Point(251, 16);
this.btnStoreAll.Name = "btnStoreAll";
this.btnStoreAll.Size = new System.Drawing.Size(110, 28);
this.btnStoreAll.TabIndex = 62;
this.btnStoreAll.Text = "Store All";
this.btnStoreAll.UseVisualStyleBackColor = true;
this.btnStoreAll.Click += new System.EventHandler(this.btnStoreAll_Click);
//
// btnRegisterToFile
//
this.btnRegisterToFile.Location = new System.Drawing.Point(251, 50);
this.btnRegisterToFile.Name = "btnRegisterToFile";
this.btnRegisterToFile.Size = new System.Drawing.Size(110, 30);
this.btnRegisterToFile.TabIndex = 63;
this.btnRegisterToFile.Text = "RegisterToFile";
this.btnRegisterToFile.UseVisualStyleBackColor = true;
this.btnRegisterToFile.Click += new System.EventHandler(this.btnRegisterToFile_Click);
//
// timer1
//
this.timer1.Interval = 5000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// btnBatLife
//
this.btnBatLife.Location = new System.Drawing.Point(399, 123);
this.btnBatLife.Name = "btnBatLife";
this.btnBatLife.Size = new System.Drawing.Size(110, 30);
this.btnBatLife.TabIndex = 71;
this.btnBatLife.Text = "Lifetime";
this.btnBatLife.UseVisualStyleBackColor = true;
this.btnBatLife.Click += new System.EventHandler(this.btnBatLife_Click);
//
// btnRadioPressure
//
this.btnRadioPressure.Location = new System.Drawing.Point(560, 123);
this.btnRadioPressure.Name = "btnRadioPressure";
this.btnRadioPressure.Size = new System.Drawing.Size(110, 30);
this.btnRadioPressure.TabIndex = 72;
this.btnRadioPressure.Text = "Activate Radio";
this.btnRadioPressure.UseVisualStyleBackColor = true;
this.btnRadioPressure.Click += new System.EventHandler(this.btnRadioPressure_Click);
//
// nundCalResultID
//
this.nundCalResultID.Location = new System.Drawing.Point(562, 58);
this.nundCalResultID.Maximum = new decimal(new int[] {
999999,
0,
0,
0});
this.nundCalResultID.Name = "nundCalResultID";
this.nundCalResultID.Size = new System.Drawing.Size(110, 20);
this.nundCalResultID.TabIndex = 73;
this.nundCalResultID.Visible = false;
//
// lblGtbVersion
//
this.lblGtbVersion.AutoSize = true;
this.lblGtbVersion.Location = new System.Drawing.Point(10, 10);
this.lblGtbVersion.Name = "lblGtbVersion";
this.lblGtbVersion.Size = new System.Drawing.Size(79, 13);
this.lblGtbVersion.TabIndex = 75;
this.lblGtbVersion.Text = "GTB Version: ?";
//
// lblConfigVersion
//
this.lblConfigVersion.AutoSize = true;
this.lblConfigVersion.Location = new System.Drawing.Point(10, 33);
this.lblConfigVersion.Name = "lblConfigVersion";
this.lblConfigVersion.Size = new System.Drawing.Size(119, 13);
this.lblConfigVersion.TabIndex = 76;
this.lblConfigVersion.Text = "Configuration Version: ?";
//
// btnFileToRegister
//
this.btnFileToRegister.Location = new System.Drawing.Point(251, 87);
this.btnFileToRegister.Name = "btnFileToRegister";
this.btnFileToRegister.Size = new System.Drawing.Size(110, 30);
this.btnFileToRegister.TabIndex = 77;
this.btnFileToRegister.Text = "FileToRegister";
this.btnFileToRegister.UseVisualStyleBackColor = true;
this.btnFileToRegister.Click += new System.EventHandler(this.btnFileToRegister_Click);
//
// cbxUseOfflinePwds
//
this.cbxUseOfflinePwds.AutoSize = true;
this.cbxUseOfflinePwds.Location = new System.Drawing.Point(12, 59);
this.cbxUseOfflinePwds.Name = "cbxUseOfflinePwds";
this.cbxUseOfflinePwds.Size = new System.Drawing.Size(132, 17);
this.cbxUseOfflinePwds.TabIndex = 78;
this.cbxUseOfflinePwds.Text = "Use Offline Passwords";
this.cbxUseOfflinePwds.UseVisualStyleBackColor = true;
this.cbxUseOfflinePwds.CheckedChanged += new System.EventHandler(this.cbxUseOfflinePwds_CheckedChanged);
//
// FrmRegisterStore
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(803, 553);
this.Controls.Add(this.cbxUseOfflinePwds);
this.Controls.Add(this.btnFileToRegister);
this.Controls.Add(this.lblConfigVersion);
this.Controls.Add(this.lblGtbVersion);
this.Controls.Add(this.nundCalResultID);
this.Controls.Add(this.btnRadioPressure);
this.Controls.Add(this.btnBatLife);
this.Controls.Add(this.btnRegisterToFile);
this.Controls.Add(this.btnStoreAll);
this.Controls.Add(this.btnSetDefaultPulse);
this.Controls.Add(this.btnBatteryIdle);
this.Controls.Add(this.btnCalibrationRestore);
this.Controls.Add(this.btnReadFwVersions);
this.Controls.Add(this.pnlBussy);
this.Controls.Add(this.btnGetPCbID);
this.Controls.Add(this.lblState);
this.Controls.Add(this.btnConnect);
this.Controls.Add(this.registerGridView);
this.Controls.Add(this.btnReadRegister);
this.Controls.Add(this.label1);
this.Controls.Add(this.cbComSlot);
this.Name = "FrmRegisterStore";
this.Text = "frmRegisterStore";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmRegisterStore_FormClosing);
this.Load += new System.EventHandler(this.frmRegisterStore_Load);
((System.ComponentModel.ISupportInitialize)(this.registerGridView)).EndInit();
this.pnlBussy.ResumeLayout(false);
this.pnlBussy.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nundCalResultID)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ComboBox cbComSlot;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnReadRegister;
private System.Windows.Forms.DataGridView registerGridView;
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Label lblState;
private System.Windows.Forms.Timer timProgress;
private System.Windows.Forms.Button btnGetPCbID;
private System.Windows.Forms.Panel pnlBussy;
private System.Windows.Forms.Label lblProgress;
private System.Windows.Forms.Label lblAction;
private System.Windows.Forms.ProgressBar probarBusy;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnReadFwVersions;
private System.Windows.Forms.Button btnCalibrationRestore;
private System.Windows.Forms.Button btnBatteryIdle;
private System.Windows.Forms.Button btnSetDefaultPulse;
private System.Windows.Forms.Button btnStoreAll;
private System.Windows.Forms.Button btnRegisterToFile;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button btnBatLife;
private System.Windows.Forms.Button btnRadioPressure;
private System.Windows.Forms.NumericUpDown nundCalResultID;
private System.Windows.Forms.Label lblGtbVersion;
private System.Windows.Forms.Label lblConfigVersion;
private System.Windows.Forms.Button btnFileToRegister;
private System.Windows.Forms.CheckBox cbxUseOfflinePwds;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,705 +0,0 @@
namespace GenesisCordonelInterface.UI
{
partial class FrmSetup
{
/// <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();
this.btnReload = new System.Windows.Forms.Button();
this.btnStore = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.btnAddRow = new System.Windows.Forms.Button();
this.dgvConfig = new System.Windows.Forms.DataGridView();
this.tbcSlot = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cbcRequestPort = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.cbcRequestType = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.cbcStreamingPort = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.cbcSlotType = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.btcDetectRequest = new System.Windows.Forms.DataGridViewButtonColumn();
this.btcDetectStreaming = new System.Windows.Forms.DataGridViewButtonColumn();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.cbxProductionMode = new System.Windows.Forms.CheckBox();
this.cbUpdateFiles = new System.Windows.Forms.CheckBox();
this.cbUseMinMaxCheck = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.txtWachSeriveUrl = new System.Windows.Forms.TextBox();
this.cbUseRegisterWatch = new System.Windows.Forms.CheckBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.cmdAddOffline = new System.Windows.Forms.Button();
this.dgvofflinePw = new System.Windows.Forms.DataGridView();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.offlinePaswordItemBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.tabPage4 = new System.Windows.Forms.TabPage();
this.lblGlobalCurrentPath = new System.Windows.Forms.Label();
this.btnGlobalSearch = new System.Windows.Forms.Button();
this.btnGlobalDefaultLan = new System.Windows.Forms.Button();
this.btnGlobalDefaultLocal = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.lblLocalCurrentPath = new System.Windows.Forms.Label();
this.btnLocalSearch = new System.Windows.Forms.Button();
this.btnLocalDefaultLan = new System.Windows.Forms.Button();
this.btnLocalDefaultLocal = new System.Windows.Forms.Button();
this.lblLocalPath = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.cbxSirtService868MHz = new System.Windows.Forms.ComboBox();
this.cbxSirtService433MHz = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.cbxSirtComport868MHz = new System.Windows.Forms.ComboBox();
this.cbxSirtComport433MHz = new System.Windows.Forms.ComboBox();
this.tbxSirtBoxNo = new System.Windows.Forms.TextBox();
this.tbxSirtStationId = new System.Windows.Forms.TextBox();
this.lblSirtComport868MHz = new System.Windows.Forms.Label();
this.lblSirtComport433MHz = new System.Windows.Forms.Label();
this.lblSirtBoxNo = new System.Windows.Forms.Label();
this.lblSirtStation = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvConfig)).BeginInit();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvofflinePw)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.offlinePaswordItemBindingSource)).BeginInit();
this.tabPage4.SuspendLayout();
this.tabPage5.SuspendLayout();
this.SuspendLayout();
//
// btnReload
//
this.btnReload.Location = new System.Drawing.Point(12, 12);
this.btnReload.Name = "btnReload";
this.btnReload.Size = new System.Drawing.Size(140, 43);
this.btnReload.TabIndex = 1;
this.btnReload.Text = "Reload Setup";
this.btnReload.UseVisualStyleBackColor = true;
this.btnReload.Click += new System.EventHandler(this.BtnReload_Click);
//
// btnStore
//
this.btnStore.Location = new System.Drawing.Point(158, 12);
this.btnStore.Name = "btnStore";
this.btnStore.Size = new System.Drawing.Size(140, 43);
this.btnStore.TabIndex = 2;
this.btnStore.Text = "Save Setup";
this.btnStore.UseVisualStyleBackColor = true;
this.btnStore.Click += new System.EventHandler(this.BtnStore_Click);
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage4);
this.tabControl1.Controls.Add(this.tabPage5);
this.tabControl1.Location = new System.Drawing.Point(12, 74);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(768, 387);
this.tabControl1.TabIndex = 17;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.btnAddRow);
this.tabPage1.Controls.Add(this.dgvConfig);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(760, 361);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Slots";
this.tabPage1.UseVisualStyleBackColor = true;
//
// btnAddRow
//
this.btnAddRow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAddRow.Location = new System.Drawing.Point(6, 255);
this.btnAddRow.Name = "btnAddRow";
this.btnAddRow.Size = new System.Drawing.Size(199, 29);
this.btnAddRow.TabIndex = 5;
this.btnAddRow.Text = "Add Slot";
this.btnAddRow.UseVisualStyleBackColor = true;
this.btnAddRow.Click += new System.EventHandler(this.btnAddRow_Click);
//
// dgvConfig
//
this.dgvConfig.AllowUserToAddRows = false;
this.dgvConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dgvConfig.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvConfig.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.tbcSlot,
this.cbcRequestPort,
this.cbcRequestType,
this.cbcStreamingPort,
this.cbcSlotType,
this.btcDetectRequest,
this.btcDetectStreaming});
this.dgvConfig.Location = new System.Drawing.Point(6, 6);
this.dgvConfig.Name = "dgvConfig";
this.dgvConfig.Size = new System.Drawing.Size(746, 243);
this.dgvConfig.TabIndex = 4;
this.dgvConfig.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvConfig_CellContentClick);
this.dgvConfig.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dgvConfig_DataError);
//
// tbcSlot
//
this.tbcSlot.HeaderText = "tbcSlot";
this.tbcSlot.Name = "tbcSlot";
//
// cbcRequestPort
//
this.cbcRequestPort.HeaderText = "cbcRequestPort";
this.cbcRequestPort.Name = "cbcRequestPort";
//
// cbcRequestType
//
this.cbcRequestType.HeaderText = "cbcRequestType";
this.cbcRequestType.Name = "cbcRequestType";
//
// cbcStreamingPort
//
this.cbcStreamingPort.HeaderText = "cbcStreamingPort";
this.cbcStreamingPort.Name = "cbcStreamingPort";
//
// cbcSlotType
//
this.cbcSlotType.HeaderText = "TempretureMeter";
this.cbcSlotType.Name = "cbcSlotType";
this.cbcSlotType.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// btcDetectRequest
//
this.btcDetectRequest.HeaderText = "btcDetectRequest";
this.btcDetectRequest.Name = "btcDetectRequest";
//
// btcDetectStreaming
//
this.btcDetectStreaming.HeaderText = "btcDetectStreaming";
this.btcDetectStreaming.Name = "btcDetectStreaming";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.cbxProductionMode);
this.tabPage2.Controls.Add(this.cbUpdateFiles);
this.tabPage2.Controls.Add(this.cbUseMinMaxCheck);
this.tabPage2.Controls.Add(this.label1);
this.tabPage2.Controls.Add(this.txtWachSeriveUrl);
this.tabPage2.Controls.Add(this.cbUseRegisterWatch);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(760, 361);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "General";
this.tabPage2.UseVisualStyleBackColor = true;
//
// cbxProductionMode
//
this.cbxProductionMode.AutoSize = true;
this.cbxProductionMode.Location = new System.Drawing.Point(25, 19);
this.cbxProductionMode.Name = "cbxProductionMode";
this.cbxProductionMode.Size = new System.Drawing.Size(104, 17);
this.cbxProductionMode.TabIndex = 22;
this.cbxProductionMode.Text = "ProductionMode";
this.cbxProductionMode.UseVisualStyleBackColor = true;
//
// cbUpdateFiles
//
this.cbUpdateFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbUpdateFiles.AutoSize = true;
this.cbUpdateFiles.Location = new System.Drawing.Point(25, 42);
this.cbUpdateFiles.Name = "cbUpdateFiles";
this.cbUpdateFiles.Size = new System.Drawing.Size(199, 17);
this.cbUpdateFiles.TabIndex = 21;
this.cbUpdateFiles.Text = "Auto Update files (configuration.json)";
this.cbUpdateFiles.UseVisualStyleBackColor = true;
this.cbUpdateFiles.CheckedChanged += new System.EventHandler(this.cbUpdateFiles_CheckedChanged);
//
// cbUseMinMaxCheck
//
this.cbUseMinMaxCheck.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbUseMinMaxCheck.AutoSize = true;
this.cbUseMinMaxCheck.Location = new System.Drawing.Point(25, 88);
this.cbUseMinMaxCheck.Name = "cbUseMinMaxCheck";
this.cbUseMinMaxCheck.Size = new System.Drawing.Size(113, 17);
this.cbUseMinMaxCheck.TabIndex = 20;
this.cbUseMinMaxCheck.Text = "UseMinMaxCheck";
this.cbUseMinMaxCheck.UseVisualStyleBackColor = true;
this.cbUseMinMaxCheck.CheckedChanged += new System.EventHandler(this.cbUseMinMaxCheck_CheckedChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(147, 65);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(136, 13);
this.label1.TabIndex = 19;
this.label1.Text = "RegisterWatchServiceURL";
//
// txtWachSeriveUrl
//
this.txtWachSeriveUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtWachSeriveUrl.Location = new System.Drawing.Point(288, 60);
this.txtWachSeriveUrl.Name = "txtWachSeriveUrl";
this.txtWachSeriveUrl.Size = new System.Drawing.Size(439, 20);
this.txtWachSeriveUrl.TabIndex = 18;
this.txtWachSeriveUrl.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// cbUseRegisterWatch
//
this.cbUseRegisterWatch.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbUseRegisterWatch.AutoSize = true;
this.cbUseRegisterWatch.Location = new System.Drawing.Point(25, 65);
this.cbUseRegisterWatch.Name = "cbUseRegisterWatch";
this.cbUseRegisterWatch.Size = new System.Drawing.Size(116, 17);
this.cbUseRegisterWatch.TabIndex = 17;
this.cbUseRegisterWatch.Text = "UseRegisterWatch";
this.cbUseRegisterWatch.UseVisualStyleBackColor = true;
this.cbUseRegisterWatch.CheckedChanged += new System.EventHandler(this.cbUseRegisterWatch_CheckedChanged);
//
// tabPage3
//
this.tabPage3.Controls.Add(this.cmdAddOffline);
this.tabPage3.Controls.Add(this.dgvofflinePw);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(760, 361);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "OfflinePasswords";
this.tabPage3.UseVisualStyleBackColor = true;
//
// cmdAddOffline
//
this.cmdAddOffline.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cmdAddOffline.Location = new System.Drawing.Point(3, 195);
this.cmdAddOffline.Name = "cmdAddOffline";
this.cmdAddOffline.Size = new System.Drawing.Size(257, 43);
this.cmdAddOffline.TabIndex = 17;
this.cmdAddOffline.Text = "Add Item";
this.cmdAddOffline.UseVisualStyleBackColor = true;
this.cmdAddOffline.Click += new System.EventHandler(this.cmdAddOffline_Click);
//
// dgvofflinePw
//
this.dgvofflinePw.AutoGenerateColumns = false;
this.dgvofflinePw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvofflinePw.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1,
this.dataGridViewTextBoxColumn2});
this.dgvofflinePw.DataSource = this.offlinePaswordItemBindingSource;
this.dgvofflinePw.Location = new System.Drawing.Point(3, 19);
this.dgvofflinePw.Name = "dgvofflinePw";
this.dgvofflinePw.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvofflinePw.Size = new System.Drawing.Size(345, 170);
this.dgvofflinePw.TabIndex = 16;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "PcbID";
this.dataGridViewTextBoxColumn1.HeaderText = "PcbID";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.DataPropertyName = "Password";
this.dataGridViewTextBoxColumn2.HeaderText = "Password";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// offlinePaswordItemBindingSource
//
this.offlinePaswordItemBindingSource.DataSource = typeof(OfflinePasswordItem);
//
// tabPage4
//
this.tabPage4.Controls.Add(this.lblGlobalCurrentPath);
this.tabPage4.Controls.Add(this.btnGlobalSearch);
this.tabPage4.Controls.Add(this.btnGlobalDefaultLan);
this.tabPage4.Controls.Add(this.btnGlobalDefaultLocal);
this.tabPage4.Controls.Add(this.label6);
this.tabPage4.Controls.Add(this.lblLocalCurrentPath);
this.tabPage4.Controls.Add(this.btnLocalSearch);
this.tabPage4.Controls.Add(this.btnLocalDefaultLan);
this.tabPage4.Controls.Add(this.btnLocalDefaultLocal);
this.tabPage4.Controls.Add(this.lblLocalPath);
this.tabPage4.Controls.Add(this.label4);
this.tabPage4.Controls.Add(this.label3);
this.tabPage4.Controls.Add(this.label2);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(760, 361);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "Logging";
this.tabPage4.UseVisualStyleBackColor = true;
this.tabPage4.Enter += new System.EventHandler(this.tabPage4_Click);
//
// lblGlobalCurrentPath
//
this.lblGlobalCurrentPath.AutoSize = true;
this.lblGlobalCurrentPath.Location = new System.Drawing.Point(132, 211);
this.lblGlobalCurrentPath.Name = "lblGlobalCurrentPath";
this.lblGlobalCurrentPath.Size = new System.Drawing.Size(10, 13);
this.lblGlobalCurrentPath.TabIndex = 12;
this.lblGlobalCurrentPath.Text = "-";
//
// btnGlobalSearch
//
this.btnGlobalSearch.Location = new System.Drawing.Point(52, 307);
this.btnGlobalSearch.Name = "btnGlobalSearch";
this.btnGlobalSearch.Size = new System.Drawing.Size(314, 29);
this.btnGlobalSearch.TabIndex = 11;
this.btnGlobalSearch.Text = "Search";
this.btnGlobalSearch.UseVisualStyleBackColor = true;
this.btnGlobalSearch.Click += new System.EventHandler(this.btnGlobalSearch_Click);
//
// btnGlobalDefaultLan
//
this.btnGlobalDefaultLan.Location = new System.Drawing.Point(52, 272);
this.btnGlobalDefaultLan.Name = "btnGlobalDefaultLan";
this.btnGlobalDefaultLan.Size = new System.Drawing.Size(314, 29);
this.btnGlobalDefaultLan.TabIndex = 10;
this.btnGlobalDefaultLan.Text = "Use \\\\sla12buma\\cordonelds$\\${machinename}";
this.btnGlobalDefaultLan.UseVisualStyleBackColor = true;
this.btnGlobalDefaultLan.Click += new System.EventHandler(this.btnGlobalDefaultLan_Click);
//
// btnGlobalDefaultLocal
//
this.btnGlobalDefaultLocal.Location = new System.Drawing.Point(52, 237);
this.btnGlobalDefaultLocal.Name = "btnGlobalDefaultLocal";
this.btnGlobalDefaultLocal.Size = new System.Drawing.Size(314, 29);
this.btnGlobalDefaultLocal.TabIndex = 9;
this.btnGlobalDefaultLocal.Text = "Use C:\\GenesisLog\\";
this.btnGlobalDefaultLocal.UseVisualStyleBackColor = true;
this.btnGlobalDefaultLocal.Click += new System.EventHandler(this.btnGlobalDefaultLocal_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(49, 211);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(66, 13);
this.label6.TabIndex = 8;
this.label6.Text = "CurrentPath:";
//
// lblLocalCurrentPath
//
this.lblLocalCurrentPath.AutoSize = true;
this.lblLocalCurrentPath.Location = new System.Drawing.Point(132, 57);
this.lblLocalCurrentPath.Name = "lblLocalCurrentPath";
this.lblLocalCurrentPath.Size = new System.Drawing.Size(10, 13);
this.lblLocalCurrentPath.TabIndex = 7;
this.lblLocalCurrentPath.Text = "-";
//
// btnLocalSearch
//
this.btnLocalSearch.Location = new System.Drawing.Point(52, 153);
this.btnLocalSearch.Name = "btnLocalSearch";
this.btnLocalSearch.Size = new System.Drawing.Size(314, 29);
this.btnLocalSearch.TabIndex = 6;
this.btnLocalSearch.Text = "Search";
this.btnLocalSearch.UseVisualStyleBackColor = true;
this.btnLocalSearch.Click += new System.EventHandler(this.btnLocalSearch_Click);
//
// btnLocalDefaultLan
//
this.btnLocalDefaultLan.Location = new System.Drawing.Point(52, 118);
this.btnLocalDefaultLan.Name = "btnLocalDefaultLan";
this.btnLocalDefaultLan.Size = new System.Drawing.Size(314, 29);
this.btnLocalDefaultLan.TabIndex = 5;
this.btnLocalDefaultLan.Text = "Use \\\\sla12buma\\cordonelds$\\${machinename}";
this.btnLocalDefaultLan.UseVisualStyleBackColor = true;
this.btnLocalDefaultLan.Click += new System.EventHandler(this.btnLocalDefaultLan_Click);
//
// btnLocalDefaultLocal
//
this.btnLocalDefaultLocal.Location = new System.Drawing.Point(52, 83);
this.btnLocalDefaultLocal.Name = "btnLocalDefaultLocal";
this.btnLocalDefaultLocal.Size = new System.Drawing.Size(314, 29);
this.btnLocalDefaultLocal.TabIndex = 4;
this.btnLocalDefaultLocal.Text = "Use C:\\GenesisLog\\";
this.btnLocalDefaultLocal.UseVisualStyleBackColor = true;
this.btnLocalDefaultLocal.Click += new System.EventHandler(this.btnLocalDefaultLocal_Click);
//
// lblLocalPath
//
this.lblLocalPath.AutoSize = true;
this.lblLocalPath.Location = new System.Drawing.Point(121, 57);
this.lblLocalPath.Name = "lblLocalPath";
this.lblLocalPath.Size = new System.Drawing.Size(0, 13);
this.lblLocalPath.TabIndex = 3;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(49, 57);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(66, 13);
this.label4.TabIndex = 2;
this.label4.Text = "CurrentPath:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 190);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(37, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Global";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(103, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Local (only ToolBox)";
//
// tabPage5
//
this.tabPage5.Controls.Add(this.cbxSirtService868MHz);
this.tabPage5.Controls.Add(this.cbxSirtService433MHz);
this.tabPage5.Controls.Add(this.label5);
this.tabPage5.Controls.Add(this.label7);
this.tabPage5.Controls.Add(this.cbxSirtComport868MHz);
this.tabPage5.Controls.Add(this.cbxSirtComport433MHz);
this.tabPage5.Controls.Add(this.tbxSirtBoxNo);
this.tabPage5.Controls.Add(this.tbxSirtStationId);
this.tabPage5.Controls.Add(this.lblSirtComport868MHz);
this.tabPage5.Controls.Add(this.lblSirtComport433MHz);
this.tabPage5.Controls.Add(this.lblSirtBoxNo);
this.tabPage5.Controls.Add(this.lblSirtStation);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Size = new System.Drawing.Size(760, 361);
this.tabPage5.TabIndex = 4;
this.tabPage5.Text = "SIRT";
this.tabPage5.UseVisualStyleBackColor = true;
//
// cbxSirtService868MHz
//
this.cbxSirtService868MHz.FormattingEnabled = true;
this.cbxSirtService868MHz.Location = new System.Drawing.Point(142, 164);
this.cbxSirtService868MHz.Name = "cbxSirtService868MHz";
this.cbxSirtService868MHz.Size = new System.Drawing.Size(121, 21);
this.cbxSirtService868MHz.TabIndex = 13;
//
// cbxSirtService433MHz
//
this.cbxSirtService433MHz.FormattingEnabled = true;
this.cbxSirtService433MHz.Location = new System.Drawing.Point(142, 137);
this.cbxSirtService433MHz.Name = "cbxSirtService433MHz";
this.cbxSirtService433MHz.Size = new System.Drawing.Size(121, 21);
this.cbxSirtService433MHz.TabIndex = 12;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(22, 168);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(114, 13);
this.label5.TabIndex = 11;
this.label5.Text = "Service Port 868 MHz:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(22, 140);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(114, 13);
this.label7.TabIndex = 10;
this.label7.Text = "Service Port 433 MHz:";
//
// cbxSirtComport868MHz
//
this.cbxSirtComport868MHz.FormattingEnabled = true;
this.cbxSirtComport868MHz.Location = new System.Drawing.Point(142, 102);
this.cbxSirtComport868MHz.Name = "cbxSirtComport868MHz";
this.cbxSirtComport868MHz.Size = new System.Drawing.Size(121, 21);
this.cbxSirtComport868MHz.TabIndex = 9;
//
// cbxSirtComport433MHz
//
this.cbxSirtComport433MHz.FormattingEnabled = true;
this.cbxSirtComport433MHz.Location = new System.Drawing.Point(142, 75);
this.cbxSirtComport433MHz.Name = "cbxSirtComport433MHz";
this.cbxSirtComport433MHz.Size = new System.Drawing.Size(121, 21);
this.cbxSirtComport433MHz.TabIndex = 8;
//
// tbxSirtBoxNo
//
this.tbxSirtBoxNo.Location = new System.Drawing.Point(142, 44);
this.tbxSirtBoxNo.Name = "tbxSirtBoxNo";
this.tbxSirtBoxNo.Size = new System.Drawing.Size(100, 20);
this.tbxSirtBoxNo.TabIndex = 7;
//
// tbxSirtStationId
//
this.tbxSirtStationId.Location = new System.Drawing.Point(142, 17);
this.tbxSirtStationId.Name = "tbxSirtStationId";
this.tbxSirtStationId.Size = new System.Drawing.Size(100, 20);
this.tbxSirtStationId.TabIndex = 6;
//
// lblSirtComport868MHz
//
this.lblSirtComport868MHz.AutoSize = true;
this.lblSirtComport868MHz.Location = new System.Drawing.Point(22, 106);
this.lblSirtComport868MHz.Name = "lblSirtComport868MHz";
this.lblSirtComport868MHz.Size = new System.Drawing.Size(103, 13);
this.lblSirtComport868MHz.TabIndex = 5;
this.lblSirtComport868MHz.Text = "RSSI Port 868 MHz:";
//
// lblSirtComport433MHz
//
this.lblSirtComport433MHz.AutoSize = true;
this.lblSirtComport433MHz.Location = new System.Drawing.Point(22, 78);
this.lblSirtComport433MHz.Name = "lblSirtComport433MHz";
this.lblSirtComport433MHz.Size = new System.Drawing.Size(103, 13);
this.lblSirtComport433MHz.TabIndex = 4;
this.lblSirtComport433MHz.Text = "RSSI Port 433 MHz:";
//
// lblSirtBoxNo
//
this.lblSirtBoxNo.AutoSize = true;
this.lblSirtBoxNo.Location = new System.Drawing.Point(22, 51);
this.lblSirtBoxNo.Name = "lblSirtBoxNo";
this.lblSirtBoxNo.Size = new System.Drawing.Size(45, 13);
this.lblSirtBoxNo.TabIndex = 3;
this.lblSirtBoxNo.Text = "Box No:";
//
// lblSirtStation
//
this.lblSirtStation.AutoSize = true;
this.lblSirtStation.Location = new System.Drawing.Point(22, 24);
this.lblSirtStation.Name = "lblSirtStation";
this.lblSirtStation.Size = new System.Drawing.Size(57, 13);
this.lblSirtStation.TabIndex = 2;
this.lblSirtStation.Text = "Station ID:";
//
// FrmSetup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(780, 671);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.btnStore);
this.Controls.Add(this.btnReload);
this.MinimumSize = new System.Drawing.Size(755, 410);
this.Name = "FrmSetup";
this.Text = "Setup";
this.Load += new System.EventHandler(this.FrmSetup_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvConfig)).EndInit();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.tabPage3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvofflinePw)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.offlinePaswordItemBindingSource)).EndInit();
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
this.tabPage5.ResumeLayout(false);
this.tabPage5.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnReload;
private System.Windows.Forms.Button btnStore;
private System.Windows.Forms.DataGridViewTextBoxColumn pcbIDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn passwordDataGridViewTextBoxColumn;
private System.Windows.Forms.BindingSource offlinePaswordItemBindingSource;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Button btnAddRow;
private System.Windows.Forms.DataGridView dgvConfig;
private System.Windows.Forms.DataGridViewTextBoxColumn tbcSlot;
private System.Windows.Forms.DataGridViewComboBoxColumn cbcRequestPort;
private System.Windows.Forms.DataGridViewComboBoxColumn cbcRequestType;
private System.Windows.Forms.DataGridViewComboBoxColumn cbcStreamingPort;
private System.Windows.Forms.DataGridViewCheckBoxColumn cbcSlotType;
private System.Windows.Forms.DataGridViewButtonColumn btcDetectRequest;
private System.Windows.Forms.DataGridViewButtonColumn btcDetectStreaming;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.CheckBox cbxProductionMode;
private System.Windows.Forms.CheckBox cbUpdateFiles;
private System.Windows.Forms.CheckBox cbUseMinMaxCheck;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtWachSeriveUrl;
private System.Windows.Forms.CheckBox cbUseRegisterWatch;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Button cmdAddOffline;
private System.Windows.Forms.DataGridView dgvofflinePw;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.Button btnLocalDefaultLocal;
private System.Windows.Forms.Label lblLocalPath;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnLocalSearch;
private System.Windows.Forms.Button btnLocalDefaultLan;
private System.Windows.Forms.Label lblLocalCurrentPath;
private System.Windows.Forms.Label lblGlobalCurrentPath;
private System.Windows.Forms.Button btnGlobalSearch;
private System.Windows.Forms.Button btnGlobalDefaultLan;
private System.Windows.Forms.Button btnGlobalDefaultLocal;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.Label lblSirtComport868MHz;
private System.Windows.Forms.Label lblSirtComport433MHz;
private System.Windows.Forms.Label lblSirtBoxNo;
private System.Windows.Forms.Label lblSirtStation;
private System.Windows.Forms.TextBox tbxSirtBoxNo;
private System.Windows.Forms.TextBox tbxSirtStationId;
private System.Windows.Forms.ComboBox cbxSirtComport868MHz;
private System.Windows.Forms.ComboBox cbxSirtComport433MHz;
private System.Windows.Forms.ComboBox cbxSirtService868MHz;
private System.Windows.Forms.ComboBox cbxSirtService433MHz;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label7;
}
}

View File

@ -1,862 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using System.Xml.Linq;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore.EventArguments;
using Xylem.Common.Hardware.Interfaces.Ports.SerialPorts;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Utils.Logging;
using NLog;
using GenesisCordonelInterface.API;
namespace GenesisCordonelInterface.UI
{
/// <summary>
/// Setup of GTB
/// </summary>
public partial class FrmSetup : Form
{
private static readonly NLog.ILogger Logger = NLog.LogManager.GetLogger("GenesisCordonelInterface");
private readonly InterfaceToLaatzen interfaceToLaatzen = new InterfaceToLaatzen();
private const String RequestPortString = "RequestPort";
private const String RequestTypeString = "RequestType";
private const String StreamingPortString = "StreamingPort";
private const String SlotTypeString = "RefTemperature";
private const String SlotString = "Slot";
private const String StreamingDetectString = "DetectStreaming";
private const String RequestDetectString = "DetectRequest";
private const String ValueString = "Value";
private const String TextString = "Text";
private String _fileString;
private readonly String _serialConfigFilePathName;
private readonly String _offlinePwdPathName;
private readonly DataTable _slotConfigDataTable = new DataTable();
private readonly SirtConfig _sirtConfig = new SirtConfig();
private readonly ProcessConfig _configuration = new ProcessConfig();
private ConcurrentBag<String> _countRawData = new ConcurrentBag<String>();
private List<OfflinePasswordItem> _listOfOfflinePasswords = new List<OfflinePasswordItem>();
/// <summary>
/// Ctor
/// </summary>
public FrmSetup()
{
_serialConfigFilePathName = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Genesis",
ProgramConfig.SerialConfigFileName);
_offlinePwdPathName = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"Genesis",
ProgramConfig.OfflineInfoFile);
if (!File.Exists(_offlinePwdPathName))
{
_listOfOfflinePasswords.Add(new OfflinePasswordItem("", ""));
File.WriteAllText(_offlinePwdPathName, JsonConvert.SerializeObject(_listOfOfflinePasswords));
}
_slotConfigDataTable.Columns.Add(SlotString, typeof(String));
_slotConfigDataTable.Columns.Add(StreamingPortString, typeof(String));
_slotConfigDataTable.Columns.Add(RequestPortString, typeof(String));
_slotConfigDataTable.Columns.Add(RequestTypeString, typeof(String));
_slotConfigDataTable.Columns.Add(SlotTypeString, typeof(String));
InitializeComponent();
tbcSlot.Name = SlotString;
cbcRequestPort.Name = RequestPortString;
cbcRequestType.Name = RequestTypeString;
cbcStreamingPort.Name = StreamingPortString;
cbcSlotType.Name = SlotTypeString;
btcDetectStreaming.Name = StreamingDetectString;
btcDetectRequest.Name = RequestDetectString;
btcDetectStreaming.Name = StreamingDetectString;
tbcSlot.HeaderText = SlotString;
cbcRequestPort.HeaderText = RequestPortString;
cbcRequestType.HeaderText = RequestTypeString;
cbcStreamingPort.HeaderText = StreamingPortString;
btcDetectRequest.HeaderText = RequestDetectString;
btcDetectStreaming.HeaderText = StreamingDetectString;
cbcSlotType.HeaderText = SlotTypeString;
LoadFromFile();
_configuration.ReadProcessConfig();
cbUseMinMaxCheck.Checked = _configuration.UseMinMaxCheck;
cbUseRegisterWatch.Checked = _configuration.UseRegisterWatchService;
txtWachSeriveUrl.Text = _configuration.RegisterWatchServiceUrl;
cbUpdateFiles.Checked = _configuration.AutoUpdateFiles;
cbxProductionMode.Checked = _configuration.ProductionMode;
_sirtConfig.ReadSirtConfig();
tbxSirtStationId.Text = _sirtConfig.StationId?.ToString();
tbxSirtBoxNo.Text = _sirtConfig.SirtBoxNo?.ToString();
if (_sirtConfig.SirtComport433MHz != null)
cbxSirtComport433MHz.Items.Add(_sirtConfig.SirtComport433MHz);
if (_sirtConfig.SirtComport868MHz != null)
cbxSirtComport868MHz.Items.Add(_sirtConfig.SirtComport868MHz);
var comPorts = SerialPort.GetPortNames().ToList();
foreach (var comPort in comPorts.Where(comPort => !cbxSirtComport433MHz.Items.Contains(comPort)))
{
cbxSirtComport433MHz.Items.Add(comPort);
}
foreach (var comPort in comPorts.Where(comPort => !cbxSirtComport868MHz.Items.Contains(comPort)))
{
cbxSirtComport868MHz.Items.Add(comPort);
}
if (cbxSirtComport433MHz.Items.Count > 0)
cbxSirtComport433MHz.Text = cbxSirtComport433MHz.Items[0].ToString();
if (cbxSirtComport868MHz.Items.Count > 0)
cbxSirtComport868MHz.Text = cbxSirtComport868MHz.Items[0].ToString();
if (_sirtConfig.ServiceSirtComport433MHz != null)
cbxSirtService433MHz.Items.Add(_sirtConfig.ServiceSirtComport433MHz);
if (_sirtConfig.ServiceSirtComport868MHz != null)
cbxSirtService868MHz.Items.Add(_sirtConfig.ServiceSirtComport868MHz);
foreach (var comPort in comPorts.Where(comPort => !cbxSirtService433MHz.Items.Contains(comPort)))
{
cbxSirtService433MHz.Items.Add(comPort);
}
foreach (var comPort in comPorts.Where(comPort => !cbxSirtService868MHz.Items.Contains(comPort)))
{
cbxSirtService868MHz.Items.Add(comPort);
}
if (cbxSirtService433MHz.Items.Count > 0)
cbxSirtService433MHz.Text = cbxSirtService433MHz.Items[0].ToString();
if (cbxSirtService868MHz.Items.Count > 0)
cbxSirtService868MHz.Text = cbxSirtService868MHz.Items[0].ToString();
Logger.Trace("CONFIG: Setup loaded.");
}
private void BtnReload_Click(Object sender, EventArgs e)
{
Logger.Trace("CONFIG: Reload setup requested.");
LoadFromFile();
LoadOfflineFile();
Logger.Trace("CONFIG: Setup reloaded.");
}
private void BtnStore_Click(Object sender, EventArgs e)
{
Logger.Trace("CONFIG: Save setup requested.");
StoreToPc();
StoreOfflineFile();
StoreSirtSettings();
Logger.Trace("CONFIG: Setup saved.");
}
private void StoreSirtSettings()
{
if (int.TryParse(tbxSirtStationId.Text, out var intNo))
{
_sirtConfig.StationId = intNo;
}
if (int.TryParse(tbxSirtBoxNo.Text, out intNo))
{
_sirtConfig.SirtBoxNo = intNo;
}
_sirtConfig.SirtComport433MHz = cbxSirtComport433MHz.Text;
_sirtConfig.SirtComport868MHz = cbxSirtComport868MHz.Text;
_sirtConfig.ServiceSirtComport433MHz = cbxSirtService433MHz.Text;
_sirtConfig.ServiceSirtComport868MHz = cbxSirtService868MHz.Text;
_sirtConfig.Update();
Logger.Trace("CONFIG: SIRT settings stored.");
}
private void StoreToPc()
{
Logger.Trace("CONFIG: Storing slot configuration to PC.");
var newFileContent = new List<SlotConfig>();
for (var row = 0; row < dgvConfig.Rows.Count; row++)
{
var slotStr = (String)dgvConfig.Rows[row].Cells[SlotString].Value;
int.TryParse(slotStr, out var slot);
var irdaType = typeof(IrdaSerialPort).FullName;
if (dgvConfig.Rows[row].Cells[RequestTypeString].Value != null)
{
irdaType = (String)dgvConfig.Rows[row].Cells[RequestTypeString].Value;
}
var requestPort = new PortConfig()
{
PortName = (String)dgvConfig.Rows[row].Cells[RequestPortString].Value,
Type = irdaType
};
var streamingPort = new PortConfig()
{
PortName = (String)dgvConfig.Rows[row].Cells[StreamingPortString].Value,
Type = typeof(UartSerialPort).FullName
};
var slotType = SlotType.DutMeter;
if (dgvConfig.Rows[row].Cells[SlotTypeString].Value != null)
{
var isChecked = dgvConfig.Rows[row].Cells[SlotTypeString].Value.ToString();
if (bool.TrueString == isChecked)
{
slotType = SlotType.TemperatureMeter;
}
}
if (!string.IsNullOrEmpty(slotStr))
{
newFileContent.Add(new SlotConfig()
{
Slot = slot,
Request = requestPort,
Streaming = streamingPort,
Type = slotType
});
}
}
var text = JsonConvert.SerializeObject(newFileContent);
if (text == _fileString)
{
Logger.Trace("CONFIG: No setup changes detected.");
LoadFromFile();
return;
}
if (File.Exists(_serialConfigFilePathName))
{
var backupSerialConfigFile =
$"{Path.GetDirectoryName(_serialConfigFilePathName)}\\Backup_{DateTime.Now:yyyyMMdd}_{DateTime.Now:HHmmss}_{ProgramConfig.SerialConfigFileName}";
File.Move(_serialConfigFilePathName, backupSerialConfigFile);
}
File.WriteAllText(_serialConfigFilePathName, text);
LoadFromFile();
LoadOfflineFile();
Logger.Trace("CONFIG: Slot configuration stored.");
}
private void LoadFromFile()
{
Logger.Trace("CONFIG: Loading slot configuration from file.");
_slotConfigDataTable.Clear();
dgvConfig.Rows.Clear();
if (!File.Exists(_serialConfigFilePathName))
{
Logger.Trace("CONFIG: Serial configuration file not found.");
return;
}
SlotConfig[] meterConfigList;
using (var tr = new StreamReader(_serialConfigFilePathName))
{
_fileString = tr.ReadToEnd();
meterConfigList = JsonConvert.DeserializeObject<SlotConfig[]>(_fileString);
}
foreach (var item in meterConfigList)
{
var row = _slotConfigDataTable.NewRow();
row[SlotString] = item.Slot;
row[RequestPortString] = item.Request.PortName;
row[RequestTypeString] = item.Request.Type;
row[StreamingPortString] = item.Streaming.PortName;
row[SlotTypeString] = item.Type == SlotType.TemperatureMeter;
_slotConfigDataTable.Rows.Add(row);
}
foreach (DataRow row in _slotConfigDataTable.Rows)
{
dgvConfig.Rows.Add(AddRowToGrid(row));
}
Logger.Trace("CONFIG: Slot configuration loaded.");
}
private DataGridViewRow AddRowToGrid(DataRow row = null)
{
var newRow = new DataGridViewRow();
var slotCell = new DataGridViewTextBoxCell();
newRow.Cells.Add(slotCell);
var requestPortCell = new DataGridViewComboBoxCell
{
DataSource = GetPorts(),
DisplayMember = TextString,
ValueMember = ValueString
};
newRow.Cells.Add(requestPortCell);
var requestTypeCell = new DataGridViewComboBoxCell
{
DataSource = GetTypes(),
DisplayMember = TextString,
ValueMember = ValueString
};
newRow.Cells.Add(requestTypeCell);
var streamingPortCell = new DataGridViewComboBoxCell
{
DataSource = GetPorts(),
DisplayMember = TextString,
ValueMember = ValueString
};
newRow.Cells.Add(streamingPortCell);
var slotTypeCell = new DataGridViewCheckBoxCell();
slotTypeCell.Value = false;
if (row == null)
{
return newRow;
}
slotCell.Value = row[SlotString];
streamingPortCell.Value = row[StreamingPortString];
requestPortCell.Value = row[RequestPortString];
try
{
requestTypeCell.Value = row[RequestTypeString];
}
catch (Exception ex)
{
Logger.Error("Failed to set request type in grid: " + ex.Message);
}
slotTypeCell.Value = row[SlotTypeString];
newRow.Cells.Add(slotTypeCell);
return newRow;
}
private DataTable GetSlotTypes()
{
var ret = new DataTable();
ret.Columns.Add(TextString);
ret.Columns.Add(ValueString, typeof(Int32));
ret.Rows.Add("DutMeter", SlotType.DutMeter.GetHashCode());
ret.Rows.Add("TemperatureMeter", SlotType.TemperatureMeter.GetHashCode());
return ret;
}
private DataTable GetPorts()
{
var ret = new DataTable();
ret.Columns.Add(ValueString);
ret.Columns.Add(TextString);
var portList = SerialPort.GetPortNames().ToList();
foreach (var item in portList)
{
ret.Rows.Add(item, item);
}
foreach (DataRow row in _slotConfigDataTable.Rows)
{
if (portList.All(pl => pl != (String)row[StreamingPortString]))
{
ret.Rows.Add(row[StreamingPortString].ToString(), BaseSerialPort.PortNotAssigned);
}
if (portList.All(pl => pl != (String)row[RequestPortString]))
{
ret.Rows.Add(row[RequestPortString].ToString(), BaseSerialPort.PortNotAssigned);
}
}
return ret;
}
private static DataTable GetTypes()
{
var ret = new DataTable();
ret.Columns.Add(ValueString);
ret.Columns.Add(TextString);
ret.Rows.Add(typeof(UartSerialPort).FullName, nameof(UartSerialPort));
ret.Rows.Add(typeof(RfidSerialPort).FullName, nameof(RfidSerialPort));
ret.Rows.Add(typeof(IrdaSerialPort).FullName, nameof(IrdaSerialPort));
return ret;
}
private void __DgvConfig_CellContentClick(Object sender, DataGridViewCellEventArgs e)
{
Logger.Trace("UI-CLICK: FrmSetup: DgvConfig_CellContentClick() use APILaatzen");
if (e.RowIndex < 0 || e.ColumnIndex < 0)
{
return;
}
if (!dgvConfig.Columns[e.ColumnIndex].Name.Contains(StreamingDetectString) &&
!dgvConfig.Columns[e.ColumnIndex].Name.Contains(RequestDetectString))
{
return;
}
StoreToPc();
var slotString = (String)dgvConfig.Rows[e.RowIndex].Cells[SlotString].Value;
int.TryParse(slotString, out var slot);
using (var mb = new MeterBatch())
{
using (var meter = new GenesisMeter())
{
meter.SetupFromConfigFile(slot, false);
mb.AddMeter(meter);
const String checkMark = "\u2714";
if (dgvConfig.Columns[e.ColumnIndex].Name.Contains(StreamingDetectString))
{
Logger.Trace("COM: Detecting streaming port for slot " + slot + "...");
_countRawData = new ConcurrentBag<String>();
meter.StreamingPort.OnRawRecordReceived += delegate (Object o, BasePortDataEventArgs rawMsg)
{
var data = (String)rawMsg.GetData();
_countRawData.Add(data);
};
Thread.Sleep(500);
if (_countRawData.Any())
{
var text = $"SUCCESS\nSlot: {slot}\nStreaming port: {meter.StreamingPort.GetPortName()}\n\n{checkMark}";
MessageBox.Show(text, @"SUCCESS", MessageBoxButtons.OK);
dgvConfig.Rows[e.RowIndex].Cells[StreamingDetectString].Style.BackColor = Color.Green;
Logger.Info("COM: Streaming detection SUCCESS for slot " + slot + ", port " + meter.StreamingPort.GetPortName() + ".");
}
else
{
var text = $"FAILED\nSlot: {slot}\nStreaming port: {meter.StreamingPort.GetPortName()}";
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
dgvConfig.Rows[e.RowIndex].Cells[StreamingDetectString].Style.BackColor = Color.Red;
Logger.Error("COM: Streaming detection FAILED for slot " + slot + ", port " + meter.StreamingPort.GetPortName() + ".");
}
_countRawData = new ConcurrentBag<String>();
}
else
{
meter.Logout();
var pcbId = meter.GetPcbId();
if (string.IsNullOrEmpty(pcbId))
{
var text = $"FAILED\nSlot: {slot}\nRequest port: {meter.RequestPort.GetPortName()}";
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
dgvConfig.Rows[e.RowIndex].Cells[RequestDetectString].Style.BackColor = Color.Red;
Logger.Info("COM: Streaming detection SUCCESS for slot " + slot + ", port " + meter.StreamingPort.GetPortName() + ".");
}
else
{
var text = $"SUCCESS\nSlot: {slot}\nRequest port: {meter.RequestPort.GetPortName()}\n\n{checkMark}";
MessageBox.Show(text, @"SUCCESS", MessageBoxButtons.OK);
dgvConfig.Rows[e.RowIndex].Cells[RequestDetectString].Style.BackColor = Color.Green;
Logger.Error("COM: Streaming detection FAILED for slot " + slot + ", port " + meter.StreamingPort.GetPortName() + ".");
}
}
}
}
}
private void DgvConfig_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
Logger.Trace("UI-CLICK: FrmSetup: DgvConfig_CellContentClick() use API2");
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var columnName = dgvConfig.Columns[e.ColumnIndex].Name;
if (!columnName.Contains(StreamingDetectString) &&
!columnName.Contains(RequestDetectString))
{
return;
}
StoreToPc();
var slotString = (string)dgvConfig.Rows[e.RowIndex].Cells[SlotString].Value;
if (!int.TryParse(slotString, out var slot))
return;
const string checkMark = "\u2714";
try
{
if (columnName.Contains(StreamingDetectString))
{
Logger.Trace("COM: Detecting streaming port for slot " + slot + "...");
var result = interfaceToLaatzen.DetectStreamingPort(slot);
if (result.Success)
{
var text = $"SUCCESS\nSlot: {result.Slot}\nStreaming port: {result.PortName}\n\n{checkMark}";
MessageBox.Show(text, @"SUCCESS", MessageBoxButtons.OK);
dgvConfig.Rows[e.RowIndex].Cells[StreamingDetectString].Style.BackColor = Color.Green;
Logger.Info("COM: Streaming detection SUCCESS for slot " + result.Slot + ", port " + result.PortName + ".");
}
else
{
var text = $"FAILED\nSlot: {result.Slot}\nStreaming port: {result.PortName}";
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
dgvConfig.Rows[e.RowIndex].Cells[StreamingDetectString].Style.BackColor = Color.Red;
Logger.Error("COM: Streaming detection FAILED for slot " + result.Slot + ", port " + result.PortName + ".");
}
}
else
{
var result = interfaceToLaatzen.DetectRequestPort(slot);
if (result.Success)
{
var text = $"SUCCESS\nSlot: {result.Slot}\nRequest port: {result.PortName}\n\n{checkMark}";
MessageBox.Show(text, @"SUCCESS", MessageBoxButtons.OK);
dgvConfig.Rows[e.RowIndex].Cells[RequestDetectString].Style.BackColor = Color.Green;
Logger.Info("COM: Request detection SUCCESS for slot " + result.Slot + ", port " + result.PortName + ".");
}
else
{
var text = $"FAILED\nSlot: {result.Slot}\nRequest port: {result.PortName}";
MessageBox.Show(text, @"FAILED", MessageBoxButtons.OK, MessageBoxIcon.Error);
dgvConfig.Rows[e.RowIndex].Cells[RequestDetectString].Style.BackColor = Color.Red;
Logger.Error("COM: Request detection FAILED for slot " + result.Slot + ", port " + result.PortName + ".");
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, @"ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
Logger.Error(ex);
}
}
private void dgvConfig_DataError(Object sender, DataGridViewDataErrorEventArgs e)
{
Logger.Error("CONFIG: DataGridView data error.");
}
private void cbUseRegisterWatch_CheckedChanged(Object sender, EventArgs e)
{
_configuration.UseRegisterWatchService = cbUseRegisterWatch.Checked;
_configuration.Update();
StoreToPc();
Logger.Trace("UseRegisterWatchService changed to " + cbUseRegisterWatch.Checked);
}
private void cbUseMinMaxCheck_CheckedChanged(Object sender, EventArgs e)
{
_configuration.UseMinMaxCheck = cbUseMinMaxCheck.Checked;
_configuration.Update();
StoreToPc();
Logger.Trace("UseMinMaxCheck changed to " + cbUseMinMaxCheck.Checked);
}
private void textBox1_TextChanged(Object sender, EventArgs e)
{
_configuration.RegisterWatchServiceUrl = txtWachSeriveUrl.Text;
_configuration.Update();
StoreToPc();
Logger.Trace("RegisterWatchServiceUrl changed.");
}
private void cbUpdateFiles_CheckedChanged(Object sender, EventArgs e)
{
_configuration.AutoUpdateFiles = cbUpdateFiles.Checked;
_configuration.Update();
StoreToPc();
Logger.Trace("CONFIG: AutoUpdateFiles changed to " + cbUpdateFiles.Checked);
}
private void FrmSetup_Load(Object sender, EventArgs e)
{
LoadOfflineFile();
cbxProductionMode.CheckedChanged += cbxProductionMode_CheckedChanged;
Logger.Trace("FORM: FrmSetup loaded.");
}
private void StoreOfflineFile()
{
try
{
var listToRemove = _listOfOfflinePasswords.Where(offlinePwd => string.IsNullOrEmpty(offlinePwd.PcbID)).ToList();
foreach (var itemToRemove in listToRemove)
{
_listOfOfflinePasswords.Remove(itemToRemove);
}
_listOfOfflinePasswords.Add(new OfflinePasswordItem("", ""));
File.WriteAllText(_offlinePwdPathName, JsonConvert.SerializeObject(_listOfOfflinePasswords));
dgvofflinePw.CellValidated -= dgvofflinePw_CellValidated;
dgvofflinePw.DataSource = null;
dgvofflinePw.DataSource = _listOfOfflinePasswords;
dgvofflinePw.CellValidated += dgvofflinePw_CellValidated;
Logger.Trace("CONFIG: Offline password file stored.");
}
catch (Exception ex)
{
Logger.Error("CONFIG: Failed to store offline password file: " + ex.Message);
}
}
private void LoadOfflineFile()
{
try
{
_listOfOfflinePasswords = JsonConvert.DeserializeObject<List<OfflinePasswordItem>>(File.ReadAllText(_offlinePwdPathName));
}
catch (Exception ex)
{
_listOfOfflinePasswords = new List<OfflinePasswordItem>();
Logger.Error("CONFIG: Failed to load offline password file. New empty list created. " + ex.Message);
}
finally
{
if (!_listOfOfflinePasswords.Any())
{
_listOfOfflinePasswords.Add(new OfflinePasswordItem("", ""));
}
dgvofflinePw.CellValidated -= dgvofflinePw_CellValidated;
dgvofflinePw.DataSource = null;
dgvofflinePw.DataSource = _listOfOfflinePasswords;
dgvofflinePw.CellValidated += dgvofflinePw_CellValidated;
Logger.Trace("CONFIG: Offline password file loaded.");
}
}
private void dgvofflinePw_CellValidated(Object sender, DataGridViewCellEventArgs e)
{
StoreOfflineFile();
}
private void cmdAddOffline_Click(Object sender, EventArgs e)
{
_listOfOfflinePasswords.Add(new OfflinePasswordItem("", ""));
dgvofflinePw.DataSource = null;
dgvofflinePw.DataSource = _listOfOfflinePasswords;
Logger.Trace("TABLE: Offline password row added.");
}
private void cbxProductionMode_CheckedChanged(Object sender, EventArgs e)
{
if (cbxProductionMode.Checked)
{
MessageBox.Show(@"Production mode! Configuration.json has to be the latest! ");
}
else
{
MessageBox.Show("Developer mode! Configuration.json can be exchanged on individual requirements.\n" +
"\nRISK:\n" +
"- Register ranges cannot be checked\n" +
"- Register may not be able to access");
}
_configuration.ProductionMode = cbxProductionMode.Checked;
_configuration.Update();
StoreToPc();
Logger.Trace("CHECKBOX: ProductionMode changed to " + cbxProductionMode.Checked);
}
private void tabPage4_Click(Object sender, EventArgs e)
{
Logger.Trace("TABPAGE4: Logging tab opened.");
try
{
var path = NLogHelper.GetCurrentApplicationFolder();
var a = XElement.Load(path);
lblLocalCurrentPath.Text = a.Elements()
.First(s => s.Name.LocalName == "variable")
.Attributes()
.First(s => s.Value == "BasePath")
.NextAttribute.Value;
}
catch (Exception ex)
{
lblLocalCurrentPath.Text = ex.Message;
Logger.Error("TABPAGE4: Failed to read local NLog path: " + ex.Message);
}
try
{
var path = NLogHelper.GetApplicationDataPath();
var b = XElement.Load(path);
lblGlobalCurrentPath.Text = b.Elements()
.First(s => s.Name.LocalName == "variable")
.Attributes()
.First(s => s.Value == "BasePath")
.NextAttribute.Value;
}
catch (Exception ex)
{
lblGlobalCurrentPath.Text = ex.Message;
Logger.Error("TABPAGE4: Failed to read global NLog path: " + ex.Message);
}
}
private void Add(String path, String newDest)
{
try
{
var a = XElement.Load(path);
var firstIsVariable = a.Elements().First();
if (firstIsVariable.Name.LocalName != "variable")
{
var newElm = new XElement("variable", null);
newElm.SetAttributeValue("name", "BasePath");
newElm.SetAttributeValue("value", newDest);
a.AddFirst(newElm);
}
else if (a.Elements().First(b => b.Name.LocalName == "variable").Attributes()
.All(s => s.Value != "BasePath"))
{
var newElm = new XElement("variable", null);
newElm.SetAttributeValue("name", "BasePath");
newElm.SetAttributeValue("value", newDest);
a.AddFirst(newElm);
}
else
{
a.Elements().First(b => b.Name.LocalName == "variable").Attributes()
.First(s => s.Value == "BasePath").NextAttribute.Value = newDest;
}
a.Save(path);
tabPage4_Click(this, null);
Logger.Trace("Log path updated to: " + newDest);
}
catch (Exception ex)
{
Logger.Trace("Failed to update log path: " + ex.Message);
}
}
private void btnLocalDefaultLocal_Click(Object sender, EventArgs e)
{
Add(NLogHelper.GetCurrentApplicationFolder(), "C:\\GenesisLog\\");
Logger.Trace("Local log path set to default local.");
}
private void btnLocalDefaultLan_Click(Object sender, EventArgs e)
{
Add(NLogHelper.GetCurrentApplicationFolder(), "\\\\sla12buma\\cordonelds$\\${machinename}");
Logger.Trace("Local log path set to default LAN.");
}
private void btnGlobalDefaultLocal_Click(Object sender, EventArgs e)
{
Add(NLogHelper.GetApplicationDataPath(), "C:\\GenesisLog\\");
Logger.Trace("Global log path set to default local.");
}
private void btnGlobalDefaultLan_Click(Object sender, EventArgs e)
{
Add(NLogHelper.GetApplicationDataPath(), "\\\\sla12buma\\cordonelds$\\${{machinename}}");
Logger.Trace("Global log path set to default LAN.");
}
private void btnGlobalSearch_Click(Object sender, EventArgs e)
{
var dia = new FolderBrowserDialog();
dia.ShowDialog();
Add(NLogHelper.GetApplicationDataPath(), dia.SelectedPath);
Logger.Trace("Global log path selected by search dialog.");
}
private void btnLocalSearch_Click(Object sender, EventArgs e)
{
var dia = new FolderBrowserDialog();
dia.ShowDialog();
Add(NLogHelper.GetCurrentApplicationFolder(), dia.SelectedPath);
Logger.Trace("Local log path selected by search dialog.");
}
private void btnAddRow_Click(Object sender, EventArgs e)
{
dgvConfig.Rows.Add(AddRowToGrid());
Logger.Trace("TABLE: New slot row added.");
}
public class OfflinePasswordItem
{
public OfflinePasswordItem()
{
}
public OfflinePasswordItem(String pcbID, String password)
{
PcbID = pcbID;
Password = password;
}
public String PcbID { get; set; }
public String Password { get; set; }
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -664,7 +664,7 @@
this.gB_Passwords.Size = new System.Drawing.Size(272, 288);
this.gB_Passwords.TabIndex = 30;
this.gB_Passwords.TabStop = false;
this.gB_Passwords.Text = "Passwords";
this.gB_Passwords.Text = "_externPasswords";
//
// tB_PasswordMeter5
//

View File

@ -52,7 +52,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
public partial class FrmConfigurations : Form
{
private static readonly NLog.ILogger Logger = NLog.LogManager.GetLogger("GenesisCordonelInterface");
private readonly InterfaceToLaatzen interfaceToLaatzen = new InterfaceToLaatzen();
private readonly InterfaceGCIToLaatzen interfaceToLaatzen = new InterfaceGCIToLaatzen();
private GenesisMeter _currentGenesis;
private String _currentPcbId;

View File

@ -334,7 +334,7 @@
this.cbxUseOfflinePwds.Name = "cbxUseOfflinePwds";
this.cbxUseOfflinePwds.Size = new System.Drawing.Size(132, 17);
this.cbxUseOfflinePwds.TabIndex = 78;
this.cbxUseOfflinePwds.Text = "Use Offline Passwords";
this.cbxUseOfflinePwds.Text = "Use Offline _externPasswords";
this.cbxUseOfflinePwds.UseVisualStyleBackColor = true;
this.cbxUseOfflinePwds.CheckedChanged += new System.EventHandler(this.cbxUseOfflinePwds_CheckedChanged);
//

View File

@ -1,4 +1,5 @@
//...MF using LaaPackages.Features.Cordonel;
using GenesisCordonelInterface.API;
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using NLog;
@ -28,16 +29,16 @@ using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
using Xylem.Common.Logic.SoftwareAccessHelper;
using Xylem.Common.Utils.Logging;
using static Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore.GenesisMeter;
using Access = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Access;
using Register = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Register;
using GenesisCordonelInterface.API;
namespace GenesisCordonelInterface.UI
{
public partial class FrmRegisterStore : Form
{
private static readonly NLog.ILogger Logger = NLog.LogManager.GetLogger("GenesisCordonelInterface");
private readonly InterfaceToLaatzen interfaceToLaatzen = new InterfaceToLaatzen();
private readonly InterfaceGCIToLaatzen interfaceToLaatzen = new InterfaceGCIToLaatzen();
public class regStore
{
@ -491,7 +492,7 @@ namespace GenesisCordonelInterface.UI
DisableAllButtons();
_dataTable.Rows.Clear();
var result = await Task.Run(() => interfaceToLaatzen.Connect(slotNo, cbxUseOfflinePwds.Checked));
var result = await Task.Run(() => interfaceToLaatzen.Connect(slotNo, cbxUseOfflinePwds.Checked == true ? PasswordSource.OfflineFile: PasswordSource.RestApi, null));
if (result.Success)
{

View File

@ -29,7 +29,7 @@ namespace GenesisCordonelInterface.UI
public partial class FrmSetup : Form
{
private static readonly NLog.ILogger Logger = NLog.LogManager.GetLogger("GenesisCordonelInterface");
private readonly InterfaceToLaatzen interfaceToLaatzen = new InterfaceToLaatzen();
private readonly InterfaceGCIToLaatzen interfaceToLaatzen = new InterfaceGCIToLaatzen();
private const String RequestPortString = "RequestPort";
private const String RequestTypeString = "RequestType";

View File

@ -42,6 +42,7 @@
this.miHelp = new System.Windows.Forms.ToolStripMenuItem();
this.miHelpAbout = new System.Windows.Forms.ToolStripMenuItem();
this.pnlLeftMenu = new System.Windows.Forms.Panel();
this.preadjustmentButton = new System.Windows.Forms.Button();
this.btnPulseSetup = new System.Windows.Forms.Button();
this.btnRegisterStore = new System.Windows.Forms.Button();
this.btnSetup = new System.Windows.Forms.Button();
@ -49,7 +50,6 @@
this.rtbMainLog = new System.Windows.Forms.RichTextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.tslStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.menuStrip1.SuspendLayout();
this.pnlLeftMenu.SuspendLayout();
this.pnlMain.SuspendLayout();
@ -117,6 +117,7 @@
// pnlLeftMenu
//
this.pnlLeftMenu.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlLeftMenu.Controls.Add(this.preadjustmentButton);
this.pnlLeftMenu.Controls.Add(this.btnPulseSetup);
this.pnlLeftMenu.Controls.Add(this.btnRegisterStore);
this.pnlLeftMenu.Controls.Add(this.btnSetup);
@ -126,6 +127,16 @@
this.pnlLeftMenu.Size = new System.Drawing.Size(180, 474);
this.pnlLeftMenu.TabIndex = 1;
//
// preadjustmentButton
//
this.preadjustmentButton.Location = new System.Drawing.Point(13, 219);
this.preadjustmentButton.Name = "preadjustmentButton";
this.preadjustmentButton.Size = new System.Drawing.Size(153, 35);
this.preadjustmentButton.TabIndex = 3;
this.preadjustmentButton.Text = "Preadjustment";
this.preadjustmentButton.UseVisualStyleBackColor = true;
this.preadjustmentButton.Click += new System.EventHandler(this.preadjustmentButton_Click);
//
// btnPulseSetup
//
this.btnPulseSetup.Location = new System.Drawing.Point(13, 96);
@ -194,23 +205,11 @@
this.tslStatus.Size = new System.Drawing.Size(39, 17);
this.tslStatus.Text = "Ready";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(689, 7);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(168, 17);
this.checkBox1.TabIndex = 4;
this.checkBox1.Text = "Enable NLog (force configure)";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1284, 520);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.pnlMain);
this.Controls.Add(this.pnlLeftMenu);
this.Controls.Add(this.statusStrip1);
@ -230,7 +229,6 @@
this.PerformLayout();
}
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button preadjustmentButton;
}
}

View File

@ -180,19 +180,6 @@ namespace GenesisCordonelInterface.UI
MessageBoxIcon.Information);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
{
var configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "nlog.config");
NLog.LogManager.Setup().LoadConfigurationFromFile(configPath);
NLog.LogManager.ReconfigExistingLoggers();
var log = NLog.LogManager.GetLogger("GenesisCordonelInterface");
log.Trace("GenesisCordonelInterface NLogConfig forced after delay");
}
}
private Color GetLogLevelColor(string level)
{
switch (level.Trim().ToUpperInvariant())
@ -274,5 +261,19 @@ namespace GenesisCordonelInterface.UI
}
}
}
private void preadjustmentButton_Click(object sender, EventArgs e)
{
Logger.Trace("FORM: ---------------------------------");
Logger.Trace("FORM: Preadjustment open.");
using (FrmCordonelPreadjustmentUI frm = new FrmCordonelPreadjustmentUI())
{
frm.ShowDialog(this);
}
Logger.Trace("FORM: Preadjustment closed.");
}
}
}

View File

@ -1,671 +0,0 @@
namespace CordonelPreadjustmentUi
{
partial class PreAdjustmentControl
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreAdjustmentControl));
this.pB_Logo1 = new System.Windows.Forms.PictureBox();
this.gB_Meters = new System.Windows.Forms.GroupBox();
this.pB_Bubbles1 = new System.Windows.Forms.PictureBox();
this.l_ZeroFlowCal_Status = new System.Windows.Forms.Label();
this.gB_Progress = new System.Windows.Forms.GroupBox();
this.p_ZeroFlowCal_Completion = new System.Windows.Forms.Panel();
this.l_ZeroFlowCal_Completion = new System.Windows.Forms.Label();
this.p_ZeroFlowCal_Offset = new System.Windows.Forms.Panel();
this.l_ZeroFlowCal_Offset = new System.Windows.Forms.Label();
this.cB_ZeroFlowOffsetTestEnable = new System.Windows.Forms.CheckBox();
this.cB_AmplitudeTestEnable = new System.Windows.Forms.CheckBox();
this.cB_TempCalEnable = new System.Windows.Forms.CheckBox();
this.p_ZeroFlowCal_Detect = new System.Windows.Forms.Panel();
this.l_ZeroFlowCal_Detect = new System.Windows.Forms.Label();
this.p_ZeroFlowCal_TempCal = new System.Windows.Forms.Panel();
this.l_ZeroFlowCal_TempCal = new System.Windows.Forms.Label();
this.p_ZeroFlowCal_Prepare = new System.Windows.Forms.Panel();
this.l_ZeroFlowCal_Prepare = new System.Windows.Forms.Label();
this.p_ZeroFlowCal_Amplitude = new System.Windows.Forms.Panel();
this.l_ZeroFlowCal_Amplitude = new System.Windows.Forms.Label();
this.gB_TempMeters = new System.Windows.Forms.GroupBox();
this.btn_StoreTempe = new System.Windows.Forms.Button();
this.pB_ZeroFlowCal_Progress = new System.Windows.Forms.ProgressBar();
this.l_ZeroFlowCal_ResttimeDisplayValue = new System.Windows.Forms.Label();
this.l_ZeroFlowCal_Resttime = new System.Windows.Forms.Label();
this.btn_ZeroFlowCal_Abort = new System.Windows.Forms.Button();
this.btn_ZeroFlowCal_Start = new System.Windows.Forms.Button();
this.btn_ZeroFlowCal_Pdf = new System.Windows.Forms.Button();
this.btn_ZeroFlowCal_Save = new System.Windows.Forms.Button();
this.btn_ZeroFlowCal_Clear = new System.Windows.Forms.Button();
this.btn_ZeroFlowCal_Detect = new System.Windows.Forms.Button();
this.gB_MeterLog = new System.Windows.Forms.GroupBox();
this.btn_ShowAll = new System.Windows.Forms.Button();
this.rTB_ZeroFlowCalMeter = new System.Windows.Forms.RichTextBox();
this.pB_ZeroFlowCal_SubProgress = new System.Windows.Forms.ProgressBar();
this.l_ZeroFlowCal_SubResttimeDisplayValue = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.rTB_ZeroFlowCal = new System.Windows.Forms.RichTextBox();
this.l_SettingsPreparationMetersize = new System.Windows.Forms.Label();
this.cb_Metersize = new System.Windows.Forms.ComboBox();
this.lblBuildDate = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pB_Logo1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pB_Bubbles1)).BeginInit();
this.gB_Progress.SuspendLayout();
this.p_ZeroFlowCal_Completion.SuspendLayout();
this.p_ZeroFlowCal_Offset.SuspendLayout();
this.p_ZeroFlowCal_Detect.SuspendLayout();
this.p_ZeroFlowCal_TempCal.SuspendLayout();
this.p_ZeroFlowCal_Prepare.SuspendLayout();
this.p_ZeroFlowCal_Amplitude.SuspendLayout();
this.gB_TempMeters.SuspendLayout();
this.gB_MeterLog.SuspendLayout();
this.SuspendLayout();
//
// pB_Logo1
//
this.pB_Logo1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pB_Logo1.BackColor = System.Drawing.SystemColors.Control;
this.pB_Logo1.Image = ((System.Drawing.Image)(resources.GetObject("pB_Logo1.Image")));
this.pB_Logo1.InitialImage = null;
this.pB_Logo1.Location = new System.Drawing.Point(781, 0);
this.pB_Logo1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pB_Logo1.Name = "pB_Logo1";
this.pB_Logo1.Size = new System.Drawing.Size(158, 86);
this.pB_Logo1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pB_Logo1.TabIndex = 69;
this.pB_Logo1.TabStop = false;
//
// gB_Meters
//
this.gB_Meters.Location = new System.Drawing.Point(1, 98);
this.gB_Meters.Margin = new System.Windows.Forms.Padding(10, 10, 10, 10);
this.gB_Meters.Name = "gB_Meters";
this.gB_Meters.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.gB_Meters.Size = new System.Drawing.Size(950, 174);
this.gB_Meters.TabIndex = 71;
this.gB_Meters.TabStop = false;
this.gB_Meters.Text = "Meters";
//
// pB_Bubbles1
//
this.pB_Bubbles1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pB_Bubbles1.Image = ((System.Drawing.Image)(resources.GetObject("pB_Bubbles1.Image")));
this.pB_Bubbles1.Location = new System.Drawing.Point(20, 2);
this.pB_Bubbles1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pB_Bubbles1.Name = "pB_Bubbles1";
this.pB_Bubbles1.Size = new System.Drawing.Size(267, 93);
this.pB_Bubbles1.TabIndex = 70;
this.pB_Bubbles1.TabStop = false;
this.pB_Bubbles1.Visible = false;
//
// l_ZeroFlowCal_Status
//
this.l_ZeroFlowCal_Status.AutoSize = true;
this.l_ZeroFlowCal_Status.Font = new System.Drawing.Font("Microsoft Sans Serif", 22.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_Status.Location = new System.Drawing.Point(10, 478);
this.l_ZeroFlowCal_Status.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Status.Name = "l_ZeroFlowCal_Status";
this.l_ZeroFlowCal_Status.Size = new System.Drawing.Size(243, 36);
this.l_ZeroFlowCal_Status.TabIndex = 72;
this.l_ZeroFlowCal_Status.Text = "Press \'DETECT\'";
//
// gB_Progress
//
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Completion);
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Offset);
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Detect);
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_TempCal);
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Prepare);
this.gB_Progress.Controls.Add(this.p_ZeroFlowCal_Amplitude);
this.gB_Progress.Location = new System.Drawing.Point(8, 517);
this.gB_Progress.Margin = new System.Windows.Forms.Padding(10, 10, 10, 10);
this.gB_Progress.Name = "gB_Progress";
this.gB_Progress.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.gB_Progress.Size = new System.Drawing.Size(744, 89);
this.gB_Progress.TabIndex = 80;
this.gB_Progress.TabStop = false;
//
// p_ZeroFlowCal_Completion
//
this.p_ZeroFlowCal_Completion.BackColor = System.Drawing.Color.Gainsboro;
this.p_ZeroFlowCal_Completion.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.p_ZeroFlowCal_Completion.Controls.Add(this.l_ZeroFlowCal_Completion);
this.p_ZeroFlowCal_Completion.Location = new System.Drawing.Point(607, 17);
this.p_ZeroFlowCal_Completion.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.p_ZeroFlowCal_Completion.Name = "p_ZeroFlowCal_Completion";
this.p_ZeroFlowCal_Completion.Size = new System.Drawing.Size(117, 65);
this.p_ZeroFlowCal_Completion.TabIndex = 32;
//
// l_ZeroFlowCal_Completion
//
this.l_ZeroFlowCal_Completion.AutoSize = true;
this.l_ZeroFlowCal_Completion.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_Completion.ForeColor = System.Drawing.Color.Gray;
this.l_ZeroFlowCal_Completion.Location = new System.Drawing.Point(0, 22);
this.l_ZeroFlowCal_Completion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Completion.Name = "l_ZeroFlowCal_Completion";
this.l_ZeroFlowCal_Completion.Size = new System.Drawing.Size(108, 17);
this.l_ZeroFlowCal_Completion.TabIndex = 40;
this.l_ZeroFlowCal_Completion.Text = "COMPLETION";
this.l_ZeroFlowCal_Completion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// p_ZeroFlowCal_Offset
//
this.p_ZeroFlowCal_Offset.BackColor = System.Drawing.Color.Gainsboro;
this.p_ZeroFlowCal_Offset.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.p_ZeroFlowCal_Offset.Controls.Add(this.l_ZeroFlowCal_Offset);
this.p_ZeroFlowCal_Offset.Controls.Add(this.cB_ZeroFlowOffsetTestEnable);
this.p_ZeroFlowCal_Offset.Controls.Add(this.cB_AmplitudeTestEnable);
this.p_ZeroFlowCal_Offset.Controls.Add(this.cB_TempCalEnable);
this.p_ZeroFlowCal_Offset.Location = new System.Drawing.Point(486, 17);
this.p_ZeroFlowCal_Offset.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.p_ZeroFlowCal_Offset.Name = "p_ZeroFlowCal_Offset";
this.p_ZeroFlowCal_Offset.Size = new System.Drawing.Size(121, 65);
this.p_ZeroFlowCal_Offset.TabIndex = 94;
//
// l_ZeroFlowCal_Offset
//
this.l_ZeroFlowCal_Offset.AutoSize = true;
this.l_ZeroFlowCal_Offset.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_Offset.ForeColor = System.Drawing.Color.Gray;
this.l_ZeroFlowCal_Offset.Location = new System.Drawing.Point(24, 12);
this.l_ZeroFlowCal_Offset.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Offset.Name = "l_ZeroFlowCal_Offset";
this.l_ZeroFlowCal_Offset.Size = new System.Drawing.Size(68, 34);
this.l_ZeroFlowCal_Offset.TabIndex = 40;
this.l_ZeroFlowCal_Offset.Text = "OFFSET\r\nTEST";
this.l_ZeroFlowCal_Offset.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// cB_ZeroFlowOffsetTestEnable
//
this.cB_ZeroFlowOffsetTestEnable.AutoSize = true;
this.cB_ZeroFlowOffsetTestEnable.Checked = true;
this.cB_ZeroFlowOffsetTestEnable.CheckState = System.Windows.Forms.CheckState.Checked;
this.cB_ZeroFlowOffsetTestEnable.Enabled = false;
this.cB_ZeroFlowOffsetTestEnable.Location = new System.Drawing.Point(24, 15);
this.cB_ZeroFlowOffsetTestEnable.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cB_ZeroFlowOffsetTestEnable.Name = "cB_ZeroFlowOffsetTestEnable";
this.cB_ZeroFlowOffsetTestEnable.Size = new System.Drawing.Size(58, 17);
this.cB_ZeroFlowOffsetTestEnable.TabIndex = 90;
this.cB_ZeroFlowOffsetTestEnable.Text = "enable";
this.cB_ZeroFlowOffsetTestEnable.UseVisualStyleBackColor = true;
this.cB_ZeroFlowOffsetTestEnable.Visible = false;
//
// cB_AmplitudeTestEnable
//
this.cB_AmplitudeTestEnable.AutoSize = true;
this.cB_AmplitudeTestEnable.Checked = true;
this.cB_AmplitudeTestEnable.CheckState = System.Windows.Forms.CheckState.Checked;
this.cB_AmplitudeTestEnable.Enabled = false;
this.cB_AmplitudeTestEnable.Location = new System.Drawing.Point(-216, 48);
this.cB_AmplitudeTestEnable.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cB_AmplitudeTestEnable.Name = "cB_AmplitudeTestEnable";
this.cB_AmplitudeTestEnable.Size = new System.Drawing.Size(58, 17);
this.cB_AmplitudeTestEnable.TabIndex = 92;
this.cB_AmplitudeTestEnable.Text = "enable";
this.cB_AmplitudeTestEnable.UseVisualStyleBackColor = true;
//
// cB_TempCalEnable
//
this.cB_TempCalEnable.AutoSize = true;
this.cB_TempCalEnable.Checked = true;
this.cB_TempCalEnable.CheckState = System.Windows.Forms.CheckState.Checked;
this.cB_TempCalEnable.Enabled = false;
this.cB_TempCalEnable.Location = new System.Drawing.Point(-96, 48);
this.cB_TempCalEnable.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cB_TempCalEnable.Name = "cB_TempCalEnable";
this.cB_TempCalEnable.Size = new System.Drawing.Size(58, 17);
this.cB_TempCalEnable.TabIndex = 94;
this.cB_TempCalEnable.Text = "enable";
this.cB_TempCalEnable.UseVisualStyleBackColor = true;
//
// p_ZeroFlowCal_Detect
//
this.p_ZeroFlowCal_Detect.BackColor = System.Drawing.Color.Gainsboro;
this.p_ZeroFlowCal_Detect.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.p_ZeroFlowCal_Detect.Controls.Add(this.l_ZeroFlowCal_Detect);
this.p_ZeroFlowCal_Detect.Location = new System.Drawing.Point(4, 17);
this.p_ZeroFlowCal_Detect.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.p_ZeroFlowCal_Detect.Name = "p_ZeroFlowCal_Detect";
this.p_ZeroFlowCal_Detect.Size = new System.Drawing.Size(121, 65);
this.p_ZeroFlowCal_Detect.TabIndex = 40;
//
// l_ZeroFlowCal_Detect
//
this.l_ZeroFlowCal_Detect.AutoSize = true;
this.l_ZeroFlowCal_Detect.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_Detect.ForeColor = System.Drawing.Color.Gray;
this.l_ZeroFlowCal_Detect.Location = new System.Drawing.Point(24, 22);
this.l_ZeroFlowCal_Detect.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Detect.Name = "l_ZeroFlowCal_Detect";
this.l_ZeroFlowCal_Detect.Size = new System.Drawing.Size(69, 17);
this.l_ZeroFlowCal_Detect.TabIndex = 39;
this.l_ZeroFlowCal_Detect.Text = "DETECT";
//
// p_ZeroFlowCal_TempCal
//
this.p_ZeroFlowCal_TempCal.BackColor = System.Drawing.Color.Gainsboro;
this.p_ZeroFlowCal_TempCal.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.p_ZeroFlowCal_TempCal.Controls.Add(this.l_ZeroFlowCal_TempCal);
this.p_ZeroFlowCal_TempCal.Location = new System.Drawing.Point(365, 17);
this.p_ZeroFlowCal_TempCal.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.p_ZeroFlowCal_TempCal.Name = "p_ZeroFlowCal_TempCal";
this.p_ZeroFlowCal_TempCal.Size = new System.Drawing.Size(121, 65);
this.p_ZeroFlowCal_TempCal.TabIndex = 41;
//
// l_ZeroFlowCal_TempCal
//
this.l_ZeroFlowCal_TempCal.AutoSize = true;
this.l_ZeroFlowCal_TempCal.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_TempCal.ForeColor = System.Drawing.Color.Gray;
this.l_ZeroFlowCal_TempCal.Location = new System.Drawing.Point(0, 12);
this.l_ZeroFlowCal_TempCal.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_TempCal.Name = "l_ZeroFlowCal_TempCal";
this.l_ZeroFlowCal_TempCal.Size = new System.Drawing.Size(123, 34);
this.l_ZeroFlowCal_TempCal.TabIndex = 40;
this.l_ZeroFlowCal_TempCal.Text = "TEMPERATURE\r\nCALIBRATION";
this.l_ZeroFlowCal_TempCal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// p_ZeroFlowCal_Prepare
//
this.p_ZeroFlowCal_Prepare.BackColor = System.Drawing.Color.Gainsboro;
this.p_ZeroFlowCal_Prepare.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.p_ZeroFlowCal_Prepare.Controls.Add(this.l_ZeroFlowCal_Prepare);
this.p_ZeroFlowCal_Prepare.Location = new System.Drawing.Point(124, 17);
this.p_ZeroFlowCal_Prepare.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.p_ZeroFlowCal_Prepare.Name = "p_ZeroFlowCal_Prepare";
this.p_ZeroFlowCal_Prepare.Size = new System.Drawing.Size(121, 65);
this.p_ZeroFlowCal_Prepare.TabIndex = 31;
//
// l_ZeroFlowCal_Prepare
//
this.l_ZeroFlowCal_Prepare.AutoSize = true;
this.l_ZeroFlowCal_Prepare.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_Prepare.ForeColor = System.Drawing.Color.Gray;
this.l_ZeroFlowCal_Prepare.Location = new System.Drawing.Point(18, 22);
this.l_ZeroFlowCal_Prepare.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Prepare.Name = "l_ZeroFlowCal_Prepare";
this.l_ZeroFlowCal_Prepare.Size = new System.Drawing.Size(80, 17);
this.l_ZeroFlowCal_Prepare.TabIndex = 39;
this.l_ZeroFlowCal_Prepare.Text = "PREPARE";
//
// p_ZeroFlowCal_Amplitude
//
this.p_ZeroFlowCal_Amplitude.BackColor = System.Drawing.Color.Gainsboro;
this.p_ZeroFlowCal_Amplitude.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.p_ZeroFlowCal_Amplitude.Controls.Add(this.l_ZeroFlowCal_Amplitude);
this.p_ZeroFlowCal_Amplitude.Location = new System.Drawing.Point(244, 17);
this.p_ZeroFlowCal_Amplitude.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.p_ZeroFlowCal_Amplitude.Name = "p_ZeroFlowCal_Amplitude";
this.p_ZeroFlowCal_Amplitude.Size = new System.Drawing.Size(121, 65);
this.p_ZeroFlowCal_Amplitude.TabIndex = 32;
//
// l_ZeroFlowCal_Amplitude
//
this.l_ZeroFlowCal_Amplitude.AutoSize = true;
this.l_ZeroFlowCal_Amplitude.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.l_ZeroFlowCal_Amplitude.ForeColor = System.Drawing.Color.Gray;
this.l_ZeroFlowCal_Amplitude.Location = new System.Drawing.Point(12, 15);
this.l_ZeroFlowCal_Amplitude.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Amplitude.Name = "l_ZeroFlowCal_Amplitude";
this.l_ZeroFlowCal_Amplitude.Size = new System.Drawing.Size(95, 34);
this.l_ZeroFlowCal_Amplitude.TabIndex = 39;
this.l_ZeroFlowCal_Amplitude.Text = "AMPLITUDE\r\nTEST";
this.l_ZeroFlowCal_Amplitude.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// gB_TempMeters
//
this.gB_TempMeters.Controls.Add(this.btn_StoreTempe);
this.gB_TempMeters.Location = new System.Drawing.Point(8, 275);
this.gB_TempMeters.Margin = new System.Windows.Forms.Padding(10, 10, 10, 10);
this.gB_TempMeters.Name = "gB_TempMeters";
this.gB_TempMeters.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.gB_TempMeters.Size = new System.Drawing.Size(403, 193);
this.gB_TempMeters.TabIndex = 72;
this.gB_TempMeters.TabStop = false;
this.gB_TempMeters.Text = "Temp. Meters";
//
// btn_StoreTempe
//
this.btn_StoreTempe.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_StoreTempe.Enabled = false;
this.btn_StoreTempe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_StoreTempe.Location = new System.Drawing.Point(4, 158);
this.btn_StoreTempe.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_StoreTempe.Name = "btn_StoreTempe";
this.btn_StoreTempe.Size = new System.Drawing.Size(395, 31);
this.btn_StoreTempe.TabIndex = 95;
this.btn_StoreTempe.Text = "SAVE TEMP";
this.btn_StoreTempe.UseVisualStyleBackColor = true;
this.btn_StoreTempe.Click += new System.EventHandler(this.btn_StoreTempe_Click);
//
// pB_ZeroFlowCal_Progress
//
this.pB_ZeroFlowCal_Progress.Location = new System.Drawing.Point(8, 634);
this.pB_ZeroFlowCal_Progress.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pB_ZeroFlowCal_Progress.Name = "pB_ZeroFlowCal_Progress";
this.pB_ZeroFlowCal_Progress.Size = new System.Drawing.Size(724, 18);
this.pB_ZeroFlowCal_Progress.Step = 1;
this.pB_ZeroFlowCal_Progress.TabIndex = 35;
//
// l_ZeroFlowCal_ResttimeDisplayValue
//
this.l_ZeroFlowCal_ResttimeDisplayValue.AutoSize = true;
this.l_ZeroFlowCal_ResttimeDisplayValue.Location = new System.Drawing.Point(843, 634);
this.l_ZeroFlowCal_ResttimeDisplayValue.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_ResttimeDisplayValue.Name = "l_ZeroFlowCal_ResttimeDisplayValue";
this.l_ZeroFlowCal_ResttimeDisplayValue.Size = new System.Drawing.Size(49, 13);
this.l_ZeroFlowCal_ResttimeDisplayValue.TabIndex = 37;
this.l_ZeroFlowCal_ResttimeDisplayValue.Text = "00:00:00";
//
// l_ZeroFlowCal_Resttime
//
this.l_ZeroFlowCal_Resttime.AutoSize = true;
this.l_ZeroFlowCal_Resttime.Location = new System.Drawing.Point(736, 634);
this.l_ZeroFlowCal_Resttime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_Resttime.Name = "l_ZeroFlowCal_Resttime";
this.l_ZeroFlowCal_Resttime.Size = new System.Drawing.Size(54, 13);
this.l_ZeroFlowCal_Resttime.TabIndex = 36;
this.l_ZeroFlowCal_Resttime.Text = "Est. total: ";
//
// btn_ZeroFlowCal_Abort
//
this.btn_ZeroFlowCal_Abort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_ZeroFlowCal_Abort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ZeroFlowCal_Abort.Location = new System.Drawing.Point(672, 44);
this.btn_ZeroFlowCal_Abort.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_ZeroFlowCal_Abort.Name = "btn_ZeroFlowCal_Abort";
this.btn_ZeroFlowCal_Abort.Size = new System.Drawing.Size(102, 52);
this.btn_ZeroFlowCal_Abort.TabIndex = 84;
this.btn_ZeroFlowCal_Abort.Text = "STOP";
this.btn_ZeroFlowCal_Abort.UseVisualStyleBackColor = true;
this.btn_ZeroFlowCal_Abort.Click += new System.EventHandler(this.btn_ZeroFlowCal_Abort_Click);
//
// btn_ZeroFlowCal_Start
//
this.btn_ZeroFlowCal_Start.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_ZeroFlowCal_Start.Enabled = false;
this.btn_ZeroFlowCal_Start.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ZeroFlowCal_Start.Location = new System.Drawing.Point(566, 44);
this.btn_ZeroFlowCal_Start.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_ZeroFlowCal_Start.Name = "btn_ZeroFlowCal_Start";
this.btn_ZeroFlowCal_Start.Size = new System.Drawing.Size(102, 51);
this.btn_ZeroFlowCal_Start.TabIndex = 83;
this.btn_ZeroFlowCal_Start.Text = "START";
this.btn_ZeroFlowCal_Start.UseVisualStyleBackColor = true;
this.btn_ZeroFlowCal_Start.Click += new System.EventHandler(this.btn_ZeroFlowCal_Start_Click);
//
// btn_ZeroFlowCal_Pdf
//
this.btn_ZeroFlowCal_Pdf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_ZeroFlowCal_Pdf.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ZeroFlowCal_Pdf.Location = new System.Drawing.Point(846, 529);
this.btn_ZeroFlowCal_Pdf.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_ZeroFlowCal_Pdf.Name = "btn_ZeroFlowCal_Pdf";
this.btn_ZeroFlowCal_Pdf.Size = new System.Drawing.Size(63, 38);
this.btn_ZeroFlowCal_Pdf.TabIndex = 91;
this.btn_ZeroFlowCal_Pdf.Text = "PDF";
this.btn_ZeroFlowCal_Pdf.UseVisualStyleBackColor = true;
//
// btn_ZeroFlowCal_Save
//
this.btn_ZeroFlowCal_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_ZeroFlowCal_Save.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ZeroFlowCal_Save.Location = new System.Drawing.Point(779, 529);
this.btn_ZeroFlowCal_Save.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_ZeroFlowCal_Save.Name = "btn_ZeroFlowCal_Save";
this.btn_ZeroFlowCal_Save.Size = new System.Drawing.Size(63, 38);
this.btn_ZeroFlowCal_Save.TabIndex = 90;
this.btn_ZeroFlowCal_Save.Text = "Save";
this.btn_ZeroFlowCal_Save.UseVisualStyleBackColor = true;
//
// btn_ZeroFlowCal_Clear
//
this.btn_ZeroFlowCal_Clear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn_ZeroFlowCal_Clear.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ZeroFlowCal_Clear.Location = new System.Drawing.Point(779, 571);
this.btn_ZeroFlowCal_Clear.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_ZeroFlowCal_Clear.Name = "btn_ZeroFlowCal_Clear";
this.btn_ZeroFlowCal_Clear.Size = new System.Drawing.Size(130, 28);
this.btn_ZeroFlowCal_Clear.TabIndex = 89;
this.btn_ZeroFlowCal_Clear.Text = "Clear";
this.btn_ZeroFlowCal_Clear.UseVisualStyleBackColor = true;
//
// btn_ZeroFlowCal_Detect
//
this.btn_ZeroFlowCal_Detect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_ZeroFlowCal_Detect.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_ZeroFlowCal_Detect.Location = new System.Drawing.Point(291, 44);
this.btn_ZeroFlowCal_Detect.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_ZeroFlowCal_Detect.Name = "btn_ZeroFlowCal_Detect";
this.btn_ZeroFlowCal_Detect.Size = new System.Drawing.Size(102, 51);
this.btn_ZeroFlowCal_Detect.TabIndex = 82;
this.btn_ZeroFlowCal_Detect.Text = "DETECT";
this.btn_ZeroFlowCal_Detect.UseVisualStyleBackColor = true;
this.btn_ZeroFlowCal_Detect.Click += new System.EventHandler(this.btn_ZeroFlowCal_Detect_Click);
//
// gB_MeterLog
//
this.gB_MeterLog.Controls.Add(this.btn_ShowAll);
this.gB_MeterLog.Controls.Add(this.rTB_ZeroFlowCalMeter);
this.gB_MeterLog.Location = new System.Drawing.Point(419, 275);
this.gB_MeterLog.Margin = new System.Windows.Forms.Padding(10, 10, 10, 10);
this.gB_MeterLog.Name = "gB_MeterLog";
this.gB_MeterLog.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.gB_MeterLog.Size = new System.Drawing.Size(532, 193);
this.gB_MeterLog.TabIndex = 72;
this.gB_MeterLog.TabStop = false;
this.gB_MeterLog.Text = "Meters";
this.gB_MeterLog.Visible = false;
//
// btn_ShowAll
//
this.btn_ShowAll.Location = new System.Drawing.Point(5, 14);
this.btn_ShowAll.Name = "btn_ShowAll";
this.btn_ShowAll.Size = new System.Drawing.Size(123, 20);
this.btn_ShowAll.TabIndex = 97;
this.btn_ShowAll.Text = "ShowAll";
this.btn_ShowAll.UseVisualStyleBackColor = true;
this.btn_ShowAll.Click += new System.EventHandler(this.btn_ShowAll_Click);
//
// rTB_ZeroFlowCalMeter
//
this.rTB_ZeroFlowCalMeter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rTB_ZeroFlowCalMeter.Location = new System.Drawing.Point(4, 39);
this.rTB_ZeroFlowCalMeter.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rTB_ZeroFlowCalMeter.Name = "rTB_ZeroFlowCalMeter";
this.rTB_ZeroFlowCalMeter.ReadOnly = true;
this.rTB_ZeroFlowCalMeter.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.rTB_ZeroFlowCalMeter.Size = new System.Drawing.Size(516, 139);
this.rTB_ZeroFlowCalMeter.TabIndex = 96;
this.rTB_ZeroFlowCalMeter.Text = "";
//
// pB_ZeroFlowCal_SubProgress
//
this.pB_ZeroFlowCal_SubProgress.Location = new System.Drawing.Point(8, 612);
this.pB_ZeroFlowCal_SubProgress.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.pB_ZeroFlowCal_SubProgress.Name = "pB_ZeroFlowCal_SubProgress";
this.pB_ZeroFlowCal_SubProgress.Size = new System.Drawing.Size(724, 18);
this.pB_ZeroFlowCal_SubProgress.Step = 1;
this.pB_ZeroFlowCal_SubProgress.TabIndex = 92;
//
// l_ZeroFlowCal_SubResttimeDisplayValue
//
this.l_ZeroFlowCal_SubResttimeDisplayValue.AutoSize = true;
this.l_ZeroFlowCal_SubResttimeDisplayValue.Location = new System.Drawing.Point(845, 617);
this.l_ZeroFlowCal_SubResttimeDisplayValue.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_ZeroFlowCal_SubResttimeDisplayValue.Name = "l_ZeroFlowCal_SubResttimeDisplayValue";
this.l_ZeroFlowCal_SubResttimeDisplayValue.Size = new System.Drawing.Size(49, 13);
this.l_ZeroFlowCal_SubResttimeDisplayValue.TabIndex = 94;
this.l_ZeroFlowCal_SubResttimeDisplayValue.Text = "00:00:00";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(736, 616);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(105, 13);
this.label2.TabIndex = 93;
this.label2.Text = "Est. finish Proccess: ";
//
// rTB_ZeroFlowCal
//
this.rTB_ZeroFlowCal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.rTB_ZeroFlowCal.Location = new System.Drawing.Point(419, 280);
this.rTB_ZeroFlowCal.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rTB_ZeroFlowCal.Name = "rTB_ZeroFlowCal";
this.rTB_ZeroFlowCal.ReadOnly = true;
this.rTB_ZeroFlowCal.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.rTB_ZeroFlowCal.Size = new System.Drawing.Size(528, 193);
this.rTB_ZeroFlowCal.TabIndex = 101;
this.rTB_ZeroFlowCal.Text = "";
//
// l_SettingsPreparationMetersize
//
this.l_SettingsPreparationMetersize.AutoSize = true;
this.l_SettingsPreparationMetersize.Location = new System.Drawing.Point(416, 72);
this.l_SettingsPreparationMetersize.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.l_SettingsPreparationMetersize.Name = "l_SettingsPreparationMetersize";
this.l_SettingsPreparationMetersize.Size = new System.Drawing.Size(55, 13);
this.l_SettingsPreparationMetersize.TabIndex = 104;
this.l_SettingsPreparationMetersize.Text = "Metersize:";
//
// cb_Metersize
//
this.cb_Metersize.FormattingEnabled = true;
this.cb_Metersize.Location = new System.Drawing.Point(476, 66);
this.cb_Metersize.Name = "cb_Metersize";
this.cb_Metersize.Size = new System.Drawing.Size(73, 21);
this.cb_Metersize.TabIndex = 105;
//
// lblBuildDate
//
this.lblBuildDate.AutoSize = true;
this.lblBuildDate.Location = new System.Drawing.Point(779, 88);
this.lblBuildDate.Name = "lblBuildDate";
this.lblBuildDate.Size = new System.Drawing.Size(10, 13);
this.lblBuildDate.TabIndex = 106;
this.lblBuildDate.Text = "-";
//
// PreAdjustmentControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.lblBuildDate);
this.Controls.Add(this.cb_Metersize);
this.Controls.Add(this.l_SettingsPreparationMetersize);
this.Controls.Add(this.rTB_ZeroFlowCal);
this.Controls.Add(this.l_ZeroFlowCal_SubResttimeDisplayValue);
this.Controls.Add(this.label2);
this.Controls.Add(this.pB_ZeroFlowCal_SubProgress);
this.Controls.Add(this.gB_MeterLog);
this.Controls.Add(this.gB_TempMeters);
this.Controls.Add(this.btn_ZeroFlowCal_Pdf);
this.Controls.Add(this.btn_ZeroFlowCal_Save);
this.Controls.Add(this.btn_ZeroFlowCal_Clear);
this.Controls.Add(this.btn_ZeroFlowCal_Abort);
this.Controls.Add(this.l_ZeroFlowCal_ResttimeDisplayValue);
this.Controls.Add(this.pB_ZeroFlowCal_Progress);
this.Controls.Add(this.btn_ZeroFlowCal_Start);
this.Controls.Add(this.l_ZeroFlowCal_Resttime);
this.Controls.Add(this.btn_ZeroFlowCal_Detect);
this.Controls.Add(this.l_ZeroFlowCal_Status);
this.Controls.Add(this.gB_Progress);
this.Controls.Add(this.pB_Logo1);
this.Controls.Add(this.gB_Meters);
this.Controls.Add(this.pB_Bubbles1);
this.Name = "PreAdjustmentControl";
this.Size = new System.Drawing.Size(970, 674);
this.Load += new System.EventHandler(this.PreAdjustmentControl_Load);
((System.ComponentModel.ISupportInitialize)(this.pB_Logo1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pB_Bubbles1)).EndInit();
this.gB_Progress.ResumeLayout(false);
this.p_ZeroFlowCal_Completion.ResumeLayout(false);
this.p_ZeroFlowCal_Completion.PerformLayout();
this.p_ZeroFlowCal_Offset.ResumeLayout(false);
this.p_ZeroFlowCal_Offset.PerformLayout();
this.p_ZeroFlowCal_Detect.ResumeLayout(false);
this.p_ZeroFlowCal_Detect.PerformLayout();
this.p_ZeroFlowCal_TempCal.ResumeLayout(false);
this.p_ZeroFlowCal_TempCal.PerformLayout();
this.p_ZeroFlowCal_Prepare.ResumeLayout(false);
this.p_ZeroFlowCal_Prepare.PerformLayout();
this.p_ZeroFlowCal_Amplitude.ResumeLayout(false);
this.p_ZeroFlowCal_Amplitude.PerformLayout();
this.gB_TempMeters.ResumeLayout(false);
this.gB_MeterLog.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pB_Logo1;
private System.Windows.Forms.GroupBox gB_Meters;
private System.Windows.Forms.PictureBox pB_Bubbles1;
private System.Windows.Forms.Label l_ZeroFlowCal_Status;
private System.Windows.Forms.GroupBox gB_Progress;
private System.Windows.Forms.Panel p_ZeroFlowCal_Completion;
private System.Windows.Forms.Label l_ZeroFlowCal_Completion;
private System.Windows.Forms.ProgressBar pB_ZeroFlowCal_Progress;
private System.Windows.Forms.Label l_ZeroFlowCal_ResttimeDisplayValue;
private System.Windows.Forms.Panel p_ZeroFlowCal_Offset;
private System.Windows.Forms.Label l_ZeroFlowCal_Offset;
private System.Windows.Forms.Label l_ZeroFlowCal_Resttime;
private System.Windows.Forms.Panel p_ZeroFlowCal_Detect;
private System.Windows.Forms.Label l_ZeroFlowCal_Detect;
private System.Windows.Forms.Panel p_ZeroFlowCal_TempCal;
private System.Windows.Forms.Label l_ZeroFlowCal_TempCal;
private System.Windows.Forms.Panel p_ZeroFlowCal_Prepare;
private System.Windows.Forms.Label l_ZeroFlowCal_Prepare;
private System.Windows.Forms.Panel p_ZeroFlowCal_Amplitude;
private System.Windows.Forms.Label l_ZeroFlowCal_Amplitude;
private System.Windows.Forms.Button btn_ZeroFlowCal_Abort;
private System.Windows.Forms.Button btn_ZeroFlowCal_Start;
private System.Windows.Forms.Button btn_ZeroFlowCal_Pdf;
private System.Windows.Forms.Button btn_ZeroFlowCal_Save;
private System.Windows.Forms.Button btn_ZeroFlowCal_Clear;
private System.Windows.Forms.Button btn_ZeroFlowCal_Detect;
private System.Windows.Forms.GroupBox gB_TempMeters;
private System.Windows.Forms.CheckBox cB_ZeroFlowOffsetTestEnable;
private System.Windows.Forms.CheckBox cB_TempCalEnable;
private System.Windows.Forms.CheckBox cB_AmplitudeTestEnable;
private System.Windows.Forms.Button btn_StoreTempe;
private System.Windows.Forms.GroupBox gB_MeterLog;
private System.Windows.Forms.RichTextBox rTB_ZeroFlowCalMeter;
private System.Windows.Forms.ProgressBar pB_ZeroFlowCal_SubProgress;
private System.Windows.Forms.Label l_ZeroFlowCal_SubResttimeDisplayValue;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btn_ShowAll;
private System.Windows.Forms.RichTextBox rTB_ZeroFlowCal;
private System.Windows.Forms.Label l_SettingsPreparationMetersize;
private System.Windows.Forms.ComboBox cb_Metersize;
private System.Windows.Forms.Label lblBuildDate;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4267,6 +4267,10 @@
<Project>{32817bf9-e380-4467-9c7f-936f4b122bc7}</Project>
<Name>GenCode128</Name>
</ProjectReference>
<ProjectReference Include="..\GenesisCordonelTester\GenesisCordonelInterface.csproj">
<Project>{c955d8ac-76b8-42d8-a83f-8aeb56cf2567}</Project>
<Name>GenesisCordonelInterface</Name>
</ProjectReference>
<ProjectReference Include="..\GraphLib\GraphLib.csproj">
<Project>{0C0A1F4D-1363-4544-A7C5-196C76D26CCA}</Project>
<Name>GraphLib</Name>