diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index c942659f6..03da27986 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1901.0")] -[assembly: AssemblyFileVersion("3.1.1901.0")] +[assembly: AssemblyVersion("3.1.1902.0")] +[assembly: AssemblyFileVersion("3.1.1902.0")] diff --git a/TBF/UI/Process/ProcessTabPageCtrl.cs b/TBF/UI/Process/ProcessTabPageCtrl.cs index aac0688d1..e4c449324 100644 --- a/TBF/UI/Process/ProcessTabPageCtrl.cs +++ b/TBF/UI/Process/ProcessTabPageCtrl.cs @@ -33,6 +33,7 @@ namespace TBF.UI.Process Volume, Pulses, RefPulses, + PulsesPerLtr, SerialNr, Count } @@ -83,15 +84,6 @@ namespace TBF.UI.Process } catch (Exception e) { log.ErrorFormat("ProcessTabPageCtrl.OnTestCompleted() failed: {0}", e.Message); } }; - - Bridge.ProcedureCompletedHandler += delegate(object sender, ProcedureCompletedEventArgs args) - { - try { - if (InvokeRequired) Invoke(new EventHandler(OnProcedureCompleted), sender, args); - else OnProcedureCompleted(sender, args); - } - catch (Exception e) { log.ErrorFormat("ProcessTabPageCtrl.OnProcedureCompleted() failed: {0}", e.Message); } - }; } @@ -104,12 +96,13 @@ namespace TBF.UI.Process /// metersListViewEx columns var cols = ls.ProcMetersColWidths; - metersListView.Columns.Add(Strings.Nr, (cols != null && cols.Length > 0) ? cols[0] : 30 * MainWnd.Dpi / Constants.Dpi100pct); - metersListView.Columns.Add(Strings.Error, (cols != null && cols.Length > 1) ? cols[1] : 50 * MainWnd.Dpi / Constants.Dpi100pct); - metersListView.Columns.Add(Strings.Volume, (cols != null && cols.Length > 2) ? cols[2] : 50 * MainWnd.Dpi / Constants.Dpi100pct); - metersListView.Columns.Add(Strings.Pulses, (cols != null && cols.Length > 3) ? cols[3] : 60 * MainWnd.Dpi / Constants.Dpi100pct); - metersListView.Columns.Add(Strings.Ref_pulses, (cols != null && cols.Length > 4) ? cols[4] : 75 * MainWnd.Dpi / Constants.Dpi100pct); - metersListView.Columns.Add(Strings.SerialNr, (cols != null && cols.Length > 5) ? cols[5] : 100 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.Nr, (cols != null && cols.Length > 0) ? cols[0] : 30 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.Error, (cols != null && cols.Length > 1) ? cols[1] : 50 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.Volume, (cols != null && cols.Length > 2) ? cols[2] : 50 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.Pulses, (cols != null && cols.Length > 3) ? cols[3] : 60 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.Ref_pulses, (cols != null && cols.Length > 4) ? cols[4] : 75 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.PulsesPerLtr, (cols != null && cols.Length > 5) ? cols[5] : 90 * MainWnd.Dpi / Constants.Dpi100pct); + metersListView.Columns.Add(Strings.SerialNr, (cols != null && cols.Length > 6) ? cols[6] : 100 * MainWnd.Dpi / Constants.Dpi100pct); /// testDataListViewEx columns cols = ls.ProcTestDataColWidths; @@ -258,9 +251,6 @@ namespace TBF.UI.Process })); 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); } @@ -337,7 +327,7 @@ namespace TBF.UI.Process int pressMtrUpMsrdIx, pressMtrDownMsrdIx; /// int regValveSetpIx, pumpSetpIx; - + /// IDrawingItCmpntWithMeasuredVal[] cmpntWithMeasuredVal; IDrawingItCmpntWithSetpoint[] cmpntWithSetpoint; IDrawingItCmpntWithCustomBmp[] cmpntWithCustomBmp; @@ -351,6 +341,7 @@ namespace TBF.UI.Process { processDrawingCtrl.SupressRedraws = true; + processDrawingCtrl.ClearItems(); int id = 1; int msrdIx = 0; int setpIx = 0; @@ -589,8 +580,10 @@ namespace TBF.UI.Process void OnProcedureSelected(object sender, ProcedureSelectedEventArgs args) { currentMetersKind = args.Procedure.MetersKind; - Invalidate(); - } + InitializeDrawing(); + InitializeTestDataTable(testDataListView, null); + InitializeTableOfMeters(metersListView, TBF.Data.WMsCount); + } void OnTestSelected(object sender, TestSelectedEventArgs args) { @@ -818,6 +811,7 @@ namespace TBF.UI.Process lvi.SubItems[(int)Column.Volume].Text = rr.WMVolume.ToString("F1"); lvi.SubItems[(int)Column.Pulses].Text = rr.WMPulses.ToString(); lvi.SubItems[(int)Column.RefPulses].Text = rr.WMRefPulses.ToString(); + lvi.SubItems[(int)Column.PulsesPerLtr].Text = rr.PulsesPerLtr.ToString(); } else { @@ -825,6 +819,7 @@ namespace TBF.UI.Process lvi.SubItems[(int)Column.Volume].Text = string.Empty; lvi.SubItems[(int)Column.Pulses].Text = string.Empty; lvi.SubItems[(int)Column.RefPulses].Text = string.Empty; + lvi.SubItems[(int)Column.PulsesPerLtr].Text = string.Empty; } if (rr is TBF.Rig.RegisterReaders.S640Stream.S640Stream) @@ -849,10 +844,6 @@ namespace TBF.UI.Process void UpdateRouteMsrdValuesAndSetpoints(UInt128 route) { - //if (route != processDrawingCtrl.Route) - //{ - // int a = 5; - //} processDrawingCtrl.Route = route; for (int i = 0; i < cmpntWithMeasuredVal.Length; i++) @@ -928,10 +919,6 @@ namespace TBF.UI.Process } } - void OnProcedureCompleted(object sender, ProcedureCompletedEventArgs args) - { - } - private void ProcessTabPageCtrl_Paint(object sender, PaintEventArgs e) { System.Drawing.Graphics formGraphics = this.CreateGraphics();