Support for certificates, calib. expiration dates and calendar in many components and in TBF.UI.Bench.Metrology
This commit is contained in:
parent
bc2804d0b9
commit
3cbc845183
@ -8,13 +8,14 @@ using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo
|
||||
public class Component : ComponentBase, GenericDevices.IBenchInfo, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("BenchInfo.iPerl({0})", Cfg.ToString(1)); }
|
||||
@ -43,5 +44,37 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
Events.DB.SetBenchName(myCfg.TestBenchName);
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -13,7 +13,7 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -37,6 +37,27 @@ namespace TBF.BenchControl.DataContainers.BenchInfo.iPerl
|
||||
public Side Side;
|
||||
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds measured (true) buoyancy value.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase
|
||||
public class Component : ComponentBase, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
|
||||
@ -35,5 +37,36 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -24,6 +24,27 @@ namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
///
|
||||
public double Buoyancy;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Density
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds measured (true) density value.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase
|
||||
public class Component : ComponentBase, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
|
||||
@ -38,5 +40,36 @@ namespace TBF.BenchControl.DataContainers.Density
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -12,7 +12,7 @@ namespace TBF.BenchControl.DataContainers.Density
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -25,6 +25,27 @@ namespace TBF.BenchControl.DataContainers.Density
|
||||
public double RealDensity;
|
||||
public double AtTemperature;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
|
||||
|
||||
75
TBF/BenchControl/DataContainers/Evaporation/Component.cs
Normal file
75
TBF/BenchControl/DataContainers/Evaporation/Component.cs
Normal file
@ -0,0 +1,75 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
public class Component : ComponentBase, IEvaporation, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
readonly EvaporationCfg myCfg;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
|
||||
/// </summary>
|
||||
public double EvaporationRate(double temperature)
|
||||
{
|
||||
return Config.Formulas.GetCorrection(temperature, Corrections) / 3600.0; /// Converted from kg/h to kg/s
|
||||
}
|
||||
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as EvaporationCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = myCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class EvaporationCfg : ComponentCfgBase, Generic.IComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(EvaporationCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl() { return new EvaporationCfgCtrl(); }
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EvaporationCfg() {}
|
||||
|
||||
public EvaporationCfg(string name, IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
Name = name;
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
}
|
||||
public string ToString(int i)
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
public partial class EvaporationCfgCtrl : UserControl, IComponentCfgCtrl
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
EvaporationCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as EvaporationCfg;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
|
||||
public EvaporationCfgCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EntryFormCfgCtrl_Load(object sender, EventArgs e)
|
||||
{
|
||||
Redraw();
|
||||
}
|
||||
|
||||
public void Closing()
|
||||
{
|
||||
}
|
||||
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
nameTextBox.Enabled = true;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags VerifyCfg(ref string message)
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.None;
|
||||
return flags;
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateCfg()
|
||||
{
|
||||
CfgUpdateFlags flags = CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
if (config == null) return CfgUpdateFlags.Error; /// Control was not loaded, settings were not changed
|
||||
|
||||
config.Name = nameTextBox.Text;
|
||||
|
||||
return flags;
|
||||
}
|
||||
}
|
||||
}
|
||||
86
TBF/BenchControl/DataContainers/Evaporation/EvaporationCfgCtrl.designer.cs
generated
Normal file
86
TBF/BenchControl/DataContainers/Evaporation/EvaporationCfgCtrl.designer.cs
generated
Normal file
@ -0,0 +1,86 @@
|
||||
///
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
partial class EvaporationCfgCtrl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.nameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.classNameLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// nameTextBox
|
||||
//
|
||||
this.nameTextBox.Enabled = false;
|
||||
this.nameTextBox.Location = new System.Drawing.Point(137, 57);
|
||||
this.nameTextBox.Name = "nameTextBox";
|
||||
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
|
||||
this.nameTextBox.TabIndex = 5;
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
this.nameLabel.AutoSize = true;
|
||||
this.nameLabel.Location = new System.Drawing.Point(27, 60);
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
this.nameLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.nameLabel.TabIndex = 4;
|
||||
this.nameLabel.Text = "Name";
|
||||
//
|
||||
// classNameLabel
|
||||
//
|
||||
this.classNameLabel.AutoSize = true;
|
||||
this.classNameLabel.Location = new System.Drawing.Point(134, 33);
|
||||
this.classNameLabel.Name = "classNameLabel";
|
||||
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.classNameLabel.TabIndex = 3;
|
||||
this.classNameLabel.Text = "ComonentName";
|
||||
//
|
||||
// BasicPrinterCfgCtrl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.nameTextBox);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.classNameLabel);
|
||||
this.Name = "BasicPrinterCfgCtrl";
|
||||
this.Size = new System.Drawing.Size(300, 200);
|
||||
this.Load += new System.EventHandler(this.EntryFormCfgCtrl_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox nameTextBox;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Label classNameLabel;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@ -1,11 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.Configs.NameOnly;
|
||||
|
||||
namespace TBF.BenchControl.Various.Evaporation
|
||||
namespace TBF.BenchControl.DataContainers.Evaporation
|
||||
{
|
||||
public class Factory : IComponentFactory
|
||||
{
|
||||
@ -17,11 +16,11 @@ namespace TBF.BenchControl.Various.Evaporation
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this.GetType().Namespace.Substring(25), this); }
|
||||
public IComponentCfg DefaultConfig() { return new EvaporationCfg(this.GetType().Namespace.Substring(32), this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||
return ComponentCfgBase.CreateFromDbEntity(EvaporationCfg.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,7 @@ using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.Diverter
|
||||
{
|
||||
public class Diverter : ComponentBase, IDevice, GenericDevices.IDiverter, GenericDevices.ISequenceCondition
|
||||
public class Diverter : ComponentBase, IDevice, GenericDevices.IDiverter, GenericDevices.ISequenceCondition, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Diverter));
|
||||
public override string ToString() { return string.Format("Diverter({0})", Cfg.ToString(1)); }
|
||||
@ -148,6 +148,40 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = diverterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// IDevice interface implementation
|
||||
|
||||
@ -87,7 +87,7 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
DateTime calibrationDue = flowMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > DateTime.MinValue.AddDays(36))
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
@ -52,6 +53,38 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = pressureMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the water pressure
|
||||
/// </summary>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -24,6 +24,26 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
public MeretProtocol Protocol; /// Meret or Modbus
|
||||
public byte RS485Address; /// 0..255
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
PressureMeterCfg()
|
||||
{
|
||||
|
||||
@ -7,10 +7,11 @@ using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
{
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter
|
||||
public class PressureMeter : ComponentBase, GenericDevices.IPressureMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(PressureMeter));
|
||||
public override string ToString() { return string.Format("PressureMeter({0})", Cfg.ToString(1)); }
|
||||
@ -44,6 +45,39 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = pressureMeterCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Events: PressureDone, Error
|
||||
/// </summary>
|
||||
|
||||
@ -9,7 +9,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(PressureMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -27,6 +27,26 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
public float A4;
|
||||
public float A5;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
PressureMeterCfg()
|
||||
{
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeter
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@ -47,6 +48,38 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
if (Cfg.DebugLevel == Config.Entities.DebugMode.Normal)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -9,7 +9,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeter
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -27,6 +27,26 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
public double A5;
|
||||
public double DefaultTemperature;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TempMeterCfg()
|
||||
{
|
||||
|
||||
@ -6,10 +6,11 @@ using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl.Generic;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@ -42,6 +43,39 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(Idx0), Corrections);
|
||||
|
||||
@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -28,6 +28,27 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
public float A4;
|
||||
public float A5;
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TempMeterCfg()
|
||||
{
|
||||
|
||||
@ -5,10 +5,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("TempMeter({0})", Cfg.ToString(1)); }
|
||||
@ -33,6 +34,39 @@ namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(tempMtrCfg.TempIdx0), Corrections);
|
||||
|
||||
@ -10,7 +10,7 @@ using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, Config.Entities.IParamsProvider, TBF.BenchControl.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@ -41,6 +41,27 @@ namespace TBF.BenchControl.Elde.TempMeterMeret
|
||||
public byte ModbusAddress; /// 1..247
|
||||
public int MeretIdx0; /// Meter pressure meters count .. (Meter pressure meters count + Meter temperature meters count - 1)
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
string calibCertificateNr;
|
||||
DateTime calibDate;
|
||||
DateTime calibValidDate;
|
||||
public string CalibCertificateNr
|
||||
{
|
||||
get { return calibCertificateNr; }
|
||||
set { calibCertificateNr = value; }
|
||||
}
|
||||
public DateTime CalibDate
|
||||
{
|
||||
get { return calibDate; }
|
||||
set { calibDate = value; }
|
||||
}
|
||||
public DateTime CalibValidDate
|
||||
{
|
||||
get { return calibValidDate; }
|
||||
set { calibValidDate = value; }
|
||||
}
|
||||
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TempMeterCfg()
|
||||
{
|
||||
|
||||
@ -9,13 +9,14 @@ using TBF.BenchControl.Generic;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
using TBF.Boxes;
|
||||
using TBF.BenchControl.Hart.Common;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Hart.Nivotrack
|
||||
{
|
||||
/// <summary>
|
||||
/// Root component for Modbus communication via serial port (RS485)
|
||||
/// </summary>
|
||||
public class Nivotrack : ComponentBase, IDevice, ILevelMeter, IOperation
|
||||
public class Nivotrack : ComponentBase, IDevice, ILevelMeter, IOperation, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
const int StableReadingsCount = 9;
|
||||
|
||||
@ -71,6 +72,40 @@ namespace TBF.BenchControl.Hart.Nivotrack
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = nivotrackCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (nivotrackCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2016-2020 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -7,10 +7,11 @@ using Config;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
using TBF.BenchControl.Keithley.Multimeter_2010_RS232;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.BenchControl.Keithley.TempMeter
|
||||
{
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter
|
||||
public class TempMeter : ComponentBase, GenericDevices.ITempMeter, GenericDevices.IHasCalendarEvents
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(TempMeter));
|
||||
public override string ToString() { return string.Format("Keithley.TempMeter({0})", Cfg.ToString(1)); }
|
||||
@ -45,6 +46,40 @@ namespace TBF.BenchControl.Keithley.TempMeter
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
DateTime calibrationDue = tempMtrCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat))));
|
||||
if (DateTime.Now.Date <= calibrationDue.AddDays(-7))
|
||||
{
|
||||
/// Weekly reminders (last 5 weeks)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.Date.AddDays(-35), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
false));
|
||||
}
|
||||
if (DateTime.Now.Date <= calibrationDue.Date)
|
||||
{
|
||||
/// Daily reminders (last 5 days)
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationReminderEvent(calibrationDue.AddDays(-5), Name,
|
||||
string.Format(Strings.Calibration_due_date_is_0,
|
||||
calibrationDue.Date.ToString(TBF.UI.Constants.DateFormat)),
|
||||
true));
|
||||
}
|
||||
}
|
||||
return calendarEvents;
|
||||
}
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
double resistance = Multimeter.ReadResistance(tempMtrCfg.Channel);
|
||||
|
||||
@ -108,7 +108,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
{
|
||||
drainValveComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
else if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is Various.Evaporation.Factory)
|
||||
else if (TbfComponents.CmpntFactoryFromClassName(cmpnt.ClassName) is DataContainers.Evaporation.Factory)
|
||||
{
|
||||
evaporationComboBox.Items.Add(cmpnt.Name);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard
|
||||
DateTime calibrationDue = balanceCfg.CalibValidDate;
|
||||
IList<Config.CalendarEvent.ICalendarEvent> calendarEvents = new List<Config.CalendarEvent.ICalendarEvent>();
|
||||
|
||||
if (calibrationDue > DateTime.MinValue.AddDays(36))
|
||||
if (calibrationDue > TBF.UI.Constants.MinDate)
|
||||
{
|
||||
/// Calibration due date calendar event
|
||||
calendarEvents.Add(new TBF.UI.Calendar.CalibrationDueDateEvent(calibrationDue.Date, Name,
|
||||
|
||||
@ -20,6 +20,7 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new DataContainers.BenchInfo.iPerl.ComponentFactory());
|
||||
Factories.Add(new DataContainers.Buoyancy.ComponentFactory());
|
||||
Factories.Add(new DataContainers.Density.ComponentFactory());
|
||||
Factories.Add(new DataContainers.Evaporation.Factory());
|
||||
Factories.Add(new Elde.ControlBoardFactory());
|
||||
Factories.Add(new Elde.CoverTest.Factory());
|
||||
Factories.Add(new DataEntry.Combined.EntryFormFactory());
|
||||
@ -183,7 +184,6 @@ namespace TBF.BenchControl
|
||||
Factories.Add(new Elde.Valve.ValveFactory());
|
||||
Factories.Add(new Elde.ValveEx.ValveFactory());
|
||||
Factories.Add(new Various.ErrorFlags.Factory());
|
||||
Factories.Add(new Various.Evaporation.Factory());
|
||||
Factories.Add(new Various.StatisticsMonitoring.Factory());
|
||||
Factories.Add(new Various.TankWithLevelMsrmnt.Factory());
|
||||
Factories.Add(new WaterMeters.Munich.WaterMeterFactory()); /// 'WaterMeters.Munich'
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.BenchControl.GenericDevices;
|
||||
|
||||
namespace TBF.BenchControl.Various.Evaporation
|
||||
{
|
||||
public class Component : ComponentBase, IEvaporation
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For a given temperature in [°C] returns an evaporation rate in [kg/s]
|
||||
/// </summary>
|
||||
public double EvaporationRate(double temperature)
|
||||
{
|
||||
return Config.Formulas.GetCorrection(temperature, Corrections) / 3600.0; /// Converted from kg/h to kg/s
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1638,4 +1638,7 @@
|
||||
<data name="All_day" xml:space="preserve">
|
||||
<value>Celý den</value>
|
||||
</data>
|
||||
<data name="Certificate" xml:space="preserve">
|
||||
<value>Certifikát</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -199,6 +199,15 @@
|
||||
<Compile Include="BenchControl\DataContainers\Density\Component.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Density\ComponentCfg.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Density\ComponentFactory.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\Component.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\EvaporationCfg.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\Factory.cs" />
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\EvaporationCfgCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataContainers\Evaporation\EvaporationCfgCtrl.designer.cs">
|
||||
<DependentUpon>EvaporationCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BenchControl\DataEntry\Combined\TestStartEndForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -1573,8 +1582,6 @@
|
||||
<Compile Include="BenchControl\Various\ErrorFlags\TestParams.cs" />
|
||||
<Compile Include="BenchControl\Various\ErrorFlags\Errors.cs" />
|
||||
<Compile Include="BenchControl\Various\ErrorFlags\ErrorsCfg.cs" />
|
||||
<Compile Include="BenchControl\Various\Evaporation\Component.cs" />
|
||||
<Compile Include="BenchControl\Various\Evaporation\Factory.cs" />
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\ManualLevelMsrmnt.cs" />
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\Factory.cs" />
|
||||
<Compile Include="BenchControl\Various\ManualLevelMsrmnt\WaterLevelForm.cs">
|
||||
@ -2560,6 +2567,9 @@
|
||||
<EmbeddedResource Include="BenchControl\Danfoss\VLT2800\PumpCfgCtrl.resx">
|
||||
<DependentUpon>PumpCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BenchControl\DataContainers\Evaporation\EvaporationCfgCtrl.resx">
|
||||
<DependentUpon>EvaporationCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BenchControl\DataEntry\Combined\CycleBeginningForm.resx">
|
||||
<DependentUpon>CycleBeginningForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@ -136,7 +136,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgPressMeterTab uiControl = new MetrologyDlgPressMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
metrologyTabControl.TabPages.Add(tabPage);
|
||||
@ -150,6 +151,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
MetrologyDlgTempMeterTab uiControl = new MetrologyDlgTempMeterTab();
|
||||
uiControl.MeterEntity = cmpnt;
|
||||
uiControl.CalibInfoCfg = factory.CmpntCfgFromCmpntEntity(cmpnt) as BenchControl.GenericDevices.ICalibInfoCfg;
|
||||
uiControl.Dock = DockStyle.Fill;
|
||||
tabPage.Tag = uiControl;
|
||||
tabPage.Controls.Add(uiControl);
|
||||
@ -199,7 +201,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
}
|
||||
|
||||
/// Tab-pages for water tank evaporation rates
|
||||
if (factory is BenchControl.Various.Evaporation.Factory)
|
||||
if (factory is BenchControl.DataContainers.Evaporation.Factory)
|
||||
{
|
||||
evaporationsCount++;
|
||||
TabPage tabPage = new TabPage(" " + cmpnt.Name + " ");
|
||||
|
||||
@ -34,9 +34,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@ -101,9 +101,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@ -114,13 +114,25 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 17;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 16;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
@ -131,14 +143,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@ -388,11 +392,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.TextBox airDensityTextBox;
|
||||
private System.Windows.Forms.Label airDensityLabel;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -52,7 +52,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgBalanceTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
@ -110,8 +114,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (BalanceCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = BalanceCfg.CalibCertificateNr;
|
||||
calibDateTextBox.Text = BalanceCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = BalanceCfg.CalibValidDate.ToShortDateString();
|
||||
calibDateTimePicker.Value = (BalanceCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : BalanceCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (BalanceCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : BalanceCfg.CalibValidDate;
|
||||
|
||||
buoyancyTempTextBox.Text = BalanceCfg.BuoyancyTemp.ToString("F2");
|
||||
buoyancyPressTextBox.Text = BalanceCfg.BuoyancyPress.ToString("F4");
|
||||
@ -245,8 +249,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
buoyancyTempTextBox.Enabled = true;
|
||||
buoyancyPressTextBox.Enabled = true;
|
||||
@ -269,8 +273,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
BalanceCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
BalanceCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
BalanceCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
BalanceCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
BalanceCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
BalanceCfg.BuoyancyTemp = Utils.ParseSFloat(buoyancyTempTextBox.Text);
|
||||
BalanceCfg.BuoyancyPress = Utils.ParseUFloat(buoyancyPressTextBox.Text);
|
||||
|
||||
@ -32,15 +32,23 @@ namespace TBF.UI.Bench.Metrology
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
this.densityCorrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.densityCorrLabel = new System.Windows.Forms.Label();
|
||||
this.temperatureTextBox = new System.Windows.Forms.TextBox();
|
||||
this.temperatureLabel = new System.Windows.Forms.Label();
|
||||
this.densityTextBox = new System.Windows.Forms.TextBox();
|
||||
this.densityLabel = new System.Windows.Forms.Label();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.calibrationGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@ -53,20 +61,71 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityCorrTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityCorrLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.temperatureTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.temperatureLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityTextBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.densityLabel);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(420, 300);
|
||||
this.splitContainer1.SplitterDistance = 120;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(554, 300);
|
||||
this.splitContainer1.SplitterDistance = 110;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
this.calibrationGroupBox.Location = new System.Drawing.Point(323, 16);
|
||||
this.calibrationGroupBox.Name = "calibrationGroupBox";
|
||||
this.calibrationGroupBox.Size = new System.Drawing.Size(208, 86);
|
||||
this.calibrationGroupBox.TabIndex = 7;
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 62);
|
||||
this.calibValidDateLabel.Name = "calibValidDateLabel";
|
||||
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
this.calibDateLabel.Location = new System.Drawing.Point(17, 40);
|
||||
this.calibDateLabel.Name = "calibDateLabel";
|
||||
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.calibDateLabel.TabIndex = 12;
|
||||
this.calibDateLabel.Text = "Date";
|
||||
//
|
||||
// calibCertificateNrTextBox
|
||||
//
|
||||
this.calibCertificateNrTextBox.Enabled = false;
|
||||
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(120, 15);
|
||||
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
|
||||
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibCertificateNrTextBox.TabIndex = 11;
|
||||
//
|
||||
// calibCertificateNrLabel
|
||||
//
|
||||
this.calibCertificateNrLabel.AutoSize = true;
|
||||
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
|
||||
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
|
||||
this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.calibCertificateNrLabel.TabIndex = 10;
|
||||
this.calibCertificateNrLabel.Text = "Certificate";
|
||||
//
|
||||
// densityCorrTextBox
|
||||
//
|
||||
this.densityCorrTextBox.Enabled = false;
|
||||
this.densityCorrTextBox.Location = new System.Drawing.Point(185, 86);
|
||||
this.densityCorrTextBox.Location = new System.Drawing.Point(185, 81);
|
||||
this.densityCorrTextBox.Name = "densityCorrTextBox";
|
||||
this.densityCorrTextBox.Size = new System.Drawing.Size(110, 20);
|
||||
this.densityCorrTextBox.TabIndex = 5;
|
||||
@ -74,7 +133,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
// densityCorrLabel
|
||||
//
|
||||
this.densityCorrLabel.AutoSize = true;
|
||||
this.densityCorrLabel.Location = new System.Drawing.Point(37, 89);
|
||||
this.densityCorrLabel.Location = new System.Drawing.Point(37, 84);
|
||||
this.densityCorrLabel.Name = "densityCorrLabel";
|
||||
this.densityCorrLabel.Size = new System.Drawing.Size(132, 13);
|
||||
this.densityCorrLabel.TabIndex = 4;
|
||||
@ -116,18 +175,40 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.densityLabel.TabIndex = 0;
|
||||
this.densityLabel.Text = "Density [kg/m3]";
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgDensityTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgDensityTab";
|
||||
this.Size = new System.Drawing.Size(420, 300);
|
||||
this.Size = new System.Drawing.Size(554, 300);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgDensityTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.calibrationGroupBox.ResumeLayout(false);
|
||||
this.calibrationGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -141,5 +222,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label densityLabel;
|
||||
private System.Windows.Forms.TextBox densityCorrTextBox;
|
||||
private System.Windows.Forms.Label densityCorrLabel;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgDensityTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
@ -56,6 +60,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
parent = ParentForm as MetrologyDlg;
|
||||
|
||||
Localize();
|
||||
|
||||
/// Panel1
|
||||
densityLabel.Text = string.Format("{0} [{1}]", Strings.Density, Config.Unit.kgpm3.ToDescription());
|
||||
temperatureLabel.Text = string.Format("{0} [{1}]", Strings.At_temperature, Config.Unit.C.ToDescription());
|
||||
@ -66,12 +72,26 @@ namespace TBF.UI.Bench.Metrology
|
||||
RefreshAll();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
calibrationGroupBox.Text = Strings.Calibration;
|
||||
calibCertificateNrLabel.Text = Strings.Certificate;
|
||||
calibDateLabel.Text = Strings.Date;
|
||||
calibValidDateLabel.Text = Strings.Valid_until;
|
||||
}
|
||||
|
||||
void RefreshAll()
|
||||
{
|
||||
densityTextBox.Text = Config.Data.RealDensity.ToString("F4");
|
||||
temperatureTextBox.Text = Config.Data.AtTemperature.ToString("F2");
|
||||
densityCorrTextBox.Text = Config.Formulas.DensityCorrection(Config.Data.RealDensity, Config.Data.AtTemperature).ToString("F5");
|
||||
}
|
||||
if (DensityCfg != null)
|
||||
{
|
||||
densityTextBox.Text = Config.Data.RealDensity.ToString("F4");
|
||||
temperatureTextBox.Text = Config.Data.AtTemperature.ToString("F2");
|
||||
densityCorrTextBox.Text = Config.Formulas.DensityCorrection(Config.Data.RealDensity, Config.Data.AtTemperature).ToString("F5");
|
||||
calibCertificateNrTextBox.Text = DensityCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (DensityCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : DensityCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (DensityCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : DensityCfg.CalibValidDate;
|
||||
}
|
||||
}
|
||||
|
||||
public void Unlock()
|
||||
{
|
||||
@ -79,6 +99,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
densityTextBox.Enabled = true;
|
||||
temperatureTextBox.Enabled = true;
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
}
|
||||
|
||||
public void OkBtnClicked()
|
||||
@ -95,6 +118,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
Results.WMeterRsltItemSpec.AtTemperature =
|
||||
Config.Data.AtTemperature = DensityCfg.AtTemperature = atTemperature;
|
||||
DensityCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
DensityCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
DensityCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = DensityCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
@ -33,9 +33,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@ -49,6 +47,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@ -94,14 +94,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@ -111,14 +103,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@ -244,12 +228,32 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// MetrologyDlgLevelMeterTab
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgDiverterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgLevelMeterTab";
|
||||
this.Name = "MetrologyDlgDiverterTab";
|
||||
this.Size = new System.Drawing.Size(650, 400);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgDiverterTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@ -278,14 +282,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgDiverterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgDiverterTab_Load(object sender, System.EventArgs e)
|
||||
@ -107,8 +112,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@ -205,8 +210,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@ -224,8 +229,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
@ -33,9 +33,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@ -49,6 +47,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@ -94,14 +94,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@ -111,14 +103,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@ -244,12 +228,32 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// MetrologyDlgLevelMeterTab
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgEvaporationTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgLevelMeterTab";
|
||||
this.Name = "MetrologyDlgEvaporationTab";
|
||||
this.Size = new System.Drawing.Size(650, 400);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgEvaporationTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
@ -278,14 +282,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgEvaporationTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgEvaporationTab_Load(object sender, System.EventArgs e)
|
||||
@ -107,8 +112,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@ -205,8 +210,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@ -224,8 +229,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
@ -33,9 +33,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@ -49,6 +47,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@ -94,14 +94,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@ -111,14 +103,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@ -244,6 +228,26 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgFlowMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -278,14 +282,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,8 +56,13 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgFlowMeterTab(int rangeIx1)
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
this.rangeIx = rangeIx1;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgFlowMeterTab_Load(object sender, System.EventArgs e)
|
||||
@ -121,8 +126,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.GetCalibCertificate(rangeIx1);
|
||||
calibDateTextBox.Text = CalibInfoCfg.GetCalibDate(rangeIx1).ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.GetCalibValidDate(rangeIx1).ToShortDateString();
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.GetCalibDate(rangeIx1) < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.GetCalibDate(rangeIx1);
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.GetCalibValidDate(rangeIx1) < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.GetCalibValidDate(rangeIx1);
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@ -253,8 +258,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@ -272,8 +277,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.SetCalibCertificate(rangeIx, calibCertificateNrTextBox.Text);
|
||||
CalibInfoCfg.SetCalibDate(rangeIx, DateTime.Parse(calibDateTextBox.Text));
|
||||
CalibInfoCfg.SetCalibValidDate(rangeIx, DateTime.Parse(calibValidDateTextBox.Text));
|
||||
CalibInfoCfg.SetCalibDate(rangeIx, calibDateTimePicker.Value.Date);
|
||||
CalibInfoCfg.SetCalibValidDate(rangeIx, calibExpirationDateTimePicker.Value.Date);
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
@ -33,9 +33,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
@ -49,6 +47,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -81,9 +81,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
@ -94,14 +94,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
@ -111,14 +103,6 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
@ -244,6 +228,26 @@ namespace TBF.UI.Bench.Metrology
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(140, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(140, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgLevelMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -278,14 +282,14 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox nameGroupBox;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.Label pressFromToLabel;
|
||||
private System.Windows.Forms.Label tempFromToLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,7 +52,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgLevelMeterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgLevelMeterTab_Load(object sender, System.EventArgs e)
|
||||
@ -107,8 +112,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTextBox.Text = CalibInfoCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = CalibInfoCfg.CalibValidDate.ToShortDateString();
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
@ -205,8 +210,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
@ -224,8 +229,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
CalibInfoCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
|
||||
@ -31,398 +31,402 @@ namespace TBF.UI.Bench.Metrology
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.temperatureTextBox = new System.Windows.Forms.TextBox();
|
||||
this.resistanceLabel = new System.Windows.Forms.Label();
|
||||
this.temperatureLabel = new System.Windows.Forms.Label();
|
||||
this.resistanceTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
this.its90CalibrationCoefficientsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.c7TextBox = new System.Windows.Forms.TextBox();
|
||||
this.c7Label = new System.Windows.Forms.Label();
|
||||
this.b7TextBox = new System.Windows.Forms.TextBox();
|
||||
this.a7TextBox = new System.Windows.Forms.TextBox();
|
||||
this.r001cTextBox = new System.Windows.Forms.TextBox();
|
||||
this.b7Label = new System.Windows.Forms.Label();
|
||||
this.a7Label = new System.Windows.Forms.Label();
|
||||
this.r0Label = new System.Windows.Forms.Label();
|
||||
this.nameGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.its27CalibrationCoefficientsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.bTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.aTextBox = new System.Windows.Forms.TextBox();
|
||||
this.r0TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.calibrationGroupBox.SuspendLayout();
|
||||
this.its90CalibrationCoefficientsGroupBox.SuspendLayout();
|
||||
this.nameGroupBox.SuspendLayout();
|
||||
this.its27CalibrationCoefficientsGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmpntNameLabel
|
||||
//
|
||||
this.cmpntNameLabel.AutoSize = true;
|
||||
this.cmpntNameLabel.Location = new System.Drawing.Point(69, 16);
|
||||
this.cmpntNameLabel.Name = "cmpntNameLabel";
|
||||
this.cmpntNameLabel.Size = new System.Drawing.Size(64, 13);
|
||||
this.cmpntNameLabel.TabIndex = 0;
|
||||
this.cmpntNameLabel.Text = "cmpntName";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton2);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.its90CalibrationCoefficientsGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.nameGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.its27CalibrationCoefficientsGroupBox);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(668, 400);
|
||||
this.splitContainer1.SplitterDistance = 300;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(462, 24);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(187, 17);
|
||||
this.radioButton2.TabIndex = 11;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "Use ITS-27 calibration coefficients";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(235, 24);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(187, 17);
|
||||
this.radioButton1.TabIndex = 10;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "Use ITS-90 calibration coefficients";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.temperatureTextBox);
|
||||
this.testGroupBox.Controls.Add(this.resistanceLabel);
|
||||
this.testGroupBox.Controls.Add(this.temperatureLabel);
|
||||
this.testGroupBox.Controls.Add(this.resistanceTextBox);
|
||||
this.testGroupBox.Location = new System.Drawing.Point(16, 155);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.Size = new System.Drawing.Size(208, 77);
|
||||
this.testGroupBox.TabIndex = 9;
|
||||
this.testGroupBox.TabStop = false;
|
||||
this.testGroupBox.Text = "Test";
|
||||
//
|
||||
// temperatureTextBox
|
||||
//
|
||||
this.temperatureTextBox.Location = new System.Drawing.Point(121, 46);
|
||||
this.temperatureTextBox.Name = "temperatureTextBox";
|
||||
this.temperatureTextBox.ReadOnly = true;
|
||||
this.temperatureTextBox.Size = new System.Drawing.Size(79, 20);
|
||||
this.temperatureTextBox.TabIndex = 5;
|
||||
//
|
||||
// resistanceLabel
|
||||
//
|
||||
this.resistanceLabel.AutoSize = true;
|
||||
this.resistanceLabel.Location = new System.Drawing.Point(16, 23);
|
||||
this.resistanceLabel.Name = "resistanceLabel";
|
||||
this.resistanceLabel.Size = new System.Drawing.Size(78, 13);
|
||||
this.resistanceLabel.TabIndex = 2;
|
||||
this.resistanceLabel.Text = "Resistance [Ω]";
|
||||
//
|
||||
// temperatureLabel
|
||||
//
|
||||
this.temperatureLabel.AutoSize = true;
|
||||
this.temperatureLabel.Location = new System.Drawing.Point(16, 49);
|
||||
this.temperatureLabel.Name = "temperatureLabel";
|
||||
this.temperatureLabel.Size = new System.Drawing.Size(87, 13);
|
||||
this.temperatureLabel.TabIndex = 3;
|
||||
this.temperatureLabel.Text = "Temperature [°C]";
|
||||
//
|
||||
// resistanceTextBox
|
||||
//
|
||||
this.resistanceTextBox.Location = new System.Drawing.Point(121, 20);
|
||||
this.resistanceTextBox.Name = "resistanceTextBox";
|
||||
this.resistanceTextBox.Size = new System.Drawing.Size(79, 20);
|
||||
this.resistanceTextBox.TabIndex = 4;
|
||||
this.resistanceTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
this.calibrationGroupBox.Location = new System.Drawing.Point(16, 54);
|
||||
this.calibrationGroupBox.Name = "calibrationGroupBox";
|
||||
this.calibrationGroupBox.Size = new System.Drawing.Size(208, 95);
|
||||
this.calibrationGroupBox.TabIndex = 6;
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateTextBox
|
||||
//
|
||||
this.calibValidDateTextBox.Enabled = false;
|
||||
this.calibValidDateTextBox.Location = new System.Drawing.Point(105, 65);
|
||||
this.calibValidDateTextBox.Name = "calibValidDateTextBox";
|
||||
this.calibValidDateTextBox.Size = new System.Drawing.Size(95, 20);
|
||||
this.calibValidDateTextBox.TabIndex = 15;
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 68);
|
||||
this.calibValidDateLabel.Name = "calibValidDateLabel";
|
||||
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateTextBox
|
||||
//
|
||||
this.calibDateTextBox.Enabled = false;
|
||||
this.calibDateTextBox.Location = new System.Drawing.Point(105, 40);
|
||||
this.calibDateTextBox.Name = "calibDateTextBox";
|
||||
this.calibDateTextBox.Size = new System.Drawing.Size(95, 20);
|
||||
this.calibDateTextBox.TabIndex = 13;
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
this.calibDateLabel.Location = new System.Drawing.Point(17, 43);
|
||||
this.calibDateLabel.Name = "calibDateLabel";
|
||||
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.calibDateLabel.TabIndex = 12;
|
||||
this.calibDateLabel.Text = "Date";
|
||||
//
|
||||
// calibCertificateNrTextBox
|
||||
//
|
||||
this.calibCertificateNrTextBox.Enabled = false;
|
||||
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(105, 15);
|
||||
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
|
||||
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(95, 20);
|
||||
this.calibCertificateNrTextBox.TabIndex = 11;
|
||||
//
|
||||
// calibCertificateNrLabel
|
||||
//
|
||||
this.calibCertificateNrLabel.AutoSize = true;
|
||||
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
|
||||
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
|
||||
this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.calibCertificateNrLabel.TabIndex = 10;
|
||||
this.calibCertificateNrLabel.Text = "Certificate";
|
||||
//
|
||||
// its90CalibrationCoefficientsGroupBox
|
||||
//
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.c7TextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.c7Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.b7TextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.a7TextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.r001cTextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.b7Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.a7Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.r0Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Location = new System.Drawing.Point(230, 54);
|
||||
this.its90CalibrationCoefficientsGroupBox.Name = "its90CalibrationCoefficientsGroupBox";
|
||||
this.its90CalibrationCoefficientsGroupBox.Size = new System.Drawing.Size(220, 140);
|
||||
this.its90CalibrationCoefficientsGroupBox.TabIndex = 5;
|
||||
this.its90CalibrationCoefficientsGroupBox.TabStop = false;
|
||||
this.its90CalibrationCoefficientsGroupBox.Text = "ITS-90 calibration coefficients";
|
||||
//
|
||||
// c7TextBox
|
||||
//
|
||||
this.c7TextBox.Enabled = false;
|
||||
this.c7TextBox.Location = new System.Drawing.Point(82, 104);
|
||||
this.c7TextBox.Name = "c7TextBox";
|
||||
this.c7TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.c7TextBox.TabIndex = 7;
|
||||
//
|
||||
// c7Label
|
||||
//
|
||||
this.c7Label.AutoSize = true;
|
||||
this.c7Label.Location = new System.Drawing.Point(20, 107);
|
||||
this.c7Label.Name = "c7Label";
|
||||
this.c7Label.Size = new System.Drawing.Size(19, 13);
|
||||
this.c7Label.TabIndex = 6;
|
||||
this.c7Label.Text = "c7";
|
||||
//
|
||||
// b7TextBox
|
||||
//
|
||||
this.b7TextBox.Enabled = false;
|
||||
this.b7TextBox.Location = new System.Drawing.Point(82, 79);
|
||||
this.b7TextBox.Name = "b7TextBox";
|
||||
this.b7TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.b7TextBox.TabIndex = 5;
|
||||
//
|
||||
// a7TextBox
|
||||
//
|
||||
this.a7TextBox.Enabled = false;
|
||||
this.a7TextBox.Location = new System.Drawing.Point(82, 54);
|
||||
this.a7TextBox.Name = "a7TextBox";
|
||||
this.a7TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.a7TextBox.TabIndex = 4;
|
||||
//
|
||||
// r001cTextBox
|
||||
//
|
||||
this.r001cTextBox.Enabled = false;
|
||||
this.r001cTextBox.Location = new System.Drawing.Point(82, 29);
|
||||
this.r001cTextBox.Name = "r001cTextBox";
|
||||
this.r001cTextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.r001cTextBox.TabIndex = 3;
|
||||
//
|
||||
// b7Label
|
||||
//
|
||||
this.b7Label.AutoSize = true;
|
||||
this.b7Label.Location = new System.Drawing.Point(20, 82);
|
||||
this.b7Label.Name = "b7Label";
|
||||
this.b7Label.Size = new System.Drawing.Size(19, 13);
|
||||
this.b7Label.TabIndex = 2;
|
||||
this.b7Label.Text = "b7";
|
||||
//
|
||||
// a7Label
|
||||
//
|
||||
this.a7Label.AutoSize = true;
|
||||
this.a7Label.Location = new System.Drawing.Point(20, 57);
|
||||
this.a7Label.Name = "a7Label";
|
||||
this.a7Label.Size = new System.Drawing.Size(19, 13);
|
||||
this.a7Label.TabIndex = 1;
|
||||
this.a7Label.Text = "a7";
|
||||
//
|
||||
// r0Label
|
||||
//
|
||||
this.r0Label.AutoSize = true;
|
||||
this.r0Label.Location = new System.Drawing.Point(20, 32);
|
||||
this.r0Label.Name = "r0Label";
|
||||
this.r0Label.Size = new System.Drawing.Size(53, 13);
|
||||
this.r0Label.TabIndex = 0;
|
||||
this.r0Label.Text = "R(0.01°C)";
|
||||
//
|
||||
// nameGroupBox
|
||||
//
|
||||
this.nameGroupBox.Controls.Add(this.cmpntNameLabel);
|
||||
this.nameGroupBox.Location = new System.Drawing.Point(16, 10);
|
||||
this.nameGroupBox.Name = "nameGroupBox";
|
||||
this.nameGroupBox.Size = new System.Drawing.Size(208, 40);
|
||||
this.nameGroupBox.TabIndex = 4;
|
||||
this.nameGroupBox.TabStop = false;
|
||||
this.nameGroupBox.Text = "Component";
|
||||
//
|
||||
// its27CalibrationCoefficientsGroupBox
|
||||
//
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.bTextBox);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.label1);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.aTextBox);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.r0TextBox);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.label2);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.label3);
|
||||
this.its27CalibrationCoefficientsGroupBox.Location = new System.Drawing.Point(459, 54);
|
||||
this.its27CalibrationCoefficientsGroupBox.Name = "its27CalibrationCoefficientsGroupBox";
|
||||
this.its27CalibrationCoefficientsGroupBox.Size = new System.Drawing.Size(190, 140);
|
||||
this.its27CalibrationCoefficientsGroupBox.TabIndex = 3;
|
||||
this.its27CalibrationCoefficientsGroupBox.TabStop = false;
|
||||
this.its27CalibrationCoefficientsGroupBox.Text = "ITS-27 calibration coefficients";
|
||||
//
|
||||
// bTextBox
|
||||
//
|
||||
this.bTextBox.Enabled = false;
|
||||
this.bTextBox.Location = new System.Drawing.Point(52, 79);
|
||||
this.bTextBox.Name = "bTextBox";
|
||||
this.bTextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.bTextBox.TabIndex = 13;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(22, 82);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(14, 13);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "B";
|
||||
//
|
||||
// aTextBox
|
||||
//
|
||||
this.aTextBox.Enabled = false;
|
||||
this.aTextBox.Location = new System.Drawing.Point(52, 54);
|
||||
this.aTextBox.Name = "aTextBox";
|
||||
this.aTextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.aTextBox.TabIndex = 11;
|
||||
//
|
||||
// r0TextBox
|
||||
//
|
||||
this.r0TextBox.Enabled = false;
|
||||
this.r0TextBox.Location = new System.Drawing.Point(52, 29);
|
||||
this.r0TextBox.Name = "r0TextBox";
|
||||
this.r0TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.r0TextBox.TabIndex = 10;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(22, 57);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(14, 13);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "A";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(22, 32);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(21, 13);
|
||||
this.label3.TabIndex = 8;
|
||||
this.label3.Text = "R0";
|
||||
//
|
||||
// MetrologyDlgPlatinumResistanceTMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgPlatinumResistanceTMeterTab";
|
||||
this.Size = new System.Drawing.Size(668, 400);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgBalanceTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.testGroupBox.PerformLayout();
|
||||
this.calibrationGroupBox.ResumeLayout(false);
|
||||
this.calibrationGroupBox.PerformLayout();
|
||||
this.its90CalibrationCoefficientsGroupBox.ResumeLayout(false);
|
||||
this.its90CalibrationCoefficientsGroupBox.PerformLayout();
|
||||
this.nameGroupBox.ResumeLayout(false);
|
||||
this.nameGroupBox.PerformLayout();
|
||||
this.its27CalibrationCoefficientsGroupBox.ResumeLayout(false);
|
||||
this.its27CalibrationCoefficientsGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.temperatureTextBox = new System.Windows.Forms.TextBox();
|
||||
this.resistanceLabel = new System.Windows.Forms.Label();
|
||||
this.temperatureLabel = new System.Windows.Forms.Label();
|
||||
this.resistanceTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
this.its90CalibrationCoefficientsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.c7TextBox = new System.Windows.Forms.TextBox();
|
||||
this.c7Label = new System.Windows.Forms.Label();
|
||||
this.b7TextBox = new System.Windows.Forms.TextBox();
|
||||
this.a7TextBox = new System.Windows.Forms.TextBox();
|
||||
this.r001cTextBox = new System.Windows.Forms.TextBox();
|
||||
this.b7Label = new System.Windows.Forms.Label();
|
||||
this.a7Label = new System.Windows.Forms.Label();
|
||||
this.r0Label = new System.Windows.Forms.Label();
|
||||
this.nameGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.its27CalibrationCoefficientsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.bTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.aTextBox = new System.Windows.Forms.TextBox();
|
||||
this.r0TextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.calibrationGroupBox.SuspendLayout();
|
||||
this.its90CalibrationCoefficientsGroupBox.SuspendLayout();
|
||||
this.nameGroupBox.SuspendLayout();
|
||||
this.its27CalibrationCoefficientsGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmpntNameLabel
|
||||
//
|
||||
this.cmpntNameLabel.AutoSize = true;
|
||||
this.cmpntNameLabel.Location = new System.Drawing.Point(69, 16);
|
||||
this.cmpntNameLabel.Name = "cmpntNameLabel";
|
||||
this.cmpntNameLabel.Size = new System.Drawing.Size(64, 13);
|
||||
this.cmpntNameLabel.TabIndex = 0;
|
||||
this.cmpntNameLabel.Text = "cmpntName";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton2);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.radioButton1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.its90CalibrationCoefficientsGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.nameGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.its27CalibrationCoefficientsGroupBox);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(668, 400);
|
||||
this.splitContainer1.SplitterDistance = 300;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(462, 24);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(187, 17);
|
||||
this.radioButton2.TabIndex = 11;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "Use ITS-27 calibration coefficients";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(235, 24);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(187, 17);
|
||||
this.radioButton1.TabIndex = 10;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "Use ITS-90 calibration coefficients";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.temperatureTextBox);
|
||||
this.testGroupBox.Controls.Add(this.resistanceLabel);
|
||||
this.testGroupBox.Controls.Add(this.temperatureLabel);
|
||||
this.testGroupBox.Controls.Add(this.resistanceTextBox);
|
||||
this.testGroupBox.Location = new System.Drawing.Point(16, 155);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.Size = new System.Drawing.Size(208, 77);
|
||||
this.testGroupBox.TabIndex = 9;
|
||||
this.testGroupBox.TabStop = false;
|
||||
this.testGroupBox.Text = "Test";
|
||||
//
|
||||
// temperatureTextBox
|
||||
//
|
||||
this.temperatureTextBox.Location = new System.Drawing.Point(121, 46);
|
||||
this.temperatureTextBox.Name = "temperatureTextBox";
|
||||
this.temperatureTextBox.ReadOnly = true;
|
||||
this.temperatureTextBox.Size = new System.Drawing.Size(79, 20);
|
||||
this.temperatureTextBox.TabIndex = 5;
|
||||
//
|
||||
// resistanceLabel
|
||||
//
|
||||
this.resistanceLabel.AutoSize = true;
|
||||
this.resistanceLabel.Location = new System.Drawing.Point(16, 23);
|
||||
this.resistanceLabel.Name = "resistanceLabel";
|
||||
this.resistanceLabel.Size = new System.Drawing.Size(78, 13);
|
||||
this.resistanceLabel.TabIndex = 2;
|
||||
this.resistanceLabel.Text = "Resistance [Ω]";
|
||||
//
|
||||
// temperatureLabel
|
||||
//
|
||||
this.temperatureLabel.AutoSize = true;
|
||||
this.temperatureLabel.Location = new System.Drawing.Point(16, 49);
|
||||
this.temperatureLabel.Name = "temperatureLabel";
|
||||
this.temperatureLabel.Size = new System.Drawing.Size(87, 13);
|
||||
this.temperatureLabel.TabIndex = 3;
|
||||
this.temperatureLabel.Text = "Temperature [°C]";
|
||||
//
|
||||
// resistanceTextBox
|
||||
//
|
||||
this.resistanceTextBox.Location = new System.Drawing.Point(121, 20);
|
||||
this.resistanceTextBox.Name = "resistanceTextBox";
|
||||
this.resistanceTextBox.Size = new System.Drawing.Size(79, 20);
|
||||
this.resistanceTextBox.TabIndex = 4;
|
||||
this.resistanceTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
this.calibrationGroupBox.Location = new System.Drawing.Point(16, 54);
|
||||
this.calibrationGroupBox.Name = "calibrationGroupBox";
|
||||
this.calibrationGroupBox.Size = new System.Drawing.Size(208, 95);
|
||||
this.calibrationGroupBox.TabIndex = 6;
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 68);
|
||||
this.calibValidDateLabel.Name = "calibValidDateLabel";
|
||||
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
this.calibDateLabel.Location = new System.Drawing.Point(17, 43);
|
||||
this.calibDateLabel.Name = "calibDateLabel";
|
||||
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.calibDateLabel.TabIndex = 12;
|
||||
this.calibDateLabel.Text = "Date";
|
||||
//
|
||||
// calibCertificateNrTextBox
|
||||
//
|
||||
this.calibCertificateNrTextBox.Enabled = false;
|
||||
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(105, 15);
|
||||
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
|
||||
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(95, 20);
|
||||
this.calibCertificateNrTextBox.TabIndex = 11;
|
||||
//
|
||||
// calibCertificateNrLabel
|
||||
//
|
||||
this.calibCertificateNrLabel.AutoSize = true;
|
||||
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
|
||||
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
|
||||
this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.calibCertificateNrLabel.TabIndex = 10;
|
||||
this.calibCertificateNrLabel.Text = "Certificate";
|
||||
//
|
||||
// its90CalibrationCoefficientsGroupBox
|
||||
//
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.c7TextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.c7Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.b7TextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.a7TextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.r001cTextBox);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.b7Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.a7Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Controls.Add(this.r0Label);
|
||||
this.its90CalibrationCoefficientsGroupBox.Location = new System.Drawing.Point(230, 54);
|
||||
this.its90CalibrationCoefficientsGroupBox.Name = "its90CalibrationCoefficientsGroupBox";
|
||||
this.its90CalibrationCoefficientsGroupBox.Size = new System.Drawing.Size(220, 140);
|
||||
this.its90CalibrationCoefficientsGroupBox.TabIndex = 5;
|
||||
this.its90CalibrationCoefficientsGroupBox.TabStop = false;
|
||||
this.its90CalibrationCoefficientsGroupBox.Text = "ITS-90 calibration coefficients";
|
||||
//
|
||||
// c7TextBox
|
||||
//
|
||||
this.c7TextBox.Enabled = false;
|
||||
this.c7TextBox.Location = new System.Drawing.Point(82, 104);
|
||||
this.c7TextBox.Name = "c7TextBox";
|
||||
this.c7TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.c7TextBox.TabIndex = 7;
|
||||
//
|
||||
// c7Label
|
||||
//
|
||||
this.c7Label.AutoSize = true;
|
||||
this.c7Label.Location = new System.Drawing.Point(20, 107);
|
||||
this.c7Label.Name = "c7Label";
|
||||
this.c7Label.Size = new System.Drawing.Size(19, 13);
|
||||
this.c7Label.TabIndex = 6;
|
||||
this.c7Label.Text = "c7";
|
||||
//
|
||||
// b7TextBox
|
||||
//
|
||||
this.b7TextBox.Enabled = false;
|
||||
this.b7TextBox.Location = new System.Drawing.Point(82, 79);
|
||||
this.b7TextBox.Name = "b7TextBox";
|
||||
this.b7TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.b7TextBox.TabIndex = 5;
|
||||
//
|
||||
// a7TextBox
|
||||
//
|
||||
this.a7TextBox.Enabled = false;
|
||||
this.a7TextBox.Location = new System.Drawing.Point(82, 54);
|
||||
this.a7TextBox.Name = "a7TextBox";
|
||||
this.a7TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.a7TextBox.TabIndex = 4;
|
||||
//
|
||||
// r001cTextBox
|
||||
//
|
||||
this.r001cTextBox.Enabled = false;
|
||||
this.r001cTextBox.Location = new System.Drawing.Point(82, 29);
|
||||
this.r001cTextBox.Name = "r001cTextBox";
|
||||
this.r001cTextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.r001cTextBox.TabIndex = 3;
|
||||
//
|
||||
// b7Label
|
||||
//
|
||||
this.b7Label.AutoSize = true;
|
||||
this.b7Label.Location = new System.Drawing.Point(20, 82);
|
||||
this.b7Label.Name = "b7Label";
|
||||
this.b7Label.Size = new System.Drawing.Size(19, 13);
|
||||
this.b7Label.TabIndex = 2;
|
||||
this.b7Label.Text = "b7";
|
||||
//
|
||||
// a7Label
|
||||
//
|
||||
this.a7Label.AutoSize = true;
|
||||
this.a7Label.Location = new System.Drawing.Point(20, 57);
|
||||
this.a7Label.Name = "a7Label";
|
||||
this.a7Label.Size = new System.Drawing.Size(19, 13);
|
||||
this.a7Label.TabIndex = 1;
|
||||
this.a7Label.Text = "a7";
|
||||
//
|
||||
// r0Label
|
||||
//
|
||||
this.r0Label.AutoSize = true;
|
||||
this.r0Label.Location = new System.Drawing.Point(20, 32);
|
||||
this.r0Label.Name = "r0Label";
|
||||
this.r0Label.Size = new System.Drawing.Size(53, 13);
|
||||
this.r0Label.TabIndex = 0;
|
||||
this.r0Label.Text = "R(0.01°C)";
|
||||
//
|
||||
// nameGroupBox
|
||||
//
|
||||
this.nameGroupBox.Controls.Add(this.cmpntNameLabel);
|
||||
this.nameGroupBox.Location = new System.Drawing.Point(16, 10);
|
||||
this.nameGroupBox.Name = "nameGroupBox";
|
||||
this.nameGroupBox.Size = new System.Drawing.Size(208, 40);
|
||||
this.nameGroupBox.TabIndex = 4;
|
||||
this.nameGroupBox.TabStop = false;
|
||||
this.nameGroupBox.Text = "Component";
|
||||
//
|
||||
// its27CalibrationCoefficientsGroupBox
|
||||
//
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.bTextBox);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.label1);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.aTextBox);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.r0TextBox);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.label2);
|
||||
this.its27CalibrationCoefficientsGroupBox.Controls.Add(this.label3);
|
||||
this.its27CalibrationCoefficientsGroupBox.Location = new System.Drawing.Point(459, 54);
|
||||
this.its27CalibrationCoefficientsGroupBox.Name = "its27CalibrationCoefficientsGroupBox";
|
||||
this.its27CalibrationCoefficientsGroupBox.Size = new System.Drawing.Size(190, 140);
|
||||
this.its27CalibrationCoefficientsGroupBox.TabIndex = 3;
|
||||
this.its27CalibrationCoefficientsGroupBox.TabStop = false;
|
||||
this.its27CalibrationCoefficientsGroupBox.Text = "ITS-27 calibration coefficients";
|
||||
//
|
||||
// bTextBox
|
||||
//
|
||||
this.bTextBox.Enabled = false;
|
||||
this.bTextBox.Location = new System.Drawing.Point(52, 79);
|
||||
this.bTextBox.Name = "bTextBox";
|
||||
this.bTextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.bTextBox.TabIndex = 13;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(22, 82);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(14, 13);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "B";
|
||||
//
|
||||
// aTextBox
|
||||
//
|
||||
this.aTextBox.Enabled = false;
|
||||
this.aTextBox.Location = new System.Drawing.Point(52, 54);
|
||||
this.aTextBox.Name = "aTextBox";
|
||||
this.aTextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.aTextBox.TabIndex = 11;
|
||||
//
|
||||
// r0TextBox
|
||||
//
|
||||
this.r0TextBox.Enabled = false;
|
||||
this.r0TextBox.Location = new System.Drawing.Point(52, 29);
|
||||
this.r0TextBox.Name = "r0TextBox";
|
||||
this.r0TextBox.Size = new System.Drawing.Size(124, 20);
|
||||
this.r0TextBox.TabIndex = 10;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(22, 57);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(14, 13);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "A";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(22, 32);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(21, 13);
|
||||
this.label3.TabIndex = 8;
|
||||
this.label3.Text = "R0";
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(105, 40);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(95, 20);
|
||||
this.calibDateTimePicker.TabIndex = 17;
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(105, 64);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(95, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgPlatinumResistanceTMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgPlatinumResistanceTMeterTab";
|
||||
this.Size = new System.Drawing.Size(668, 400);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgBalanceTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.testGroupBox.PerformLayout();
|
||||
this.calibrationGroupBox.ResumeLayout(false);
|
||||
this.calibrationGroupBox.PerformLayout();
|
||||
this.its90CalibrationCoefficientsGroupBox.ResumeLayout(false);
|
||||
this.its90CalibrationCoefficientsGroupBox.PerformLayout();
|
||||
this.nameGroupBox.ResumeLayout(false);
|
||||
this.nameGroupBox.PerformLayout();
|
||||
this.its27CalibrationCoefficientsGroupBox.ResumeLayout(false);
|
||||
this.its27CalibrationCoefficientsGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@ -446,9 +450,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.TextBox c7TextBox;
|
||||
private System.Windows.Forms.Label c7Label;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.TextBox calibValidDateTextBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.TextBox calibDateTextBox;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
@ -461,5 +463,7 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Senus Slovensko a.s.
|
||||
/// Copyright (c) 2016-2020 Senus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -47,7 +47,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgPlatinumResistanceTMeterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
@ -92,8 +96,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
if (TempMeterCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = TempMeterCfg.CalibCertificateNr;
|
||||
calibDateTextBox.Text = TempMeterCfg.CalibDate.ToShortDateString();
|
||||
calibValidDateTextBox.Text = TempMeterCfg.CalibValidDate.ToShortDateString();
|
||||
calibDateTimePicker.Value = (TempMeterCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : TempMeterCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (TempMeterCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : TempMeterCfg.CalibValidDate;
|
||||
|
||||
radioButton1.Checked = TempMeterCfg.UseITS90;
|
||||
radioButton2.Checked = !TempMeterCfg.UseITS90;
|
||||
@ -114,8 +118,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTextBox.Enabled = true;
|
||||
calibValidDateTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
radioButton1.Enabled = true;
|
||||
radioButton2.Enabled = true;
|
||||
@ -137,8 +141,8 @@ namespace TBF.UI.Bench.Metrology
|
||||
try
|
||||
{
|
||||
TempMeterCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
TempMeterCfg.CalibDate = DateTime.Parse(calibDateTextBox.Text);
|
||||
TempMeterCfg.CalibValidDate = DateTime.Parse(calibValidDateTextBox.Text);
|
||||
TempMeterCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
TempMeterCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
TempMeterCfg.UseITS90 = radioButton1.Checked;
|
||||
|
||||
|
||||
@ -31,139 +31,220 @@ namespace TBF.UI.Bench.Metrology
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.correctedTextBox = new System.Windows.Forms.TextBox();
|
||||
this.measuredTextBox = new System.Windows.Forms.TextBox();
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.componentLabel = new System.Windows.Forms.Label();
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.correctedTextBox = new System.Windows.Forms.TextBox();
|
||||
this.measuredTextBox = new System.Windows.Forms.TextBox();
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.componentLabel = new System.Windows.Forms.Label();
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.componentLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmpntNameLabel);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.listViewEx);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(420, 300);
|
||||
this.splitContainer1.SplitterDistance = 80;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.correctedTextBox);
|
||||
this.testGroupBox.Controls.Add(this.measuredTextBox);
|
||||
this.testGroupBox.Controls.Add(this.correctedLabel);
|
||||
this.testGroupBox.Controls.Add(this.measuredLabel);
|
||||
this.testGroupBox.Location = new System.Drawing.Point(245, 7);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.Size = new System.Drawing.Size(157, 64);
|
||||
this.testGroupBox.TabIndex = 4;
|
||||
this.testGroupBox.TabStop = false;
|
||||
this.testGroupBox.Text = "Test";
|
||||
//
|
||||
// correctedTextBox
|
||||
//
|
||||
this.correctedTextBox.Location = new System.Drawing.Point(74, 38);
|
||||
this.correctedTextBox.Name = "correctedTextBox";
|
||||
this.correctedTextBox.ReadOnly = true;
|
||||
this.correctedTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.correctedTextBox.TabIndex = 5;
|
||||
//
|
||||
// measuredTextBox
|
||||
//
|
||||
this.measuredTextBox.Location = new System.Drawing.Point(74, 13);
|
||||
this.measuredTextBox.Name = "measuredTextBox";
|
||||
this.measuredTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.measuredTextBox.TabIndex = 4;
|
||||
this.measuredTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
|
||||
//
|
||||
// correctedLabel
|
||||
//
|
||||
this.correctedLabel.AutoSize = true;
|
||||
this.correctedLabel.Location = new System.Drawing.Point(7, 41);
|
||||
this.correctedLabel.Name = "correctedLabel";
|
||||
this.correctedLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.correctedLabel.TabIndex = 3;
|
||||
this.correctedLabel.Text = "Corrected";
|
||||
//
|
||||
// measuredLabel
|
||||
//
|
||||
this.measuredLabel.AutoSize = true;
|
||||
this.measuredLabel.Location = new System.Drawing.Point(6, 20);
|
||||
this.measuredLabel.Name = "measuredLabel";
|
||||
this.measuredLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.measuredLabel.TabIndex = 2;
|
||||
this.measuredLabel.Text = "Measured";
|
||||
//
|
||||
// componentLabel
|
||||
//
|
||||
this.componentLabel.AutoSize = true;
|
||||
this.componentLabel.Location = new System.Drawing.Point(14, 12);
|
||||
this.componentLabel.Name = "componentLabel";
|
||||
this.componentLabel.Size = new System.Drawing.Size(64, 13);
|
||||
this.componentLabel.TabIndex = 1;
|
||||
this.componentLabel.Text = "Component:";
|
||||
//
|
||||
// cmpntNameLabel
|
||||
//
|
||||
this.cmpntNameLabel.AutoSize = true;
|
||||
this.cmpntNameLabel.Location = new System.Drawing.Point(97, 12);
|
||||
this.cmpntNameLabel.Name = "cmpntNameLabel";
|
||||
this.cmpntNameLabel.Size = new System.Drawing.Size(88, 13);
|
||||
this.cmpntNameLabel.TabIndex = 0;
|
||||
this.cmpntNameLabel.Text = "componentName";
|
||||
//
|
||||
// listViewEx
|
||||
//
|
||||
this.listViewEx.AllowColumnReorder = true;
|
||||
this.listViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewEx.DoubleClickActivation = false;
|
||||
this.listViewEx.FullRowSelect = true;
|
||||
this.listViewEx.GridLines = true;
|
||||
this.listViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.listViewEx.Name = "listViewEx";
|
||||
this.listViewEx.Size = new System.Drawing.Size(420, 216);
|
||||
this.listViewEx.TabIndex = 0;
|
||||
this.listViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// MetrologyDlgPressMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgPressMeterTab";
|
||||
this.Size = new System.Drawing.Size(420, 300);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgPressMeterTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.testGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.calibrationGroupBox.SuspendLayout();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.componentLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmpntNameLabel);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.listViewEx);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(600, 300);
|
||||
this.splitContainer1.SplitterDistance = 110;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
this.calibrationGroupBox.Location = new System.Drawing.Point(204, 12);
|
||||
this.calibrationGroupBox.Name = "calibrationGroupBox";
|
||||
this.calibrationGroupBox.Size = new System.Drawing.Size(208, 86);
|
||||
this.calibrationGroupBox.TabIndex = 7;
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 62);
|
||||
this.calibValidDateLabel.Name = "calibValidDateLabel";
|
||||
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
this.calibDateLabel.Location = new System.Drawing.Point(17, 40);
|
||||
this.calibDateLabel.Name = "calibDateLabel";
|
||||
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.calibDateLabel.TabIndex = 12;
|
||||
this.calibDateLabel.Text = "Date";
|
||||
//
|
||||
// calibCertificateNrTextBox
|
||||
//
|
||||
this.calibCertificateNrTextBox.Enabled = false;
|
||||
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(120, 15);
|
||||
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
|
||||
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibCertificateNrTextBox.TabIndex = 11;
|
||||
//
|
||||
// calibCertificateNrLabel
|
||||
//
|
||||
this.calibCertificateNrLabel.AutoSize = true;
|
||||
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
|
||||
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
|
||||
this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.calibCertificateNrLabel.TabIndex = 10;
|
||||
this.calibCertificateNrLabel.Text = "Certificate";
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.correctedTextBox);
|
||||
this.testGroupBox.Controls.Add(this.measuredTextBox);
|
||||
this.testGroupBox.Controls.Add(this.correctedLabel);
|
||||
this.testGroupBox.Controls.Add(this.measuredLabel);
|
||||
this.testGroupBox.Location = new System.Drawing.Point(428, 12);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.Size = new System.Drawing.Size(157, 86);
|
||||
this.testGroupBox.TabIndex = 4;
|
||||
this.testGroupBox.TabStop = false;
|
||||
this.testGroupBox.Text = "Test";
|
||||
//
|
||||
// correctedTextBox
|
||||
//
|
||||
this.correctedTextBox.Location = new System.Drawing.Point(74, 48);
|
||||
this.correctedTextBox.Name = "correctedTextBox";
|
||||
this.correctedTextBox.ReadOnly = true;
|
||||
this.correctedTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.correctedTextBox.TabIndex = 5;
|
||||
//
|
||||
// measuredTextBox
|
||||
//
|
||||
this.measuredTextBox.Location = new System.Drawing.Point(74, 23);
|
||||
this.measuredTextBox.Name = "measuredTextBox";
|
||||
this.measuredTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.measuredTextBox.TabIndex = 4;
|
||||
this.measuredTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
|
||||
//
|
||||
// correctedLabel
|
||||
//
|
||||
this.correctedLabel.AutoSize = true;
|
||||
this.correctedLabel.Location = new System.Drawing.Point(7, 51);
|
||||
this.correctedLabel.Name = "correctedLabel";
|
||||
this.correctedLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.correctedLabel.TabIndex = 3;
|
||||
this.correctedLabel.Text = "Corrected";
|
||||
//
|
||||
// measuredLabel
|
||||
//
|
||||
this.measuredLabel.AutoSize = true;
|
||||
this.measuredLabel.Location = new System.Drawing.Point(6, 30);
|
||||
this.measuredLabel.Name = "measuredLabel";
|
||||
this.measuredLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.measuredLabel.TabIndex = 2;
|
||||
this.measuredLabel.Text = "Measured";
|
||||
//
|
||||
// componentLabel
|
||||
//
|
||||
this.componentLabel.AutoSize = true;
|
||||
this.componentLabel.Location = new System.Drawing.Point(14, 17);
|
||||
this.componentLabel.Name = "componentLabel";
|
||||
this.componentLabel.Size = new System.Drawing.Size(64, 13);
|
||||
this.componentLabel.TabIndex = 1;
|
||||
this.componentLabel.Text = "Component:";
|
||||
//
|
||||
// cmpntNameLabel
|
||||
//
|
||||
this.cmpntNameLabel.AutoSize = true;
|
||||
this.cmpntNameLabel.Location = new System.Drawing.Point(97, 17);
|
||||
this.cmpntNameLabel.Name = "cmpntNameLabel";
|
||||
this.cmpntNameLabel.Size = new System.Drawing.Size(88, 13);
|
||||
this.cmpntNameLabel.TabIndex = 0;
|
||||
this.cmpntNameLabel.Text = "componentName";
|
||||
//
|
||||
// listViewEx
|
||||
//
|
||||
this.listViewEx.AllowColumnReorder = true;
|
||||
this.listViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewEx.DoubleClickActivation = false;
|
||||
this.listViewEx.FullRowSelect = true;
|
||||
this.listViewEx.GridLines = true;
|
||||
this.listViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.listViewEx.Name = "listViewEx";
|
||||
this.listViewEx.Size = new System.Drawing.Size(600, 186);
|
||||
this.listViewEx.TabIndex = 0;
|
||||
this.listViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgPressMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgPressMeterTab";
|
||||
this.Size = new System.Drawing.Size(600, 300);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgPressMeterTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.calibrationGroupBox.ResumeLayout(false);
|
||||
this.calibrationGroupBox.PerformLayout();
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.testGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@ -178,6 +259,13 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.TextBox measuredTextBox;
|
||||
private System.Windows.Forms.Label correctedLabel;
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -28,6 +28,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
set { meterEntity = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Balance configuration (with buoyancy parameters)
|
||||
/// </summary>
|
||||
public BenchControl.GenericDevices.ICalibInfoCfg CalibInfoCfg;
|
||||
|
||||
/// <summary>
|
||||
/// A list of 'measurement-correction' pairs to be deleted from the database on OK.
|
||||
/// </summary>
|
||||
@ -47,7 +52,12 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgPressMeterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgPressMeterTab_Load(object sender, System.EventArgs e)
|
||||
@ -56,15 +66,10 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
parent = ParentForm as MetrologyDlg;
|
||||
|
||||
/// Panel1
|
||||
cmpntNameLabel.Text = meterEntity.Name;
|
||||
Localize();
|
||||
|
||||
componentLabel.Text = Strings.Component;
|
||||
testGroupBox.Text = Strings.Test_measured_corrected;
|
||||
measuredLabel.Text = Strings.Measured;
|
||||
correctedLabel.Text = Strings.Corrected;
|
||||
measuredTextBox.Text = string.Empty;
|
||||
correctedTextBox.Text = string.Empty;
|
||||
/// Panel1
|
||||
cmpntNameLabel.Text = meterEntity.Name;
|
||||
|
||||
/// Panel2
|
||||
this.Controls.Add(measurementTextBox = new TextBox());
|
||||
@ -82,8 +87,30 @@ namespace TBF.UI.Bench.Metrology
|
||||
RefreshAll();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
componentLabel.Text = Strings.Component;
|
||||
testGroupBox.Text = Strings.Test_measured_corrected;
|
||||
measuredLabel.Text = Strings.Measured;
|
||||
correctedLabel.Text = Strings.Corrected;
|
||||
measuredTextBox.Text = string.Empty;
|
||||
correctedTextBox.Text = string.Empty;
|
||||
|
||||
calibrationGroupBox.Text = Strings.Calibration;
|
||||
calibCertificateNrLabel.Text = Strings.Certificate;
|
||||
calibDateLabel.Text = Strings.Date;
|
||||
calibValidDateLabel.Text = Strings.Valid_until;
|
||||
}
|
||||
|
||||
void RefreshAll()
|
||||
{
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
foreach (var corr in MeterEntity.Corrections) AddOneLVI(corr);
|
||||
}
|
||||
@ -208,6 +235,10 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
int ix = listViewEx.SelectedIndices[0];
|
||||
@ -219,7 +250,26 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
public void OkBtnClicked()
|
||||
{
|
||||
}
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_calib_info_Correct_pls,
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CancelBtnClicked()
|
||||
{
|
||||
|
||||
@ -31,139 +31,220 @@ namespace TBF.UI.Bench.Metrology
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.correctedTextBox = new System.Windows.Forms.TextBox();
|
||||
this.measuredTextBox = new System.Windows.Forms.TextBox();
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.componentLabel = new System.Windows.Forms.Label();
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.calibrationGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.calibValidDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibDateLabel = new System.Windows.Forms.Label();
|
||||
this.calibCertificateNrTextBox = new System.Windows.Forms.TextBox();
|
||||
this.calibCertificateNrLabel = new System.Windows.Forms.Label();
|
||||
this.testGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.correctedTextBox = new System.Windows.Forms.TextBox();
|
||||
this.measuredTextBox = new System.Windows.Forms.TextBox();
|
||||
this.correctedLabel = new System.Windows.Forms.Label();
|
||||
this.measuredLabel = new System.Windows.Forms.Label();
|
||||
this.componentLabel = new System.Windows.Forms.Label();
|
||||
this.cmpntNameLabel = new System.Windows.Forms.Label();
|
||||
this.listViewEx = new Results.Forms.ListViewEx();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.componentLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmpntNameLabel);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.listViewEx);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(420, 300);
|
||||
this.splitContainer1.SplitterDistance = 80;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.correctedTextBox);
|
||||
this.testGroupBox.Controls.Add(this.measuredTextBox);
|
||||
this.testGroupBox.Controls.Add(this.correctedLabel);
|
||||
this.testGroupBox.Controls.Add(this.measuredLabel);
|
||||
this.testGroupBox.Location = new System.Drawing.Point(245, 7);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.Size = new System.Drawing.Size(157, 64);
|
||||
this.testGroupBox.TabIndex = 4;
|
||||
this.testGroupBox.TabStop = false;
|
||||
this.testGroupBox.Text = "Test";
|
||||
//
|
||||
// correctedTextBox
|
||||
//
|
||||
this.correctedTextBox.Location = new System.Drawing.Point(74, 38);
|
||||
this.correctedTextBox.Name = "correctedTextBox";
|
||||
this.correctedTextBox.ReadOnly = true;
|
||||
this.correctedTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.correctedTextBox.TabIndex = 5;
|
||||
//
|
||||
// measuredTextBox
|
||||
//
|
||||
this.measuredTextBox.Location = new System.Drawing.Point(74, 13);
|
||||
this.measuredTextBox.Name = "measuredTextBox";
|
||||
this.measuredTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.measuredTextBox.TabIndex = 4;
|
||||
this.measuredTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
|
||||
//
|
||||
// correctedLabel
|
||||
//
|
||||
this.correctedLabel.AutoSize = true;
|
||||
this.correctedLabel.Location = new System.Drawing.Point(7, 41);
|
||||
this.correctedLabel.Name = "correctedLabel";
|
||||
this.correctedLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.correctedLabel.TabIndex = 3;
|
||||
this.correctedLabel.Text = "Corrected";
|
||||
//
|
||||
// measuredLabel
|
||||
//
|
||||
this.measuredLabel.AutoSize = true;
|
||||
this.measuredLabel.Location = new System.Drawing.Point(6, 20);
|
||||
this.measuredLabel.Name = "measuredLabel";
|
||||
this.measuredLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.measuredLabel.TabIndex = 2;
|
||||
this.measuredLabel.Text = "Measured";
|
||||
//
|
||||
// componentLabel
|
||||
//
|
||||
this.componentLabel.AutoSize = true;
|
||||
this.componentLabel.Location = new System.Drawing.Point(14, 12);
|
||||
this.componentLabel.Name = "componentLabel";
|
||||
this.componentLabel.Size = new System.Drawing.Size(64, 13);
|
||||
this.componentLabel.TabIndex = 1;
|
||||
this.componentLabel.Text = "Component:";
|
||||
//
|
||||
// cmpntNameLabel
|
||||
//
|
||||
this.cmpntNameLabel.AutoSize = true;
|
||||
this.cmpntNameLabel.Location = new System.Drawing.Point(97, 12);
|
||||
this.cmpntNameLabel.Name = "cmpntNameLabel";
|
||||
this.cmpntNameLabel.Size = new System.Drawing.Size(88, 13);
|
||||
this.cmpntNameLabel.TabIndex = 0;
|
||||
this.cmpntNameLabel.Text = "componentName";
|
||||
//
|
||||
// listViewEx
|
||||
//
|
||||
this.listViewEx.AllowColumnReorder = true;
|
||||
this.listViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewEx.DoubleClickActivation = false;
|
||||
this.listViewEx.FullRowSelect = true;
|
||||
this.listViewEx.GridLines = true;
|
||||
this.listViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.listViewEx.Name = "listViewEx";
|
||||
this.listViewEx.Size = new System.Drawing.Size(420, 216);
|
||||
this.listViewEx.TabIndex = 0;
|
||||
this.listViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// MetrologyDlgTempMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgTempMeterTab";
|
||||
this.Size = new System.Drawing.Size(420, 300);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgTempMeterTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.testGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.calibExpirationDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.calibDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.calibrationGroupBox.SuspendLayout();
|
||||
this.testGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.calibrationGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.testGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.componentLabel);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.cmpntNameLabel);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.listViewEx);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(600, 300);
|
||||
this.splitContainer1.SplitterDistance = 110;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// calibrationGroupBox
|
||||
//
|
||||
this.calibrationGroupBox.Controls.Add(this.calibExpirationDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateTimePicker);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibValidDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibDateLabel);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrTextBox);
|
||||
this.calibrationGroupBox.Controls.Add(this.calibCertificateNrLabel);
|
||||
this.calibrationGroupBox.Location = new System.Drawing.Point(204, 12);
|
||||
this.calibrationGroupBox.Name = "calibrationGroupBox";
|
||||
this.calibrationGroupBox.Size = new System.Drawing.Size(208, 86);
|
||||
this.calibrationGroupBox.TabIndex = 7;
|
||||
this.calibrationGroupBox.TabStop = false;
|
||||
this.calibrationGroupBox.Text = "Calibration";
|
||||
//
|
||||
// calibValidDateLabel
|
||||
//
|
||||
this.calibValidDateLabel.AutoSize = true;
|
||||
this.calibValidDateLabel.Location = new System.Drawing.Point(17, 62);
|
||||
this.calibValidDateLabel.Name = "calibValidDateLabel";
|
||||
this.calibValidDateLabel.Size = new System.Drawing.Size(52, 13);
|
||||
this.calibValidDateLabel.TabIndex = 14;
|
||||
this.calibValidDateLabel.Text = "Valid until";
|
||||
//
|
||||
// calibDateLabel
|
||||
//
|
||||
this.calibDateLabel.AutoSize = true;
|
||||
this.calibDateLabel.Location = new System.Drawing.Point(17, 40);
|
||||
this.calibDateLabel.Name = "calibDateLabel";
|
||||
this.calibDateLabel.Size = new System.Drawing.Size(30, 13);
|
||||
this.calibDateLabel.TabIndex = 12;
|
||||
this.calibDateLabel.Text = "Date";
|
||||
//
|
||||
// calibCertificateNrTextBox
|
||||
//
|
||||
this.calibCertificateNrTextBox.Enabled = false;
|
||||
this.calibCertificateNrTextBox.Location = new System.Drawing.Point(120, 15);
|
||||
this.calibCertificateNrTextBox.Name = "calibCertificateNrTextBox";
|
||||
this.calibCertificateNrTextBox.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibCertificateNrTextBox.TabIndex = 11;
|
||||
//
|
||||
// calibCertificateNrLabel
|
||||
//
|
||||
this.calibCertificateNrLabel.AutoSize = true;
|
||||
this.calibCertificateNrLabel.Location = new System.Drawing.Point(17, 18);
|
||||
this.calibCertificateNrLabel.Name = "calibCertificateNrLabel";
|
||||
this.calibCertificateNrLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.calibCertificateNrLabel.TabIndex = 10;
|
||||
this.calibCertificateNrLabel.Text = "Certificate";
|
||||
//
|
||||
// testGroupBox
|
||||
//
|
||||
this.testGroupBox.Controls.Add(this.correctedTextBox);
|
||||
this.testGroupBox.Controls.Add(this.measuredTextBox);
|
||||
this.testGroupBox.Controls.Add(this.correctedLabel);
|
||||
this.testGroupBox.Controls.Add(this.measuredLabel);
|
||||
this.testGroupBox.Location = new System.Drawing.Point(428, 12);
|
||||
this.testGroupBox.Name = "testGroupBox";
|
||||
this.testGroupBox.Size = new System.Drawing.Size(157, 86);
|
||||
this.testGroupBox.TabIndex = 4;
|
||||
this.testGroupBox.TabStop = false;
|
||||
this.testGroupBox.Text = "Test";
|
||||
//
|
||||
// correctedTextBox
|
||||
//
|
||||
this.correctedTextBox.Location = new System.Drawing.Point(74, 49);
|
||||
this.correctedTextBox.Name = "correctedTextBox";
|
||||
this.correctedTextBox.ReadOnly = true;
|
||||
this.correctedTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.correctedTextBox.TabIndex = 5;
|
||||
//
|
||||
// measuredTextBox
|
||||
//
|
||||
this.measuredTextBox.Location = new System.Drawing.Point(74, 24);
|
||||
this.measuredTextBox.Name = "measuredTextBox";
|
||||
this.measuredTextBox.Size = new System.Drawing.Size(73, 20);
|
||||
this.measuredTextBox.TabIndex = 4;
|
||||
this.measuredTextBox.TextChanged += new System.EventHandler(this.measuredTextBox_TextChanged);
|
||||
//
|
||||
// correctedLabel
|
||||
//
|
||||
this.correctedLabel.AutoSize = true;
|
||||
this.correctedLabel.Location = new System.Drawing.Point(7, 52);
|
||||
this.correctedLabel.Name = "correctedLabel";
|
||||
this.correctedLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.correctedLabel.TabIndex = 3;
|
||||
this.correctedLabel.Text = "Corrected";
|
||||
//
|
||||
// measuredLabel
|
||||
//
|
||||
this.measuredLabel.AutoSize = true;
|
||||
this.measuredLabel.Location = new System.Drawing.Point(6, 31);
|
||||
this.measuredLabel.Name = "measuredLabel";
|
||||
this.measuredLabel.Size = new System.Drawing.Size(54, 13);
|
||||
this.measuredLabel.TabIndex = 2;
|
||||
this.measuredLabel.Text = "Measured";
|
||||
//
|
||||
// componentLabel
|
||||
//
|
||||
this.componentLabel.AutoSize = true;
|
||||
this.componentLabel.Location = new System.Drawing.Point(14, 17);
|
||||
this.componentLabel.Name = "componentLabel";
|
||||
this.componentLabel.Size = new System.Drawing.Size(64, 13);
|
||||
this.componentLabel.TabIndex = 1;
|
||||
this.componentLabel.Text = "Component:";
|
||||
//
|
||||
// cmpntNameLabel
|
||||
//
|
||||
this.cmpntNameLabel.AutoSize = true;
|
||||
this.cmpntNameLabel.Location = new System.Drawing.Point(97, 17);
|
||||
this.cmpntNameLabel.Name = "cmpntNameLabel";
|
||||
this.cmpntNameLabel.Size = new System.Drawing.Size(88, 13);
|
||||
this.cmpntNameLabel.TabIndex = 0;
|
||||
this.cmpntNameLabel.Text = "componentName";
|
||||
//
|
||||
// listViewEx
|
||||
//
|
||||
this.listViewEx.AllowColumnReorder = true;
|
||||
this.listViewEx.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.listViewEx.DoubleClickActivation = false;
|
||||
this.listViewEx.FullRowSelect = true;
|
||||
this.listViewEx.GridLines = true;
|
||||
this.listViewEx.Location = new System.Drawing.Point(0, 0);
|
||||
this.listViewEx.Name = "listViewEx";
|
||||
this.listViewEx.Size = new System.Drawing.Size(600, 186);
|
||||
this.listViewEx.TabIndex = 0;
|
||||
this.listViewEx.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewEx.View = System.Windows.Forms.View.Details;
|
||||
this.listViewEx.SelectedIndexChanged += new System.EventHandler(this.listViewEx_SelectedIndexChanged);
|
||||
//
|
||||
// calibExpirationDateTimePicker
|
||||
//
|
||||
this.calibExpirationDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibExpirationDateTimePicker.Enabled = false;
|
||||
this.calibExpirationDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibExpirationDateTimePicker.Location = new System.Drawing.Point(120, 59);
|
||||
this.calibExpirationDateTimePicker.Name = "calibExpirationDateTimePicker";
|
||||
this.calibExpirationDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibExpirationDateTimePicker.TabIndex = 19;
|
||||
//
|
||||
// calibDateTimePicker
|
||||
//
|
||||
this.calibDateTimePicker.CustomFormat = "dd.MM.yyyy";
|
||||
this.calibDateTimePicker.Enabled = false;
|
||||
this.calibDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.calibDateTimePicker.Location = new System.Drawing.Point(120, 37);
|
||||
this.calibDateTimePicker.Name = "calibDateTimePicker";
|
||||
this.calibDateTimePicker.Size = new System.Drawing.Size(82, 20);
|
||||
this.calibDateTimePicker.TabIndex = 18;
|
||||
//
|
||||
// MetrologyDlgTempMeterTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "MetrologyDlgTempMeterTab";
|
||||
this.Size = new System.Drawing.Size(600, 300);
|
||||
this.Load += new System.EventHandler(this.MetrologyDlgTempMeterTab_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.calibrationGroupBox.ResumeLayout(false);
|
||||
this.calibrationGroupBox.PerformLayout();
|
||||
this.testGroupBox.ResumeLayout(false);
|
||||
this.testGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@ -178,6 +259,13 @@ namespace TBF.UI.Bench.Metrology
|
||||
private System.Windows.Forms.TextBox measuredTextBox;
|
||||
private System.Windows.Forms.Label correctedLabel;
|
||||
private System.Windows.Forms.Label measuredLabel;
|
||||
private System.Windows.Forms.GroupBox calibrationGroupBox;
|
||||
private System.Windows.Forms.Label calibValidDateLabel;
|
||||
private System.Windows.Forms.Label calibDateLabel;
|
||||
private System.Windows.Forms.TextBox calibCertificateNrTextBox;
|
||||
private System.Windows.Forms.Label calibCertificateNrLabel;
|
||||
private System.Windows.Forms.DateTimePicker calibExpirationDateTimePicker;
|
||||
private System.Windows.Forms.DateTimePicker calibDateTimePicker;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -28,6 +28,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
set { meterEntity = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Balance configuration (with buoyancy parameters)
|
||||
/// </summary>
|
||||
public BenchControl.GenericDevices.ICalibInfoCfg CalibInfoCfg;
|
||||
|
||||
/// <summary>
|
||||
/// A list of 'measurement-correction' pairs to be deleted from the database on OK.
|
||||
/// </summary>
|
||||
@ -47,8 +52,13 @@ namespace TBF.UI.Bench.Metrology
|
||||
public MetrologyDlgTempMeterTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
}
|
||||
calibDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibDateTimePicker.MinDate = Constants.MinDate;
|
||||
calibExpirationDateTimePicker.CustomFormat = Constants.DateFormat;
|
||||
calibExpirationDateTimePicker.MinDate = Constants.MinDate;
|
||||
toBeRemoved = new List<MeasurementCorrection>();
|
||||
unlocked = false;
|
||||
}
|
||||
|
||||
private void MetrologyDlgTempMeterTab_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
@ -56,16 +66,11 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
parent = ParentForm as MetrologyDlg;
|
||||
|
||||
Localize();
|
||||
|
||||
/// Panel1
|
||||
cmpntNameLabel.Text = meterEntity.Name;
|
||||
|
||||
componentLabel.Text = Strings.Component;
|
||||
testGroupBox.Text = Strings.Test_measured_corrected;
|
||||
measuredLabel.Text = Strings.Measured;
|
||||
correctedLabel.Text = Strings.Corrected;
|
||||
measuredTextBox.Text = string.Empty;
|
||||
correctedTextBox.Text = string.Empty;
|
||||
|
||||
/// Panel2
|
||||
this.Controls.Add(measurementTextBox = new TextBox());
|
||||
this.Controls.Add(correctionTextBox = new TextBox());
|
||||
@ -82,9 +87,31 @@ namespace TBF.UI.Bench.Metrology
|
||||
RefreshAll();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
componentLabel.Text = Strings.Component;
|
||||
testGroupBox.Text = Strings.Test_measured_corrected;
|
||||
measuredLabel.Text = Strings.Measured;
|
||||
correctedLabel.Text = Strings.Corrected;
|
||||
measuredTextBox.Text = string.Empty;
|
||||
correctedTextBox.Text = string.Empty;
|
||||
|
||||
calibrationGroupBox.Text = Strings.Calibration;
|
||||
calibCertificateNrLabel.Text = Strings.Certificate;
|
||||
calibDateLabel.Text = Strings.Date;
|
||||
calibValidDateLabel.Text = Strings.Valid_until;
|
||||
}
|
||||
|
||||
void RefreshAll()
|
||||
{
|
||||
listViewEx.Items.Clear();
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
calibCertificateNrTextBox.Text = CalibInfoCfg.CalibCertificateNr;
|
||||
calibDateTimePicker.Value = (CalibInfoCfg.CalibDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibDate;
|
||||
calibExpirationDateTimePicker.Value = (CalibInfoCfg.CalibValidDate < Constants.MinDate) ? Constants.MinDate : CalibInfoCfg.CalibValidDate;
|
||||
}
|
||||
|
||||
listViewEx.Items.Clear();
|
||||
foreach (var corr in MeterEntity.Corrections) AddOneLVI(corr);
|
||||
}
|
||||
|
||||
@ -208,6 +235,10 @@ namespace TBF.UI.Bench.Metrology
|
||||
{
|
||||
unlocked = true;
|
||||
|
||||
calibCertificateNrTextBox.Enabled = true;
|
||||
calibDateTimePicker.Enabled = true;
|
||||
calibExpirationDateTimePicker.Enabled = true;
|
||||
|
||||
if (listViewEx.SelectedItems.Count == 1)
|
||||
{
|
||||
int ix = listViewEx.SelectedIndices[0];
|
||||
@ -219,7 +250,26 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
public void OkBtnClicked()
|
||||
{
|
||||
}
|
||||
if (CalibInfoCfg != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
CalibInfoCfg.CalibCertificateNr = calibCertificateNrTextBox.Text;
|
||||
CalibInfoCfg.CalibDate = calibDateTimePicker.Value.Date;
|
||||
CalibInfoCfg.CalibValidDate = calibExpirationDateTimePicker.Value.Date;
|
||||
|
||||
Component modified = CalibInfoCfg.CreateDbEntity();
|
||||
MeterEntity.Parameters = modified.Parameters;
|
||||
}
|
||||
catch
|
||||
{
|
||||
MessageBox.Show(Strings.Invalid_calib_info_Correct_pls,
|
||||
Strings.Error,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CancelBtnClicked()
|
||||
{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace TBF.UI
|
||||
{
|
||||
public static class Constants
|
||||
@ -6,5 +7,6 @@ namespace TBF.UI
|
||||
public const int Dpi100pct = 96;
|
||||
public const string DateFormat = "dd.MM.yyyy";
|
||||
public const string DateTimeFormat = "dd.MM.yyyy HH:mm";
|
||||
public static readonly DateTime MinDate = new DateTime(1753, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ namespace TBF.UI.Help
|
||||
Text = Strings.About_Test_Bench_Framework;
|
||||
copyrightLabel.Text = string.Format(Strings.CopyrightStr, DateTime.Now.Year);
|
||||
versionLabel.Text = String.Format(Strings.VersionStr, Program.Version);
|
||||
buildDateLabel.Text = String.Format(Strings.BuildDateStr, Program.BuildDateTime.ToShortDateString());
|
||||
buildDateLabel.Text = String.Format(Strings.BuildDateStr, Program.BuildDateTime.ToString(Constants.DateFormat));
|
||||
closeButton.Text = Strings.CloseBtnText;
|
||||
|
||||
byte[] sha1 = (new SHA1CryptoServiceProvider()).ComputeHash(Encoding.Default.GetBytes("nejaky text")); /// TODO: calculate SHA1 of real data
|
||||
|
||||
@ -44,8 +44,8 @@ namespace TBF.UI.ResultsMI
|
||||
Sent = sent;
|
||||
|
||||
batchNrLabel.Text = BatchNr.ToString();
|
||||
startTimeLabel.Text = string.Format("{0} {1}", StarTime.ToShortDateString(), StarTime.ToShortTimeString());
|
||||
endTimeLabel.Text = string.Format("{0} {1}", EndTime.ToShortDateString(), EndTime.ToShortTimeString());
|
||||
startTimeLabel.Text = StarTime.ToString(Constants.DateTimeFormat);
|
||||
endTimeLabel.Text = EndTime.ToString(Constants.DateTimeFormat);
|
||||
swVerLabel.Text = Ver;
|
||||
procedureLabel.Text = ProcedureName;
|
||||
purchaseOrderLabel.Text = PurchaseOrder;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user