BenchInfo component is loaded and TBF.Data.SetData( ) is called in Program.Main(.) before MainWnd is created.
This commit is contained in:
@@ -47,7 +47,8 @@ namespace TBF.UI.Process
|
||||
public ProcessTabPageCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitializeTableOfMeters(metersListView, ProcessData.WMsCount);
|
||||
InitializeTestDataTable(testDataListView, null);
|
||||
InitializeTableOfMeters(metersListView, TBF.Data.WMsCount);
|
||||
InitializeDrawing();
|
||||
|
||||
Bridge.ProcedureSelectedHandler += delegate(object sender, ProcedureSelectedEventArgs args)
|
||||
@@ -194,37 +195,37 @@ namespace TBF.UI.Process
|
||||
|
||||
lv.Items.Add(lvi = new ListViewItem(new string[] {
|
||||
Strings.Test,
|
||||
args.Test.Name,
|
||||
args != null ? args.Test.Name : "---",
|
||||
string.Empty
|
||||
}));
|
||||
|
||||
lv.Items.Add(lvi = new ListViewItem(new string[] {
|
||||
Strings.Repetition,
|
||||
string.Format("{0} / {1}", args.RepetitionNr, args.Test.Repeats),
|
||||
args != null ? string.Format("{0} / {1}", args.RepetitionNr, args.Test.Repeats) : "---",
|
||||
string.Empty
|
||||
}));
|
||||
|
||||
lv.Items.Add(new ListViewItem(new string[] {
|
||||
Strings.Q_from,
|
||||
Units.ConvertTo(ProcessData.FlowUnit, args.Test.Qfrom).ToString(),
|
||||
args != null ? Units.ConvertTo(ProcessData.FlowUnit, args.Test.Qfrom).ToString() : "---",
|
||||
ProcessData.FlowUnit.ToDescription()
|
||||
}));
|
||||
|
||||
lv.Items.Add(new ListViewItem(new string[] {
|
||||
Strings.Q_to,
|
||||
Units.ConvertTo(ProcessData.FlowUnit, args.Test.Qto).ToString(),
|
||||
args != null ? Units.ConvertTo(ProcessData.FlowUnit, args.Test.Qto).ToString() : "---",
|
||||
ProcessData.FlowUnit.ToDescription()
|
||||
}));
|
||||
|
||||
lv.Items.Add(new ListViewItem(new string[] {
|
||||
Strings.Target_volume,
|
||||
Units.ConvertTo(ProcessData.VolumeUnit, args.Test.Volume).ToString(),
|
||||
args != null ? Units.ConvertTo(ProcessData.VolumeUnit, args.Test.Volume).ToString() : "---",
|
||||
ProcessData.VolumeUnit.ToDescription()
|
||||
}));
|
||||
|
||||
lv.Items.Add(new ListViewItem(new string[] {
|
||||
Strings.Test_time,
|
||||
args.Test.TestTime.ToString(),
|
||||
args != null ? args.Test.TestTime.ToString() : "---",
|
||||
Unit.s.ToDescription()
|
||||
}));
|
||||
|
||||
@@ -256,6 +257,8 @@ namespace TBF.UI.Process
|
||||
Unit.Pct.ToDescription()
|
||||
}));
|
||||
|
||||
splitContainer2.SplitterDistance = 45 + 17 * lv.Items.Count;
|
||||
|
||||
log.DebugFormat("InitializeTestDataTable: startMassIx={0} massIx={1} volumeIx={2} refErrorIx={3} itemsCount={4}",
|
||||
startMassIx, massIx, volumeIx, refErrorIx, lv.Items.Count);
|
||||
}
|
||||
@@ -270,6 +273,8 @@ namespace TBF.UI.Process
|
||||
/// <param name="waterMeters">Optional water meters to be used as list view item tags</param>
|
||||
void InitializeTableOfMeters(ListView listView, int wmsCount, IList<Results.Entities.WaterMeter> waterMeters = null)
|
||||
{
|
||||
splitContainer3.SplitterDistance = 45 + 17 * wmsCount;
|
||||
|
||||
if (listView.Items.Count != wmsCount)
|
||||
{
|
||||
/// Executed when the number of water meters or register readers changes
|
||||
|
||||
Reference in New Issue
Block a user