diff --git a/Config/Units.cs b/Config/Units.cs index b6111c514..094580556 100644 --- a/Config/Units.cs +++ b/Config/Units.cs @@ -30,7 +30,7 @@ namespace Config [Description("hr")] hour, /// 1 hour = 60 min = 3600 s [Description("ms")] ms, /// 1 ms = 0.001 s - [Description("°C")] C, /// * degree Celsius + [Description("°C")] C, /// * degree Celsius (°C) [Description("°F")] F, /// degree Fahrenheit [Description("K")] K, /// degree Kelvin @@ -293,8 +293,8 @@ namespace Config case Unit.hour: return v / 3600; case Unit.ms: return 1000 * v; - /// Temperature: internal representation in degree C - case Unit.C: return v; /// degree Celsius + /// Temperature: internal representation in °C + case Unit.C: return v; /// degree Celsius (°C) case Unit.F: return 1.8 * v + 32; /// degree Fahrenheit case Unit.K: return v + 273.15; /// degree Kelvin @@ -360,8 +360,8 @@ namespace Config case Unit.hour: return 3600 * v; case Unit.ms: return v / 1000; - /// Temperature: internal representation in degree C - case Unit.C: return v; /// degree Celsius + /// Temperature: internal representation in °C + case Unit.C: return v; /// degree Celsius (°C) case Unit.F: return 5 * (v-32) / 9; /// degree Fahrenheit case Unit.K: return v - 273.15; /// degree Kelvin diff --git a/GraphLib/DataSource.cs b/GraphLib/DataSource.cs index 052b7b78b..532c9a1a7 100644 --- a/GraphLib/DataSource.cs +++ b/GraphLib/DataSource.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Text; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; @@ -159,7 +160,46 @@ namespace GraphLib { grid_off_y = off_y; } - + + + /// + /// Load Samples from a file. Returns loaded points count. + /// + /// File pathname + /// Loaded points count + public int LoadSamples(string pathName, out float yMin, out float yMax) + { + yMin = float.MaxValue; + yMax = float.MinValue; + try + { + Int64 size = new FileInfo(pathName).Length; + if ((size % 8) != 0) return 0; + int samplesCount = (int)(size / 8L) - 1; + if (samplesCount <= 0) return 0; + + PointF[] newSamples = new PointF[samplesCount]; + using (BinaryReader reader = new BinaryReader(File.Open(pathName, FileMode.Open))) + { + for (int i = 0; i < samplesCount; i++) + { + newSamples[i].X = reader.ReadSingle(); + newSamples[i].Y = reader.ReadSingle(); + } + yMin = reader.ReadSingle(); + yMax = reader.ReadSingle(); + } + + Samples = newSamples; + return samplesCount; + } + catch (Exception exc) + { + return 0; + } + } + + [Category("Properties")] // Take this out, and you will soon have problems with serialization; [DefaultValue(typeof(string), "")] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] diff --git a/GraphLib/PlotterDisplayEx.cs b/GraphLib/PlotterDisplayEx.cs index ad66e49a5..3adf8e24d 100644 --- a/GraphLib/PlotterDisplayEx.cs +++ b/GraphLib/PlotterDisplayEx.cs @@ -374,7 +374,14 @@ namespace GraphLib if (gPane.Sources.Count > 0) { int val = hScrollBar1.Value; - gPane.starting_idx = (int)(gPane.Sources[0].Length * (float)val / 10000.0f); + + int maxLen = 0; + foreach (var s in DataSources) + { + if (s.Length > maxLen) maxLen = s.Length; + } + + gPane.starting_idx = (int)(maxLen * (float)val / 10000.0f); gPane.Invalidate(); } } diff --git a/GraphLib/PlotterDisplayEx.designer.cs b/GraphLib/PlotterDisplayEx.designer.cs index 92c5ce504..1050afb80 100644 --- a/GraphLib/PlotterDisplayEx.designer.cs +++ b/GraphLib/PlotterDisplayEx.designer.cs @@ -56,6 +56,7 @@ namespace GraphLib this.tb1.ShowToolTips = true; this.tb1.Size = new System.Drawing.Size(80, 26); this.tb1.TabIndex = 1; + this.tb1.Visible = false; this.tb1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tb1_ButtonClick); // // tbbSave diff --git a/GraphLib/PlotterDisplayEx.resx b/GraphLib/PlotterDisplayEx.resx index 6e31611d1..35ef645d3 100644 --- a/GraphLib/PlotterDisplayEx.resx +++ b/GraphLib/PlotterDisplayEx.resx @@ -125,64 +125,64 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJl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wEE - wAADOgFgAlgBVgG7AbMBfwFPAf4ByAGMAUQB/wGWAYABUQH3AZYBgAFRAfcBsAF/AUwB/gNOAZQUAAFC + AQEQAAGJAWoBSQH2AfkB9QHxAf8B/AHjAc0B/wH7AeMBzQH/AfkB4AHIAf8B+AHcAcIB/wH9AfsB+AH/ + AfwB5gHNAf8B4gG2AYQB/wJUAVIBphQAAxYBHwMRARcDAgEDuAABngF1AU0B+gH3AfIB7AH/AfgB9AHu + Af8B+AHzAe0B/wH4AfMB7QH/AfgB8gHsAf8B8gHmAdcB/wHiAbIBcQH/AZABcQFiAfYDBQEHFAADAwEE + wAADOgFgAlgBVgG7AbEBfwFPAf4ByAGMAUMB/wGSAX8BUQH3AZIBfwFRAfcBrgF/AUwB/gNOAZQUAAFC AU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/gQAB3wX/AeABBwHHBf8CAAHBAf8BwAED AcABAwIAAcAB/wHAAQMBwAEDAgABwAE/AcABAQHAAQECAAHAAQ8BwAEBAcABAQIAAcABAwHAAQEBwAEB AgABwAEBAcABAQHAAQECAAHAAQEBwAEBAcABAQIAAcABBwHAAQEBwAEBAgABwAEPAcABAQHAAQEBgAEB diff --git a/GraphLib/PlotterGraphPaneEx.cs b/GraphLib/PlotterGraphPaneEx.cs index 39d200573..57fade466 100644 --- a/GraphLib/PlotterGraphPaneEx.cs +++ b/GraphLib/PlotterGraphPaneEx.cs @@ -84,7 +84,7 @@ namespace GraphLib public float CurXD1 = 0; - public float grid_distance_x = 200; // grid distance in samples ( draw a vertical line every 200 samples ) + public float grid_distance_x = 60; // grid distance in samples ( draw a vertical line every 60 samples ) public float grid_off_x = 0; public float GraphCaptionLineHeight = 28; @@ -452,7 +452,7 @@ namespace GraphLib if (layout == LayoutMode.NORMAL) { - DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (10 + yLabelAreaWidth), curOffY); + DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (50 + yLabelAreaWidth) + (CurGraphIdx==0 ? 0 : 50), curOffY); if (CurGraphIdx == 0) { @@ -600,7 +600,7 @@ namespace GraphLib List marker_pos = DrawGraphCurve(CurGraphics, source, CurOffX, curOffY + GraphCaptionLineHeight / 2); - DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (10 + yLabelAreaWidth), pad_top); + DrawGraphCaption(CurGraphics, source, marker_pos, CurOffX + CurGraphIdx * (50 + yLabelAreaWidth) + (CurGraphIdx == 0 ? 0 : 50), pad_top); DrawYLabels(CurGraphics, source, marker_pos, CurOffX, curOffY); @@ -776,12 +776,15 @@ namespace GraphLib float y0 = (float)(source.grid_off_y * source.CurGraphHeight / source.DY + source.off_Y); // draw horizontal zero grid lines - g.DrawLine(p2, new Point((int)CurrOffX, (int)(CurOffY + y0 + 0.5f)), new Point((int)(CurrOffX + source.CurGraphWidth + 0.5f), (int)(CurOffY + y0 + 0.5f))); + if (0 >= source.YD0 && 0 <= source.YD1) + { + g.DrawLine(p2, new Point((int)CurrOffX, (int)(CurOffY + y0 + 0.5f)), new Point((int)(CurrOffX + source.CurGraphWidth + 0.5f), (int)(CurOffY + y0 + 0.5f))); + } // draw horizontal grid lines - for (Idx = (int)(source.grid_off_y);Idx > (int)(source.YD0 ); Idx -= (int)source.grid_distance_y) + for (float idy = source.grid_off_y; idy > source.YD0; idy -= source.grid_distance_y) { - float y = (float)(Idx * source.CurGraphHeight) / source.DY + source.off_Y; + float y = (idy * source.CurGraphHeight) / source.DY + source.off_Y; if (y >= 0 && y < source.CurGraphHeight) { @@ -792,9 +795,9 @@ namespace GraphLib } // draw horizontal grid lines - for (Idx = (int)(source.grid_off_y); Idx < (int)(source.YD1 ); Idx += (int)source.grid_distance_y) + for (float idy = source.grid_off_y; idy < source.YD1; idy += source.grid_distance_y) { - float y = (float)Idx * source.CurGraphHeight / source.DY + source.off_Y; + float y = (idy * source.CurGraphHeight) / source.DY + source.off_Y; if (y >= 0 && y < source.CurGraphHeight) { @@ -968,71 +971,58 @@ namespace GraphLib using (Pen pen = new Pen(b)) { pen.DashPattern = new float[] { 2, 2 }; + + float GridDistY = source.grid_distance_y; + /// + if (source.AutoScaleY) + { + // calculate a matching grid distance + GridDistY = -Utilities.MostSignificantDigit(source.DY); + + if (GridDistY == 0) + { + GridDistY = source.grid_distance_y; + } + } // draw labels for horizontal lines if (source.DY != 0) { - float Idx = 0; + float y0 = (float)(source.grid_off_y * source.CurGraphHeight / source.DY + source.off_Y); + if (y0 >= 0 && y0 < source.CurGraphHeight) + { + String value = (source.OnRenderYAxisLabel == null) ? "0" : source.OnRenderYAxisLabel(source, 0); + SizeF dim = g.MeasureString(value, legendFont); + g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y0 + 0.5f + dim.Height / 2))); + } - float y0 = (float)(source.grid_off_y * source.CurGraphHeight / source.DY + source.off_Y); - - String value = "" + Idx; - - if (source.OnRenderYAxisLabel != null) - { - value = source.OnRenderYAxisLabel(source, Idx); - } - - SizeF dim = g.MeasureString(value, legendFont); - g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y0 + 0.5f + dim.Height / 2))); - - float GridDistY = source.grid_distance_y; - - if (source.AutoScaleY) - { - // calculate a matching grid distance - GridDistY = - Utilities.MostSignificantDigit(source.DY ); - - if (GridDistY == 0) - { - GridDistY = source.grid_distance_y; - - } - } - - for (Idx = (source.grid_off_y); Idx > (source.Cur_YD0); Idx -= GridDistY) + for (float Idx = source.grid_off_y; Idx > source.YD0; Idx -= GridDistY) { if (Idx != 0) { - float y1 = (float)((Idx) * source.CurGraphHeight) / source.DY + source.off_Y; + float y1 = (float)(Idx * source.CurGraphHeight) / source.DY + source.off_Y; - value = "" + (Idx); - - if (source.OnRenderYAxisLabel != null) - { - value = source.OnRenderYAxisLabel(source, Idx); - } - - dim = g.MeasureString(value, legendFont); - g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y1 + 0.5f + dim.Height / 2))); + if (y1 >= 0 && y1 < source.CurGraphHeight) + { + string value = (source.OnRenderYAxisLabel == null) ? Idx.ToString() : source.OnRenderYAxisLabel(source, Idx); + SizeF dim = g.MeasureString(value, legendFont); + g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y1 + 0.5f + dim.Height / 2))); + } } } - for (Idx = (source.grid_off_y); Idx < (source.Cur_YD1); Idx += GridDistY) + for (float Idx = source.grid_off_y; Idx < source.YD1; Idx += GridDistY) { if (Idx != 0) { - float y2 = (float)((Idx) * source.CurGraphHeight) / source.DY + source.off_Y; + float y2 = (float)(Idx * source.CurGraphHeight) / source.DY + source.off_Y; - value = "" + (Idx); - - if (source.OnRenderYAxisLabel != null) - { - value = source.OnRenderYAxisLabel(source, Idx); - } - - dim = g.MeasureString(value, legendFont); - g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y2 + 0.5f + dim.Height / 2))); + if (y2 >= 0 && y2 < source.CurGraphHeight) + { + string value = (source.OnRenderYAxisLabel == null) ? Idx.ToString() : source.OnRenderYAxisLabel(source, Idx); + SizeF dim = g.MeasureString(value, legendFont); + g.DrawString(value, legendFont, b, new PointF((int)offset_x - dim.Width, (int)(offset_y + y2 + 0.5f + dim.Height / 2))); + } } } } diff --git a/TBF/BenchControl/GenericDevices/IPlotter.cs b/TBF/BenchControl/GenericDevices/IPlotter.cs index 53352dcb3..e8fd9166d 100644 --- a/TBF/BenchControl/GenericDevices/IPlotter.cs +++ b/TBF/BenchControl/GenericDevices/IPlotter.cs @@ -11,6 +11,6 @@ namespace TBF.BenchControl.GenericDevices void UpdateGraph(int graphId, float x, float y); - void StopGraph(int graphId); + void StopGraph(int graphId, float ymin, float ymax); } } diff --git a/TBF/BenchControl/Sequences/Plotter.cs b/TBF/BenchControl/Sequences/Plotter.cs index ab81df4e3..90d4b2142 100644 --- a/TBF/BenchControl/Sequences/Plotter.cs +++ b/TBF/BenchControl/Sequences/Plotter.cs @@ -33,7 +33,8 @@ namespace TBF.BenchControl.Sequences int graphId = nextGraphId++; string directory = Path.Combine(TBF.Program.GraphsDir, batchNr.ToString(), testName, repetition.ToString()); Directory.CreateDirectory(directory); - writers.Add(graphId, new BinaryWriter(File.Open(Path.Combine(directory, caption), FileMode.Create))); + BinaryWriter writer = new BinaryWriter(File.Open(Path.Combine(directory, caption), FileMode.Create)); + writers.Add(graphId, writer); log.InfoFormat("Graph file #{0} successfully created (batch={1} test={2} repet={3} caption={4})", graphId, batchNr, testName, repetition, caption); return graphId; @@ -60,12 +61,14 @@ namespace TBF.BenchControl.Sequences } } - public void StopGraph(int graphId) + public void StopGraph(int graphId, float ymin, float ymax) { try { BinaryWriter writer = writers[graphId]; - writer.Close(); + writer.Write(ymin); + writer.Write(ymax); + writer.Close(); writers.Remove(graphId); } catch (Exception exc) diff --git a/TBF/BenchControl/Sequences/ProcessData.cs b/TBF/BenchControl/Sequences/ProcessData.cs index 1342a33a5..4577a558f 100644 --- a/TBF/BenchControl/Sequences/ProcessData.cs +++ b/TBF/BenchControl/Sequences/ProcessData.cs @@ -81,14 +81,14 @@ namespace TBF.BenchControl.Sequences public static Statistics AmbPressStat = new Statistics(new Plotter("Ambient pressure")); public static Statistics AmbHumiStat = new Statistics(new Plotter("Ambient humidity")); - public static Statistics TempUpStat = new Statistics(0, 5, true, new Plotter("Temperature up")); - public static Statistics TempDownStat = new Statistics(0, 5, true, new Plotter("Temperature down")); - public static Statistics TempDiffStat = new Statistics(0, 5, true); - public static Statistics TempDivStat = new Statistics(0, 5, true, new Plotter("Temperature div")); - public static Statistics PressUpStat = new Statistics(5, 5, true, new Plotter("Pressure up")); - public static Statistics PressDownStat = new Statistics(5, 5, true, new Plotter("Pressure down")); - public static Statistics PressDeltaStat = new Statistics(5, 5, true); - public static Statistics RefFlowStat = new Statistics(5, 5, true, new Plotter("Flow")); + public static Statistics TempUpStat = new Statistics(0, 7, true, new Plotter("Temperature up")); + public static Statistics TempDownStat = new Statistics(0, 7, true, new Plotter("Temperature down")); + public static Statistics TempDiffStat = new Statistics(0, 7, true); + public static Statistics TempDivStat = new Statistics(0, 7, true, new Plotter("Temperature div")); + public static Statistics PressUpStat = new Statistics(5, 7, true, new Plotter("Pressure up")); + public static Statistics PressDownStat = new Statistics(5, 7, true, new Plotter("Pressure down")); + public static Statistics PressDeltaStat = new Statistics(5, 7, true); + public static Statistics RefFlowStat = new Statistics(5, 7, true, new Plotter("Flow")); public static Statistics TempRefHiStat = new Statistics(); public static Statistics TempRefLoStat = new Statistics(); diff --git a/TBF/BenchControl/Sequences/Statistics.cs b/TBF/BenchControl/Sequences/Statistics.cs index ca44d25ee..94aa6f94d 100644 --- a/TBF/BenchControl/Sequences/Statistics.cs +++ b/TBF/BenchControl/Sequences/Statistics.cs @@ -93,7 +93,7 @@ namespace TBF.BenchControl.Sequences if (recordingInProgress) { recordingInProgress = false; - plotter.StopGraph(graphId); + plotter.StopGraph(graphId, (float)min, (float)max); } } @@ -190,7 +190,13 @@ namespace TBF.BenchControl.Sequences if (MedianFilter) { Array.Sort(sorted); +#if false filteredValue = sorted[FilterSize / 2]; +#else + double sum2 = 0; + for (int j = 1; j < FilterSize - 1; j++) sum2 += sorted[j]; + filteredValue = sum2 / (FilterSize - 2); +#endif } else { @@ -208,6 +214,6 @@ namespace TBF.BenchControl.Sequences public int StartGraph(int batchNr, string testName, int repetition) { return 1; } public void UpdateGraph(int graphId, float x, float y) { } - public void StopGraph(int graphId) { } + public void StopGraph(int graphId, float ymin, float ymax) { } } } diff --git a/TBF/BenchControl/StateMachine.cs b/TBF/BenchControl/StateMachine.cs index 606b43f9f..ad1b627c0 100644 --- a/TBF/BenchControl/StateMachine.cs +++ b/TBF/BenchControl/StateMachine.cs @@ -346,7 +346,11 @@ namespace TBF.BenchControl /// public static void StopDevices() { - foreach (var dev in devices) dev.StopDevice(); + foreach (var dev in devices) + { + UiBridge.Bridge.OnActivity(null, string.Format("1. {0}", dev.Name)); /// Info + dev.StopDevice(); + } } /// @@ -356,7 +360,11 @@ namespace TBF.BenchControl /// public static void StopDevices2() { - foreach (var dev in devices) dev.StopDevice2(); + foreach (var dev in devices) + { + UiBridge.Bridge.OnActivity(null, string.Format("2. {0}", dev.Name)); /// Info + dev.StopDevice2(); + } } diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 4335fb437..7211b5c30 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -135,6 +135,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection //------------------------------------------------ RefFlow.Val = (1.0 + 0.2 * Math.Sin(2 * Math.PI * (float)remainingTime.Val / test.TstTime)) * (test.Qfrom + test.Qto) / 2.0; + PressUp.Val = 2.7f; + PressDown.Val = 2.2f; UpdateAllStatistics(StateMachine.Time); } diff --git a/TBF/LocalSettings.cs b/TBF/LocalSettings.cs index 992c4f00e..0873e1ca7 100644 --- a/TBF/LocalSettings.cs +++ b/TBF/LocalSettings.cs @@ -218,6 +218,15 @@ namespace TBF public string[] RsltItems_Printer_CombinedWM; /// obsolete public string[] RsltItems_Printer_HeatM; /// obsolete + /// Configuration of graphs + public bool Graph1_On; + public bool Graph2_On; + public bool Graph3_On; + public bool Graph4_On; + public bool Graph5_On; + public bool Graph6_On; + public GraphLib.PlotterGraphPaneEx.LayoutMode GraphsLayoutMode; + [XmlArrayAttribute("RsltsClmnWidths")] public int[] RsltsClmnWidths; [XmlIgnore] diff --git a/TBF/MainWnd.cs b/TBF/MainWnd.cs index bc8533392..2e62682bf 100644 --- a/TBF/MainWnd.cs +++ b/TBF/MainWnd.cs @@ -114,7 +114,7 @@ namespace TBF iPerlHeadsToolStripMenuItem.Visible = false; #endif - CycleRunning = false; + CycleRunning = true; benchInitializationFailed = false; /// @@ -547,8 +547,11 @@ namespace TBF if (BenchControl.StateMachine.Running && CycleRunning) { - MessageBox.Show(Strings.Finish_the_session_please, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Information); - if (e is FormClosingEventArgs) (e as FormClosingEventArgs).Cancel = true; + MessageBox.Show(Strings.Finish_the_session_please, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + if (e is FormClosingEventArgs) + { + (e as FormClosingEventArgs).Cancel = true; + } return; } @@ -559,6 +562,13 @@ namespace TBF { if (BenchControl.StateMachine.Running) { + Bridge.Ui2Bench(UI2BenchCmd.Shutdown); /// Drain tanks and quit the main sequence + do + { + Thread.Sleep(100); + } + while (BenchControl.StateMachine.Running); /// Wait until StateMachine.Worker() completes + /// Show 'Closing_Test_Bench_Framework' modeless window in separate thread var form = new TBF.Forms.ModelessActivityForm() { @@ -567,14 +577,11 @@ namespace TBF FontSize = 24, FontStyle = FontStyle.Regular, BackgroundColor = Color.PeachPuff, - StartActivityHandler = false, + StartActivityHandler = true, }; Thread formThread = new Thread(() => form.ShowDialog()); formThread.Start(); - Bridge.Ui2Bench(UI2BenchCmd.Shutdown); /// Drain tanks and quit the main sequence - - while (BenchControl.StateMachine.Running) { } /// Wait until StateMachine.Worker() completes BenchControl.StateMachine.StopDevices(); BenchControl.StateMachine.StopDevices2(); diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index a79b842b2..fd20e9fbe 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.803.0")] -[assembly: AssemblyFileVersion("2.18.803.0")] +[assembly: AssemblyVersion("2.18.810.0")] +[assembly: AssemblyFileVersion("2.18.810.0")] diff --git a/TBF/Resources/Strings.Designer.cs b/TBF/Resources/Strings.Designer.cs index 18d229fb7..78e8d5065 100644 --- a/TBF/Resources/Strings.Designer.cs +++ b/TBF/Resources/Strings.Designer.cs @@ -996,6 +996,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to current. + /// + internal static string current { + get { + return ResourceManager.GetString("current", resourceCulture); + } + } + /// /// Looks up a localized string similar to Data. /// @@ -1680,6 +1689,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Flow. + /// + internal static string Flow { + get { + return ResourceManager.GetString("Flow", resourceCulture); + } + } + /// /// Looks up a localized string similar to Flow [m3/h]. /// @@ -2868,6 +2886,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Pressure. + /// + internal static string Pressure { + get { + return ResourceManager.GetString("Pressure", resourceCulture); + } + } + /// /// Looks up a localized string similar to Pressure [bar]. /// @@ -3462,6 +3489,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Refresh. + /// + internal static string Refresh { + get { + return ResourceManager.GetString("Refresh", resourceCulture); + } + } + /// /// Looks up a localized string similar to Reg. valve. /// diff --git a/TBF/Resources/Strings.cs.resx b/TBF/Resources/Strings.cs.resx index 27cc6ff9f..fb544334f 100644 --- a/TBF/Resources/Strings.cs.resx +++ b/TBF/Resources/Strings.cs.resx @@ -1320,4 +1320,16 @@ Ukončete měření prosím + + Obnovit + + + současný + + + Průtok + + + Tlak + \ No newline at end of file diff --git a/TBF/Resources/Strings.de.resx b/TBF/Resources/Strings.de.resx index 149cd3fa7..9f3b2fe24 100644 --- a/TBF/Resources/Strings.de.resx +++ b/TBF/Resources/Strings.de.resx @@ -1461,4 +1461,16 @@ Beenden Sie die Messungen bitte + + Aktualisierung + + + aktuell + + + Durchfluss + + + Druck + \ No newline at end of file diff --git a/TBF/Resources/Strings.resx b/TBF/Resources/Strings.resx index 84790ae18..8a4b72b80 100644 --- a/TBF/Resources/Strings.resx +++ b/TBF/Resources/Strings.resx @@ -1852,4 +1852,16 @@ Finish measurements please + + Refresh + + + current + + + Flow + + + Pressure + \ No newline at end of file diff --git a/TBF/Screens/Graph.cs b/TBF/Screens/Graph.cs deleted file mode 100644 index 362bc1a48..000000000 --- a/TBF/Screens/Graph.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace TBF.Screens -{ - public class Graph - { - public Graph(string fileName) - { - - } - } -} diff --git a/TBF/Screens/GraphsTabPageCtrl.cs b/TBF/Screens/GraphsTabPageCtrl.cs index c84bcc4d3..8aa47d15a 100644 --- a/TBF/Screens/GraphsTabPageCtrl.cs +++ b/TBF/Screens/GraphsTabPageCtrl.cs @@ -1,101 +1,291 @@ /// -/// Copyright (c) 2017 Sensus Metering Systems +/// Copyright (c) 2018 Sensus Slovensko a.s. /// using System; using System.Drawing; +using System.IO; using System.Windows.Forms; using TBF.Resources; using TBF.UiBridge; using GraphLib; +using log4net; namespace TBF.Screens { public partial class GraphsTabPageCtrl : UserControl { - readonly int numGraphs; - DataSource[] dataSources; + static readonly ILog log = LogManager.GetLogger(typeof(GraphsTabPageCtrl)); + + + static readonly GraphInfo[] SupportedGraphs = new GraphInfo[] { + new GraphInfo { FileName = "Flow", Caption = string.Format("Q [m3/h]", Strings.Flow) }, + new GraphInfo { FileName = "Pressure up", Caption = string.Format("Pr up [bar]", Strings.Pressure) }, + new GraphInfo { FileName = "Pressure down", Caption = string.Format("Pr dw [bar]", Strings.Pressure) }, + new GraphInfo { FileName = "Temperature up", Caption = string.Format("T up [°C]", Strings.Temperature) }, + new GraphInfo { FileName = "Temperature down", Caption = string.Format("T dw [°C]", Strings.Temperature) }, + new GraphInfo { FileName = "Temperature div", Caption = string.Format("T di [°C]", Strings.Temperature) }, + }; + + + PlotterGraphPaneEx.LayoutMode layoutMode; + CheckBox[] checkBoxes; + string selectedGraphsPath; + int selectedBatchNr; + string selectedTestName; public GraphsTabPageCtrl() { InitializeComponent(); - button1.Text = Strings.ClearBtnText; - plotterDisplayEx.Smoothing = System.Drawing.Drawing2D.SmoothingMode.None; + /// checkBoxes array must be initialized before other actions + checkBoxes = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4, checkBox5, checkBox6 }; - dataSources = CreateDataSources(new string[] { "Flow", "Temperature", "Pressure", "Reg. valve position" }); - numGraphs = dataSources.Length; - CalcDataGraphs(plotterDisplayEx, dataSources); + Localize(); - plotterDisplayEx.Refresh(); + UpdateCheckBoxesVisibility(); + checkBox1.Checked = Program.LocalSettings.Graph1_On; + checkBox2.Checked = Program.LocalSettings.Graph2_On; + checkBox3.Checked = Program.LocalSettings.Graph3_On; + checkBox4.Checked = Program.LocalSettings.Graph4_On; + checkBox5.Checked = Program.LocalSettings.Graph5_On; + checkBox6.Checked = Program.LocalSettings.Graph6_On; - Bridge.ProcessDataHandler += delegate(object sender, ProcessDataEventArgs args) + layoutMode = Program.LocalSettings.GraphsLayoutMode; + layoutModeComboBox.Text = layoutMode.ToString(); + for (PlotterGraphPaneEx.LayoutMode mode = 0; mode <= PlotterGraphPaneEx.LayoutMode.TILES_HOR; mode++) { - if (InvokeRequired) - { - Invoke(new EventHandler(OnProcessData), sender, args); - } - else OnProcessData(sender, args); - }; - } + layoutModeComboBox.Items.Add(mode.ToString()); + } - private void button1_Click(object sender, EventArgs e) - { - /// TODO: implement - } + UpdateTestsHistory(testsHistoryTreeView); + + selectedGraphsPath = null; - void OnProcessData(object sender, ProcessDataEventArgs args) - { - - //if (!paused && isRunning == true) + //Bridge.ProcessDataHandler += delegate(object sender, ProcessDataEventArgs args) //{ - //try - //{ - // gPane.starting_idx += Math.Min(RichTextBoxFinds.BenchControl.StateMachine.; - // UpdateScrollBar(); - // gPane.Invalidate(); - //} - //catch { } - //} + // if (InvokeRequired) + // { + // Invoke(new EventHandler(OnProcessData), sender, args); + // } + // else OnProcessData(sender, args); + //}; } - DataSource[] CreateDataSources(string[] names) + //void OnProcessData(object sender, ProcessDataEventArgs args) + //{ + + // if (!paused && isRunning == true) + // { + // try + // { + // gPane.starting_idx += Math.Min(RichTextBoxFinds.BenchControl.StateMachine.; + // UpdateScrollBar(); + // gPane.Invalidate(); + // } + // catch { } + // } + //} + + void Localize() { - DataSource[] ds = new DataSource[names.Length]; - - for (int i = 0; i < names.Length; i++) + refreshButton.Text = Strings.Refresh; + for (int i = 0; i < checkBoxes.Length; i++) { - ds[i] = new DataSource(); - ds[i].Name = names[i]; - ds[i].OnRenderXAxisLabel += RenderXLabel; - ds[i].OnRenderYAxisLabel = RenderYLabel; - ds[i].Length = 5800; - ds[i].AutoScaleY = false; - ds[i].SetDisplayRangeY(-250, 250); - ds[i].SetGridDistanceY(100); + if (i < SupportedGraphs.Length) + { + checkBoxes[i].Text = SupportedGraphs[i].Caption; + } } - - return ds; } - protected void CalcDataGraphs(PlotterDisplayEx display, DataSource[] dataSources) - { - this.SuspendLayout(); - - display.SetDisplayRangeX(0, 400); - display.PanelLayout = PlotterGraphPaneEx.LayoutMode.STACKED; - - display.DataSources.Clear(); - for (int j = 0; j < dataSources.Length; j++) - { - display.DataSources.Add(dataSources[j]); + void UpdateCheckBoxesVisibility() + { + for (int i = 0; i < checkBoxes.Length; i++) + { + checkBoxes[i].Visible = (i < SupportedGraphs.Length); } + } - ApplyColorSchema(display); + private void refreshButton_Click(object sender, EventArgs e) + { + UpdateTestsHistory(testsHistoryTreeView); + } + + void UpdateTestsHistory(TreeView treeView) + { + try + { + string[] batches = Directory.GetDirectories(Program.GraphsDir); + treeView.Nodes.Clear(); + for (int i = batches.Length - 1; i >= Math.Max(0, batches.Length - 20); i--) + { + string b = batches[i]; + string bstr = Path.GetFileName(b); + if ((TBF.BenchControl.Sequences.ProcessData.BatchRslts != null) && bstr.Equals(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.BatchNr.ToString())) + { + bstr = Strings.current; + } + TreeNode node = new TreeNode(bstr); + node.Tag = null; + treeView.Nodes.Add(node); + string[] tests = Directory.GetDirectories(b); + foreach (var t in tests) + { + string testNameStr = Path.GetFileName(t); + TreeNode subnode = new TreeNode(testNameStr); + node.Nodes.Add(subnode); + string[] repetitions = Directory.GetDirectories(t); + if (repetitions.Length == 1) + { + subnode.Tag = string.Format("{0}~{1}~{2}", repetitions[0], bstr, testNameStr); + } + else if (repetitions.Length > 1) + { + subnode.Tag = null; + foreach (var r in repetitions) + { + string repetStr = Path.GetFileName(r); + TreeNode subsubnode = new TreeNode(repetStr); + subsubnode.Tag = string.Format("{0}~{1}~{2}/{3}", r, bstr, testNameStr, repetStr); + subnode.Nodes.Add(subsubnode); + } + } + else + { + subnode.Tag = null; + } + } + } + } + catch (Exception exc) + { + log.ErrorFormat("UpdateTestsHistory() failed: {0}", exc.Message); + } + } + + + private void testsHistoryTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) + { + if (e.Node.Tag is string) + { + string[] fields = (e.Node.Tag as string).Split(new char[]{'~'}); + selectedGraphsPath = fields[0]; + selectedBatchNr = int.Parse(fields[1]); + selectedTestName = fields[2]; + ShowGraphs(plotterDisplayEx, selectedGraphsPath, selectedBatchNr, selectedTestName); + } + } + + + void ShowGraphs(PlotterDisplayEx display, string path, int batchNr, string testName) + { + Color[] colors = { Color.DarkRed, + Color.DarkSlateGray, + Color.DarkCyan, + Color.DarkGreen, + Color.DarkBlue , + Color.DarkMagenta, + Color.DeepPink }; + + float[] gridY = { 0.0002f, 0.0005f, 0.001f, 0.002f, 0.005f, 0.01f, 0.02f, 0.05f, 0.1f, 0.2f, 0.5f, 1, 2, 5, 10, 20, 50, 100, 200, 500 }; + + this.SuspendLayout(); + + display.Smoothing = System.Drawing.Drawing2D.SmoothingMode.None; + display.SetDisplayRangeX(0, 300); + display.PanelLayout = layoutMode; + display.BackgroundColorTop = Color.White; + display.BackgroundColorBot = Color.White; + display.SolidGridColor = Color.LightGray; + display.DashedGridColor = Color.LightGray; + + display.DataSources.Clear(); + + bool first = true; + for (int i = 0; i < checkBoxes.Length; i++) + { + if (checkBoxes[i].Checked && SupportedGraphs.Length > i) + { + DataSource dataSrc = new DataSource(); + + float ymin; + float ymax; + int samplesCount = dataSrc.LoadSamples(Path.Combine(path, SupportedGraphs[i].FileName), out ymin, out ymax); + + /// Following section of code makes sure graps 1, 2 and graphs 3, 4, 5 use the same scale (Y-axis) + DataSource dummyDS = new DataSource(); + float y1, y2, y3, y4; + switch (i) + { + case 0: + default: + break; + case 1: + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[2].FileName), out y1, out y2); + if (y1 < ymin) ymin = y1; + if (y2 > ymax) ymax = y2; + break; + case 2: + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[1].FileName), out y1, out y2); + if (y1 < ymin) ymin = y1; + if (y2 > ymax) ymax = y2; + break; + case 3: + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[4].FileName), out y1, out y2); + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[5].FileName), out y3, out y4); + if (y1 < ymin) ymin = y1; + if (y2 > ymax) ymax = y2; + if (y3 < ymin) ymin = y3; + if (y4 > ymax) ymax = y4; + break; + case 4: + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[3].FileName), out y1, out y2); + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[5].FileName), out y3, out y4); + if (y1 < ymin) ymin = y1; + if (y2 > ymax) ymax = y2; + if (y3 < ymin) ymin = y3; + if (y4 > ymax) ymax = y4; + break; + case 5: + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[3].FileName), out y1, out y2); + dummyDS.LoadSamples(Path.Combine(path, SupportedGraphs[4].FileName), out y3, out y4); + if (y1 < ymin) ymin = y1; + if (y2 > ymax) ymax = y2; + if (y3 < ymin) ymin = y3; + if (y4 > ymax) ymax = y4; + break; + } + + if (first) + { + first = false; + dataSrc.Name = string.Format("{0} {1} {2}", batchNr, testName, SupportedGraphs[i].Caption); + } + else + { + dataSrc.Name = SupportedGraphs[i].Caption; + } + dataSrc.OnRenderXAxisLabel += RenderXLabel; + dataSrc.OnRenderYAxisLabel = RenderYLabel; + dataSrc.AutoScaleY = false; + dataSrc.SetDisplayRangeY(ymin * 0.9f, ymax * 1.1f); + + float d = ymax * 1.1f - ymin * 0.9f; + int j = gridY.Length - 1; + while ((2 * gridY[j] > d) && (j > 0)) j--; + dataSrc.SetGridDistanceY(gridY[j]); + + dataSrc.GraphColor = colors[i % colors.Length]; + + display.DataSources.Add(dataSrc); + } + } this.ResumeLayout(); display.Refresh(); } + private string RenderXLabel(DataSource s, int idx) { if (s.AutoScaleX) @@ -107,7 +297,7 @@ namespace TBF.Screens } else { - return string.Format("{0}\"", (int)(s.Samples[idx].X / 200)); + return ((int)(s.Samples[idx].X)).ToString(); } } @@ -116,76 +306,37 @@ namespace TBF.Screens return string.Format("{0:0.0}", value); } - void ApplyColorSchema(PlotterDisplayEx display) + private void checkBox1_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph1_On = checkBox1.Checked; AnyCBChanged(); } + private void checkBox2_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph2_On = checkBox2.Checked; AnyCBChanged(); } + private void checkBox3_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph3_On = checkBox3.Checked; AnyCBChanged(); } + private void checkBox4_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph4_On = checkBox4.Checked; AnyCBChanged(); } + private void checkBox5_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph5_On = checkBox5.Checked; AnyCBChanged(); } + private void checkBox6_CheckedChanged(object sender, EventArgs e) { Program.LocalSettings.Graph6_On = checkBox6.Checked; AnyCBChanged(); } + + void AnyCBChanged() { - Color[] colors = { Color.DarkRed, - Color.DarkSlateGray, - Color.DarkCyan, - Color.DarkGreen, - Color.DarkBlue , - Color.DarkMagenta, - Color.DeepPink }; - - for (int i = 0; i < numGraphs; i++) + if (selectedGraphsPath != null) { - display.DataSources[i].GraphColor = colors[i % 7]; - } - - display.BackgroundColorTop = Color.White; - display.BackgroundColorBot = Color.White; - display.SolidGridColor = Color.LightGray; - display.DashedGridColor = Color.LightGray; - } - - protected void CalcSinusFunction_0(DataSource dataSrc, int idx) - { - for (int i = 0; i < dataSrc.Length; i++) - { - dataSrc.Samples[i].X = i; - dataSrc.Samples[i].Y = (float)(((float)200 * Math.Sin((idx + 1) * (i + 1.0) * 48 / dataSrc.Length))); + ShowGraphs(plotterDisplayEx, selectedGraphsPath, selectedBatchNr, selectedTestName); } } - protected void CalcSinusFunction_1(DataSource dataSrc, int idx) + private void layoutModeComboBox_SelectedIndexChanged(object sender, EventArgs e) { - for (int i = 0; i < dataSrc.Length; i++) + for (PlotterGraphPaneEx.LayoutMode mode = 0; mode <= PlotterGraphPaneEx.LayoutMode.TILES_HOR; mode++) { - dataSrc.Samples[i].X = i; - - dataSrc.Samples[i].Y = (float)(((float)20 * - Math.Sin(20 * (idx + 1) * (i + 1) * Math.PI / dataSrc.Length)) * - Math.Sin(40 * (idx + 1) * (i + 1) * Math.PI / dataSrc.Length)) + - (float)(((float)200 * - Math.Sin(200 * (idx + 1) * (i + 1) * Math.PI / dataSrc.Length))); - } - } - - protected void CalcSinusFunction_2(DataSource dataSrc, int idx) - { - for (int i = 0; i < dataSrc.Length; i++) - { - dataSrc.Samples[i].X = i; - - dataSrc.Samples[i].Y = (float)(((float)20 * - Math.Sin(40 * (idx + 1) * i * Math.PI / dataSrc.Length)) * - Math.Sin(160 * (idx + 1) * i * Math.PI / dataSrc.Length)) + - (float)(((float)200 * - Math.Sin(4 * (idx + 1) * i * Math.PI / dataSrc.Length))); - } - } - - protected void CalcSinusFunction_3(DataSource dataSrc, int idx, float time) - { - PointF[] samps = dataSrc.Samples; - for (int i = 0; i < samps.Length; i++) - { - samps[i].X = i; - samps[i].Y = 200 + (float)((200 * Math.Sin((idx + 1) * (time + i * 100) / 8000.0))) + - +(float)((40 * Math.Sin((idx + 1) * (time + i * 200) / 2000.0))); - /** - (float)( 4* Math.Sin( ((time + (i+8) * 100) / 900.0)))+ - (float)(28 * Math.Sin(((time + (i + 8) * 100) / 290.0))); */ + if (layoutModeComboBox.Text.Equals(mode.ToString()) && layoutMode != mode) + { + Program.LocalSettings.GraphsLayoutMode = layoutMode = mode; + ShowGraphs(plotterDisplayEx, selectedGraphsPath, selectedBatchNr, selectedTestName); + } } } } + + class GraphInfo + { + public string FileName; /// Name of a file written y the plotter + public string Caption; /// Displayed graph lable + } } diff --git a/TBF/Screens/GraphsTabPageCtrl.designer.cs b/TBF/Screens/GraphsTabPageCtrl.designer.cs index e4238b35d..3137df8ac 100644 --- a/TBF/Screens/GraphsTabPageCtrl.designer.cs +++ b/TBF/Screens/GraphsTabPageCtrl.designer.cs @@ -33,22 +33,28 @@ namespace TBF.Screens { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GraphsTabPageCtrl)); - this.button1 = new System.Windows.Forms.Button(); this.splitContainer = new System.Windows.Forms.SplitContainer(); + this.testsHistoryTreeView = new System.Windows.Forms.TreeView(); this.plotterDisplayEx = new GraphLib.PlotterDisplayEx(); + this.refreshButton = new System.Windows.Forms.Button(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.checkBox6 = new System.Windows.Forms.CheckBox(); + this.checkBox5 = new System.Windows.Forms.CheckBox(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.layoutModeComboBox = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); this.splitContainer.Panel1.SuspendLayout(); this.splitContainer.Panel2.SuspendLayout(); this.splitContainer.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); this.SuspendLayout(); // - // button1 - // - resources.ApplyResources(this.button1, "button1"); - this.button1.Name = "button1"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // // splitContainer // resources.ApplyResources(this.splitContainer, "splitContainer"); @@ -58,12 +64,18 @@ namespace TBF.Screens // splitContainer.Panel1 // this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control; - this.splitContainer.Panel1.Controls.Add(this.button1); + this.splitContainer.Panel1.Controls.Add(this.testsHistoryTreeView); // // splitContainer.Panel2 // this.splitContainer.Panel2.Controls.Add(this.plotterDisplayEx); // + // testsHistoryTreeView + // + resources.ApplyResources(this.testsHistoryTreeView, "testsHistoryTreeView"); + this.testsHistoryTreeView.Name = "testsHistoryTreeView"; + this.testsHistoryTreeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.testsHistoryTreeView_NodeMouseClick); + // // plotterDisplayEx // this.plotterDisplayEx.BackColor = System.Drawing.Color.Transparent; @@ -75,25 +87,116 @@ namespace TBF.Screens this.plotterDisplayEx.Name = "plotterDisplayEx"; this.plotterDisplayEx.SolidGridColor = System.Drawing.Color.DarkGray; // + // refreshButton + // + resources.ApplyResources(this.refreshButton, "refreshButton"); + this.refreshButton.Name = "refreshButton"; + this.refreshButton.UseVisualStyleBackColor = true; + this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); + // + // splitContainer1 + // + resources.ApplyResources(this.splitContainer1, "splitContainer1"); + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.layoutModeComboBox); + this.splitContainer1.Panel1.Controls.Add(this.checkBox6); + this.splitContainer1.Panel1.Controls.Add(this.checkBox5); + this.splitContainer1.Panel1.Controls.Add(this.checkBox4); + this.splitContainer1.Panel1.Controls.Add(this.checkBox3); + this.splitContainer1.Panel1.Controls.Add(this.checkBox2); + this.splitContainer1.Panel1.Controls.Add(this.checkBox1); + this.splitContainer1.Panel1.Controls.Add(this.refreshButton); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer); + // + // checkBox6 + // + resources.ApplyResources(this.checkBox6, "checkBox6"); + this.checkBox6.Name = "checkBox6"; + this.checkBox6.UseVisualStyleBackColor = true; + this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged); + // + // checkBox5 + // + resources.ApplyResources(this.checkBox5, "checkBox5"); + this.checkBox5.Name = "checkBox5"; + this.checkBox5.UseVisualStyleBackColor = true; + this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged); + // + // checkBox4 + // + resources.ApplyResources(this.checkBox4, "checkBox4"); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.UseVisualStyleBackColor = true; + this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged); + // + // checkBox3 + // + resources.ApplyResources(this.checkBox3, "checkBox3"); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.UseVisualStyleBackColor = true; + this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); + // + // checkBox2 + // + resources.ApplyResources(this.checkBox2, "checkBox2"); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.UseVisualStyleBackColor = true; + this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); + // + // checkBox1 + // + resources.ApplyResources(this.checkBox1, "checkBox1"); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.UseVisualStyleBackColor = true; + this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // + // layoutModeComboBox + // + this.layoutModeComboBox.FormattingEnabled = true; + resources.ApplyResources(this.layoutModeComboBox, "layoutModeComboBox"); + this.layoutModeComboBox.Name = "layoutModeComboBox"; + this.layoutModeComboBox.SelectedIndexChanged += new System.EventHandler(this.layoutModeComboBox_SelectedIndexChanged); + // // GraphsTabPageCtrl // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Silver; - this.Controls.Add(this.splitContainer); + this.Controls.Add(this.splitContainer1); this.Name = "GraphsTabPageCtrl"; this.splitContainer.Panel1.ResumeLayout(false); this.splitContainer.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); this.splitContainer.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Button button1; private System.Windows.Forms.SplitContainer splitContainer; private GraphLib.PlotterDisplayEx plotterDisplayEx; + private System.Windows.Forms.TreeView testsHistoryTreeView; + private System.Windows.Forms.Button refreshButton; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.CheckBox checkBox6; + private System.Windows.Forms.CheckBox checkBox5; + private System.Windows.Forms.CheckBox checkBox4; + private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.ComboBox layoutModeComboBox; } } diff --git a/TBF/Screens/GraphsTabPageCtrl.resx b/TBF/Screens/GraphsTabPageCtrl.resx index 056f472d2..2701fede8 100644 --- a/TBF/Screens/GraphsTabPageCtrl.resx +++ b/TBF/Screens/GraphsTabPageCtrl.resx @@ -117,51 +117,42 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 12, 34 - - - 2, 2, 2, 2 - - - 42, 30 - - - - 1 - - - &Btn1 - - - button1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - splitContainer.Panel1 - - - 0 - Fill + True + 0, 0 + + Fill + + + 0, 0 + + + 125, 655 + + + 0 + + + testsHistoryTreeView + + + System.Windows.Forms.TreeView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer.Panel1 + + + 0 + splitContainer.Panel1 @@ -181,7 +172,7 @@ 0, 0 - 896, 689 + 836, 655 0 @@ -211,10 +202,10 @@ 1 - 965, 689 + 965, 655 - 65 + 125 2 @@ -226,11 +217,275 @@ System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + splitContainer1.Panel2 0 + + 0, 2 + + + 125, 28 + + + 0 + + + Refresh + + + refreshButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 7 + + + Fill + + + True + + + 0, 0 + + + Horizontal + + + 129, 6 + + + 137, 21 + + + 7 + + + layoutModeComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 0 + + + True + + + 880, 10 + + + 80, 17 + + + 6 + + + checkBox6 + + + checkBox6 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 1 + + + True + + + 760, 10 + + + 80, 17 + + + 5 + + + checkBox5 + + + checkBox5 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 2 + + + True + + + 640, 10 + + + 80, 17 + + + 4 + + + checkBox4 + + + checkBox4 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 3 + + + True + + + 520, 10 + + + 80, 17 + + + 3 + + + checkBox3 + + + checkBox3 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 4 + + + True + + + 400, 10 + + + 80, 17 + + + 2 + + + checkBox2 + + + checkBox2 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 5 + + + True + + + 280, 10 + + + 80, 17 + + + 1 + + + checkBox1 + + + checkBox1 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1.Panel1 + + + 6 + + + splitContainer1.Panel1 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 0 + + + splitContainer1.Panel2 + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + splitContainer1 + + + 1 + + + 965, 689 + + + 30 + + + 3 + + + splitContainer1 + + + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + True diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj index 263ddec9f..e8c530309 100644 --- a/TBF/TBF.csproj +++ b/TBF/TBF.csproj @@ -1575,7 +1575,6 @@ True Strings.zh-CN.resx - UserControl