iPerlCommunicationForm changes.
This commit is contained in:
@@ -605,13 +605,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
textBoxesCount = wmsCount;
|
||||
}
|
||||
|
||||
if (checkBoxesEditMode)
|
||||
int count = checkBoxesEditMode ? textBoxesCount : Math.Min(textBoxesCount, iperlHeads.Count);
|
||||
for (int j = 0; j < count; j++)
|
||||
{
|
||||
for (int j = 0; j < textBoxesCount; j++) labels[j].Text = string.Format("iPerl{0}", j + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < Math.Min(textBoxesCount, iperlHeads.Count); j++) labels[j].Text = iperlHeads[j].Name;
|
||||
labels[j].Text = (j + 1).ToString();
|
||||
}
|
||||
|
||||
ResizeDlgToFitEnabledControls();
|
||||
@@ -627,16 +624,14 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
if (messages[i].Left + messages[i].Width > xMax) xMax = messages[i].Left + messages[i].Width;
|
||||
if (messages[i].Top + messages[i].Height > yMax) yMax = messages[i].Top + messages[i].Height;
|
||||
}
|
||||
Width = xMax + 30;
|
||||
Height = yMax + 50;
|
||||
|
||||
saveButton.Location = new Point(Width - 105, saveButton.Location.Y);
|
||||
Width = xMax + 50;
|
||||
Height = yMax + 60;
|
||||
}
|
||||
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Water_Meter_States;
|
||||
Text = checkBoxesEditMode ? Strings.Optical_heads : Strings.Water_Meter_States;
|
||||
saveButton.Text = Strings.Save;
|
||||
|
||||
sampleLabel1.Text = Strings.Direction_and_pulses_are_OK;
|
||||
@@ -653,6 +648,17 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
{
|
||||
Localize();
|
||||
|
||||
if (checkBoxesEditMode)
|
||||
{
|
||||
/// Check box edit mode => Hide explanation of activity colours
|
||||
sampleLabel1.Visible = false;
|
||||
sampleLabel2.Visible = false;
|
||||
sampleLabel3.Visible = false;
|
||||
samplePictureBox1.Visible = false;
|
||||
samplePictureBox2.Visible = false;
|
||||
samplePictureBox3.Visible = false;
|
||||
}
|
||||
|
||||
///
|
||||
/// Set checkbox states accroding to iPerlHeads[i].Disabled states
|
||||
///
|
||||
@@ -683,33 +689,33 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
Top = (ls.iPerlCommunicationsFormTop != 0) ? ls.iPerlCommunicationsFormTop : 150;
|
||||
if (ls.OptoHeadsEnabled != 0) SetCheckBoxStates(ls.OptoHeadsEnabled);
|
||||
|
||||
if (!checkBoxesEditMode)
|
||||
if (!checkBoxesEditMode)
|
||||
{
|
||||
/// Regular activity (not a checkbox edit mode invoked from TBF menu)
|
||||
|
||||
/// Reset opto-data indication
|
||||
for (int i = 0; i < iperlHeads.Count; i++)
|
||||
{
|
||||
/// Reset opto-data indication
|
||||
for (int i = 0; i < iperlHeads.Count; i++)
|
||||
{
|
||||
counters[i].BackColor = OptoNokColor;
|
||||
}
|
||||
}
|
||||
|
||||
/// Set QuidoRS outputs and start the whole communication process
|
||||
/// by incrementing 'currentGroup'.
|
||||
///
|
||||
if (cfg.UseMuxBoards && (quido != null))
|
||||
{
|
||||
quido.SetOutputs((ushort)(16 - currentGroup - 1));
|
||||
/// Set QuidoRS outputs and start the whole communication process
|
||||
/// by incrementing 'currentGroup'.
|
||||
///
|
||||
if (cfg.UseMuxBoards && (quido != null))
|
||||
{
|
||||
quido.SetOutputs((ushort)(16 - currentGroup - 1));
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
}
|
||||
|
||||
currentGroup++;
|
||||
currentGroup++;
|
||||
|
||||
int wtId = 0;
|
||||
int wtId = 0;
|
||||
foreach (var wt in workerThreads)
|
||||
{
|
||||
wt.Start(new Boxes.IntBox(wtId++)); /// Start worker threads !!!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1011
-1010
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user