TestWizard.HeatMetersSelection added.
This commit is contained in:
@@ -1507,6 +1507,7 @@ namespace TBF
|
|||||||
TestWizard.FlowSelection flowDlg = new TestWizard.FlowSelection(false, false, test, metersPaths);
|
TestWizard.FlowSelection flowDlg = new TestWizard.FlowSelection(false, false, test, metersPaths);
|
||||||
TestWizard.VolumeAndErrorSelection volumeDlg = new TestWizard.VolumeAndErrorSelection(false, true, test);
|
TestWizard.VolumeAndErrorSelection volumeDlg = new TestWizard.VolumeAndErrorSelection(false, true, test);
|
||||||
TestWizard.PressureSelection pressureDlg = new TestWizard.PressureSelection(false, true, test);
|
TestWizard.PressureSelection pressureDlg = new TestWizard.PressureSelection(false, true, test);
|
||||||
|
TestWizard.HeatMetersSelection heatMetersDlg = new TestWizard.HeatMetersSelection(false, false, test);
|
||||||
//TestWizard.SensorsSelection sensorsDlg = new TestWizard.SensorsSelection(test);
|
//TestWizard.SensorsSelection sensorsDlg = new TestWizard.SensorsSelection(test);
|
||||||
|
|
||||||
methodLabel:
|
methodLabel:
|
||||||
@@ -1519,6 +1520,7 @@ namespace TBF
|
|||||||
|
|
||||||
if (selectedMethod is BenchControl.TestMethods.PMaxTest.TestMethod) goto pressure_label;
|
if (selectedMethod is BenchControl.TestMethods.PMaxTest.TestMethod) goto pressure_label;
|
||||||
if (selectedMethod is BenchControl.TestMethods.LeakTest.TestMethod) goto pressure_label;
|
if (selectedMethod is BenchControl.TestMethods.LeakTest.TestMethod) goto pressure_label;
|
||||||
|
if (selectedMethod is BenchControl.TestMethods.HeatMeters.TestMethod) goto heat_meters_label;
|
||||||
|
|
||||||
flowLabel:
|
flowLabel:
|
||||||
switch (flowDlg.ShowDialog())
|
switch (flowDlg.ShowDialog())
|
||||||
@@ -1562,6 +1564,16 @@ namespace TBF
|
|||||||
|
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
heat_meters_label:
|
||||||
|
|
||||||
|
DialogResult dr = heatMetersDlg.ShowDialog();
|
||||||
|
switch (dr)
|
||||||
|
{
|
||||||
|
case DialogResult.Cancel: return;
|
||||||
|
case DialogResult.Retry: goto methodLabel;
|
||||||
|
}
|
||||||
|
goto flowLabel;
|
||||||
|
|
||||||
pressure_label:
|
pressure_label:
|
||||||
|
|
||||||
switch (pressureDlg.ShowDialog())
|
switch (pressureDlg.ShowDialog())
|
||||||
|
|||||||
@@ -1446,6 +1446,15 @@ namespace TBF.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Heat meter options.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Heat_meter_options {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Heat_meter_options", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Heat meter sensors.
|
/// Looks up a localized string similar to Heat meter sensors.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1531,4 +1531,7 @@
|
|||||||
<data name="T_warm_to" xml:space="preserve">
|
<data name="T_warm_to" xml:space="preserve">
|
||||||
<value>T warm to</value>
|
<value>T warm to</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Heat_meter_options" xml:space="preserve">
|
||||||
|
<value>Heat meter options</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1334,6 +1334,12 @@
|
|||||||
<Compile Include="TestWizard\FlowSelection.Designer.cs">
|
<Compile Include="TestWizard\FlowSelection.Designer.cs">
|
||||||
<DependentUpon>FlowSelection.cs</DependentUpon>
|
<DependentUpon>FlowSelection.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="TestWizard\HeatMetersSelection.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TestWizard\HeatMetersSelection.Designer.cs">
|
||||||
|
<DependentUpon>HeatMetersSelection.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="TestWizard\MethodSelection.cs">
|
<Compile Include="TestWizard\MethodSelection.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -1928,6 +1934,9 @@
|
|||||||
<EmbeddedResource Include="TestWizard\FlowSelection.resx">
|
<EmbeddedResource Include="TestWizard\FlowSelection.resx">
|
||||||
<DependentUpon>FlowSelection.cs</DependentUpon>
|
<DependentUpon>FlowSelection.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TestWizard\HeatMetersSelection.resx">
|
||||||
|
<DependentUpon>HeatMetersSelection.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="TestWizard\MethodSelection.resx">
|
<EmbeddedResource Include="TestWizard\MethodSelection.resx">
|
||||||
<DependentUpon>MethodSelection.cs</DependentUpon>
|
<DependentUpon>MethodSelection.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
namespace TBF.TestWizard
|
||||||
|
{
|
||||||
|
partial class HeatMetersSelection
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.horizSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||||
|
this.cancelButton = new System.Windows.Forms.Button();
|
||||||
|
this.nextButton = new System.Windows.Forms.Button();
|
||||||
|
this.backButton = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
|
||||||
|
this.horizSplitContainer.Panel2.SuspendLayout();
|
||||||
|
this.horizSplitContainer.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// horizSplitContainer
|
||||||
|
//
|
||||||
|
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||||
|
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.horizSplitContainer.Name = "horizSplitContainer";
|
||||||
|
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||||
|
//
|
||||||
|
// horizSplitContainer.Panel2
|
||||||
|
//
|
||||||
|
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
|
||||||
|
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
|
||||||
|
this.horizSplitContainer.Panel2.Controls.Add(this.backButton);
|
||||||
|
this.horizSplitContainer.Size = new System.Drawing.Size(284, 262);
|
||||||
|
this.horizSplitContainer.SplitterDistance = 182;
|
||||||
|
this.horizSplitContainer.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// cancelButton
|
||||||
|
//
|
||||||
|
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.cancelButton.Location = new System.Drawing.Point(186, 17);
|
||||||
|
this.cancelButton.Name = "cancelButton";
|
||||||
|
this.cancelButton.Size = new System.Drawing.Size(75, 42);
|
||||||
|
this.cancelButton.TabIndex = 27;
|
||||||
|
this.cancelButton.Text = "&Cancel";
|
||||||
|
this.cancelButton.UseVisualStyleBackColor = true;
|
||||||
|
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||||
|
//
|
||||||
|
// nextButton
|
||||||
|
//
|
||||||
|
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.nextButton.Location = new System.Drawing.Point(105, 17);
|
||||||
|
this.nextButton.Name = "nextButton";
|
||||||
|
this.nextButton.Size = new System.Drawing.Size(75, 42);
|
||||||
|
this.nextButton.TabIndex = 26;
|
||||||
|
this.nextButton.Text = "&Next >";
|
||||||
|
this.nextButton.UseVisualStyleBackColor = true;
|
||||||
|
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
|
||||||
|
//
|
||||||
|
// backButton
|
||||||
|
//
|
||||||
|
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.backButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
|
||||||
|
this.backButton.Location = new System.Drawing.Point(24, 17);
|
||||||
|
this.backButton.Name = "backButton";
|
||||||
|
this.backButton.Size = new System.Drawing.Size(75, 42);
|
||||||
|
this.backButton.TabIndex = 25;
|
||||||
|
this.backButton.Text = "< &Back";
|
||||||
|
this.backButton.UseVisualStyleBackColor = true;
|
||||||
|
this.backButton.Click += new System.EventHandler(this.backButton_Click);
|
||||||
|
//
|
||||||
|
// HeatMetersSelection
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||||
|
this.Controls.Add(this.horizSplitContainer);
|
||||||
|
this.Name = "HeatMetersSelection";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "HeatMetersSelection";
|
||||||
|
this.Load += new System.EventHandler(this.HeatMetersSelection_Load);
|
||||||
|
this.horizSplitContainer.Panel2.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
|
||||||
|
this.horizSplitContainer.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.SplitContainer horizSplitContainer;
|
||||||
|
private System.Windows.Forms.Button cancelButton;
|
||||||
|
private System.Windows.Forms.Button nextButton;
|
||||||
|
private System.Windows.Forms.Button backButton;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Config.Entities;
|
||||||
|
using TBF.Resources;
|
||||||
|
|
||||||
|
namespace TBF.TestWizard
|
||||||
|
{
|
||||||
|
public partial class HeatMetersSelection : Form
|
||||||
|
{
|
||||||
|
Test test;
|
||||||
|
|
||||||
|
public HeatMetersSelection()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HeatMetersSelection(bool first, bool last, Test test)
|
||||||
|
: this()
|
||||||
|
{
|
||||||
|
this.test = test;
|
||||||
|
|
||||||
|
Text = Strings.Heat_meter_options;
|
||||||
|
backButton.Text = Strings.BackBtnText;
|
||||||
|
nextButton.Text = Strings.NextBtnText;
|
||||||
|
cancelButton.Text = Strings.CancelBtnText;
|
||||||
|
|
||||||
|
if (first) backButton.Visible = false;
|
||||||
|
if (last) nextButton.Text = Strings.FinishBtnText;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HeatMetersSelection_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (test == null) return;
|
||||||
|
|
||||||
|
RefreshWizardPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RefreshWizardPage()
|
||||||
|
{
|
||||||
|
/// someTextBox.Text = test.SomeParam.ToString();
|
||||||
|
|
||||||
|
nextButton.Enabled = IsFormValid();
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateTest()
|
||||||
|
{
|
||||||
|
/// TODO: complete
|
||||||
|
//test.Qfrom = Utils.ParseUFloat(pressureLoTextBox.Text);
|
||||||
|
//test.Qto = Utils.ParseUFloat(pressureHiTextBox.Text);
|
||||||
|
//test.TstTime = int.Parse(durationTextBox.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsFormValid()
|
||||||
|
{
|
||||||
|
/// int dummy;
|
||||||
|
/// return int.TryParse(someTextBox.Text, out dummy);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void backButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Retry;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nextButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (test != null && IsFormValid())
|
||||||
|
{
|
||||||
|
UpdateTest();
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cancelButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void anyTextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
nextButton.Enabled = IsFormValid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
Reference in New Issue
Block a user