Support for certificates, calib. expiration dates and calendar in many components and in TBF.UI.Bench.Metrology

This commit is contained in:
Milan Hanajik
2020-05-11 14:31:37 +02:00
parent bc2804d0b9
commit 3cbc845183
54 changed files with 2295 additions and 931 deletions
+4 -2
View File
@@ -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 + " ");
+24 -20
View File
@@ -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);
+93 -5
View File
@@ -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;
+28 -24
View File
@@ -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;
+28 -24
View File
@@ -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;
+26 -22
View File
@@ -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;
+26 -22
View File
@@ -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;
+220 -132
View File
@@ -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()
{
+220 -132
View File
@@ -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()
{