Introduction of Program.CompoundWMsCount, fix in DataEntry.Combined.CycleBeginningForm, version 1.5.68.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3 };
|
||||
enabledComboBoxes = new List<ComboBox>();
|
||||
|
||||
this.WaterMetersCount = Program.WMsCount / 2; /// Default number of compound water meters
|
||||
this.WaterMetersCount = Program.CompoundWMsCount; /// Default number of compound water meters
|
||||
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
@@ -63,7 +63,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
public CycleBeginningForm(int compoundWaterMetersCount)
|
||||
: this()
|
||||
{
|
||||
this.WaterMetersCount = compoundWaterMetersCount; /// = Program.WMsCount / 2
|
||||
this.WaterMetersCount = compoundWaterMetersCount; /// = Program.CompondWMsCount
|
||||
MainSNText = new string[compoundWaterMetersCount];
|
||||
AuxSNText = new string[compoundWaterMetersCount];
|
||||
Disabled = new bool[compoundWaterMetersCount];
|
||||
@@ -93,20 +93,22 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
if (WaterMetersCount >= 2) groupBox2.Visible = true;
|
||||
if (WaterMetersCount >= 3) groupBox3.Visible = true;
|
||||
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount &&
|
||||
Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount)
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
{
|
||||
for (int i = 0; i < TextBoxesCount; i++)
|
||||
mainLabels[i].Visible = mainComboBoxes[i].Visible = true;
|
||||
auxLabels[i].Visible = auxComboBoxes[i].Visible = true;
|
||||
checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(mainComboBoxes[i]);
|
||||
enabledComboBoxes.Add(auxComboBoxes[i]);
|
||||
|
||||
if (Program.LocalSettings.LastMainSNTextsCount == TextBoxesCount &&
|
||||
Program.LocalSettings.LastAuxSNTextsCount == TextBoxesCount)
|
||||
{
|
||||
mainComboBoxes[i].Items.Add(Program.LocalSettings.LastMainSNTexts[i]);
|
||||
auxComboBoxes[i].Items.Add(Program.LocalSettings.LastAuxSNTexts[i]);
|
||||
mainLabels[i].Visible = mainComboBoxes[i].Visible = true;
|
||||
auxLabels[i].Visible = auxComboBoxes[i].Visible = true;
|
||||
checkBoxes[i].Visible = true;
|
||||
enabledComboBoxes.Add(mainComboBoxes[i]);
|
||||
enabledComboBoxes.Add(auxComboBoxes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Localize()
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainStateText = new string[Program.WMsCount / 2];
|
||||
AuxStateText = new string[Program.WMsCount / 2];
|
||||
QRise = new float[Program.WMsCount / 2];
|
||||
QFall = new float[Program.WMsCount / 2];
|
||||
MainStateText = new string[Program.CompoundWMsCount];
|
||||
AuxStateText = new string[Program.CompoundWMsCount];
|
||||
QRise = new float[Program.CompoundWMsCount];
|
||||
QFall = new float[Program.CompoundWMsCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
|
||||
if (Program.WMsCount / 2 >= 2)
|
||||
if (Program.CompoundWMsCount >= 2)
|
||||
{
|
||||
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
Height = 305;
|
||||
}
|
||||
|
||||
if (Program.WMsCount / 2 >= 3)
|
||||
if (Program.CompoundWMsCount >= 3)
|
||||
{
|
||||
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
@@ -108,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
||||
|
||||
if (Program.WMsCount / 2 >= 2)
|
||||
if (Program.CompoundWMsCount >= 2)
|
||||
{
|
||||
MainStateText[1] = mainState2TextBox.Text;
|
||||
AuxStateText[1] = auxState2TextBox.Text;
|
||||
@@ -116,7 +116,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
||||
}
|
||||
|
||||
if (Program.WMsCount / 2 >= 3)
|
||||
if (Program.CompoundWMsCount >= 3)
|
||||
{
|
||||
MainStateText[2] = mainState3TextBox.Text;
|
||||
AuxStateText[2] = auxState3TextBox.Text;
|
||||
|
||||
@@ -69,12 +69,12 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
serialNr = new string[Program.WMsCount / 2 * 2];
|
||||
disabled = new bool[Program.WMsCount / 2];
|
||||
wmStartState = new float[Program.WMsCount / 2 * 2];
|
||||
wmStartStateStr = new string[Program.WMsCount / 2 * 2];
|
||||
wmEndState = new float[Program.WMsCount / 2 * 2];
|
||||
wmCycleEndState = new string[Program.WMsCount / 2 * 2];
|
||||
serialNr = new string[Program.CompoundWMsCount * 2];
|
||||
disabled = new bool[Program.CompoundWMsCount];
|
||||
wmStartState = new float[Program.CompoundWMsCount * 2];
|
||||
wmStartStateStr = new string[Program.CompoundWMsCount * 2];
|
||||
wmEndState = new float[Program.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Program.CompoundWMsCount * 2];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
@@ -122,7 +122,7 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
///
|
||||
void OpenBeginningDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new CycleBeginningForm(Program.WMsCount / 2);
|
||||
myRef.modelessDlg = new CycleBeginningForm(Program.CompoundWMsCount);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
@@ -135,20 +135,20 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
///
|
||||
void OpenTestStartStatesDlg(EntryForm myRef)
|
||||
{
|
||||
myRef.modelessDlg = new TestStartEndForm(Program.WMsCount / 2, disabled);
|
||||
myRef.modelessDlg = new TestStartEndForm(Program.CompoundWMsCount, disabled);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
///
|
||||
void OpenTestEndStatesDlg(EntryForm myRef)
|
||||
{
|
||||
string[] mainStartSateStr = new string[Program.WMsCount / 2];
|
||||
string[] auxStartSateStr = new string[Program.WMsCount / 2];
|
||||
for (int i = 0; i < Program.WMsCount / 2; i++)
|
||||
string[] mainStartSateStr = new string[Program.CompoundWMsCount];
|
||||
string[] auxStartSateStr = new string[Program.CompoundWMsCount];
|
||||
for (int i = 0; i < Program.CompoundWMsCount; i++)
|
||||
{
|
||||
mainStartSateStr[i] = wmStartStateStr[2 * i];
|
||||
auxStartSateStr[i] = wmStartStateStr[2 * i + 1];
|
||||
}
|
||||
myRef.modelessDlg = new TestStartEndForm(Program.WMsCount / 2, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
myRef.modelessDlg = new TestStartEndForm(Program.CompoundWMsCount, mainStartSateStr, auxStartSateStr, disabled, refVolume, errLimLo, errLimHi);
|
||||
modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -132,9 +132,9 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
/// </summary>
|
||||
void ShuffleTextBoxes()
|
||||
{
|
||||
if (Program.WMsCount / 2 < TextBoxesCount)
|
||||
if (Program.CompoundWMsCount < TextBoxesCount)
|
||||
{
|
||||
TextBoxesCount = Program.WMsCount / 2;
|
||||
TextBoxesCount = Program.CompoundWMsCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainSNText = new string[Program.WMsCount / 2];
|
||||
AuxSNText = new string[Program.WMsCount / 2];
|
||||
MainSNText = new string[Program.CompoundWMsCount];
|
||||
AuxSNText = new string[Program.CompoundWMsCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
|
||||
if (Program.WMsCount / 2 < 2) Height = 200;
|
||||
else if (Program.WMsCount / 2 < 3) Height = 355;
|
||||
if (Program.CompoundWMsCount < 2) Height = 200;
|
||||
else if (Program.CompoundWMsCount < 3) Height = 355;
|
||||
|
||||
Localize();
|
||||
}
|
||||
@@ -57,13 +57,13 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
MainSNText[0] = mainSN1TextBox.Text;
|
||||
AuxSNText[0] = auxSN1TextBox.Text;
|
||||
|
||||
if (Program.WMsCount / 2 >= 2)
|
||||
if (Program.CompoundWMsCount >= 2)
|
||||
{
|
||||
MainSNText[1] = mainSN2TextBox.Text;
|
||||
AuxSNText[1] = auxSN2TextBox.Text;
|
||||
}
|
||||
|
||||
if (Program.WMsCount / 2 >= 3)
|
||||
if (Program.CompoundWMsCount >= 3)
|
||||
{
|
||||
MainSNText[2] = mainSN3TextBox.Text;
|
||||
AuxSNText[2] = auxSN3TextBox.Text;
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainStateText = new string[Program.WMsCount / 2];
|
||||
AuxStateText = new string[Program.WMsCount / 2];
|
||||
QRise = new float[Program.WMsCount / 2];
|
||||
QFall = new float[Program.WMsCount / 2];
|
||||
MainStateText = new string[Program.CompoundWMsCount];
|
||||
AuxStateText = new string[Program.CompoundWMsCount];
|
||||
QRise = new float[Program.CompoundWMsCount];
|
||||
QFall = new float[Program.CompoundWMsCount];
|
||||
completed = false;
|
||||
StartForceCloseHandler();
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
qRise1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall1TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
|
||||
if (Program.WMsCount / 2 >= 2)
|
||||
if (Program.CompoundWMsCount >= 2)
|
||||
{
|
||||
qRise2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall2TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
@@ -87,7 +87,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
Height = 305;
|
||||
}
|
||||
|
||||
if (Program.WMsCount / 2 >= 3)
|
||||
if (Program.CompoundWMsCount >= 3)
|
||||
{
|
||||
qRise3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qrise, 3);
|
||||
qFall3TextBox.Text = Utils.FloatToStr(Sequences.SequenceBase.Qfall, 3);
|
||||
@@ -108,7 +108,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
if (Utils.TryParseUFloat(qRise1TextBox.Text, out ftmp)) { QRise[0] = ftmp; } else { allOK = false; }
|
||||
if (Utils.TryParseUFloat(qFall1TextBox.Text, out ftmp)) { QFall[0] = ftmp; } else { allOK = false; }
|
||||
|
||||
if (Program.WMsCount / 2 >= 2)
|
||||
if (Program.CompoundWMsCount >= 2)
|
||||
{
|
||||
MainStateText[1] = mainState2TextBox.Text;
|
||||
AuxStateText[1] = auxState2TextBox.Text;
|
||||
@@ -116,7 +116,7 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
if (Utils.TryParseUFloat(qFall2TextBox.Text, out ftmp)) { QFall[1] = ftmp; } else { allOK = false; }
|
||||
}
|
||||
|
||||
if (Program.WMsCount / 2 >= 3)
|
||||
if (Program.CompoundWMsCount >= 3)
|
||||
{
|
||||
MainStateText[2] = mainState3TextBox.Text;
|
||||
AuxStateText[2] = auxState3TextBox.Text;
|
||||
|
||||
Reference in New Issue
Block a user