Compare commits

...
40 changed files with 1563 additions and 1008 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+1 -1
View File
@@ -37,7 +37,7 @@ namespace Config
result.IsRealBench = IsRealBench;
result.ProceduresDBSettings = (Users.DBSettings)ProceduresDBSettings.Clone();
result.WaterMetersDBSettings = (Users.DBSettings)WaterMetersDBSettings.Clone();
result.UsersDBSettings = (Users.DBSettings)ProceduresDBSettings.Clone();
result.UsersDBSettings = (Users.DBSettings)UsersDBSettings.Clone();
return result;
}
+7 -1
View File
@@ -11,7 +11,13 @@ namespace Results.Entities
public virtual int Id { get; protected set; }
public virtual int BatchNr { get; set; }
public virtual int TestBenchId { get; set; }
public virtual string ProgramVersion { get; set; }
public virtual string TestBenchName { get; set; } /// CEVAK, not mapped to DB
public virtual string Address1 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address2 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address3 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address4 { get; set; } /// CEVAK, not mapped to DB
public virtual string Address5 { get; set; } /// CEVAK, not mapped to DB
public virtual string ProgramVersion { get; set; }
public virtual string UserName { get; set; }
public virtual int UserNumber { get; set; }
public virtual string ProcedureName { get; set; }
+8 -5
View File
@@ -25,9 +25,12 @@ namespace Results.Entities
public virtual DateTime EndTime { get; set; } /// Date and time of the test end
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
public virtual double TestTime { get; set; } /// [s] Measurement time in seconds
public virtual double PulsesMaster { get; set; }
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter
public virtual double PulsesMaster { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the water to the tank
public virtual double TotalPulsesMstr { get; set; } /// [pls] FlyingStartMassCollectionProlonged: MID pulses of the complete test (not mapped to DB)
public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected.
public virtual double ConstMasterCorr { get; set; } /// [l/pls] Liters per pulse of the master flow meter corrected by a correction table.
public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter calculated from a mass measurement.
/// When mass measurement is not available, corrected by a correction table.
public virtual double MassStartRaw { get; set; } /// [kg]
public virtual double MassStart { get; set; } /// [kg]
public virtual double MassEndRaw { get; set; } /// [kg]
@@ -40,7 +43,7 @@ namespace Results.Entities
public virtual double FlowVolume { get; set; } /// [m3/h]
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
public virtual double ErrorMaster { get; set; } /// [%]
public virtual double ErrorMaster { get; set; } /// [%] Error of the master flow meter
public virtual float DiverterStart { get; set; } /// [s] Diverter switch time when test starts
public virtual float DivStart10 { get; set; } /// [s] Diverter switch time when test starts at level 10 (e.g. 10%) (not mapped to DB)
@@ -107,7 +110,7 @@ namespace Results.Entities
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
public virtual float FlowMin { get; set; } /// [m3/h] not mapped to DB
public virtual float FlowMin { get; set; } /// [m3/h]
public virtual float FlowMax { get; set; } /// [m3/h]
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
+31 -1
View File
@@ -117,7 +117,7 @@ namespace Results.Entities
ErrorFlagsMode eFlagsMode = 0; /// = ErrorFlagsMode.Off;
foreach (var mtr in MeterTestRslts)
{
if (mtr.TestDone) errorFlags |= mtr.TestRslt.ErrorFlags;
if (mtr.Evaluate() && mtr.TestDone) errorFlags |= mtr.TestRslt.ErrorFlags;
if ((int)mtr.TestRslt.ErrorFlagsMode() > (int)eFlagsMode) eFlagsMode = mtr.TestRslt.ErrorFlagsMode();
}
errorFlagsMode = eFlagsMode; /// Maximum from all tests (=ErrorFlagsMode.On if at least one test is ErrorFlagsMode.On)
@@ -264,6 +264,21 @@ namespace Results.Entities
return null;
}
public virtual bool TryGetTestRslt(string testName, out TestRslt testRslt)
{
MeterTestRslt mtr = GetMeterTestRslt(testName);
if (mtr != null)
{
testRslt = mtr.TestRslt;
return true;
}
else
{
testRslt = null;
return false;
}
}
public virtual TestData GetTestData(string testName)
{
foreach (var mtr in MeterTestRslts)
@@ -276,6 +291,21 @@ namespace Results.Entities
return null;
}
public virtual bool TryGetTestData(string testName, out TestData testData)
{
foreach (var mtr in MeterTestRslts)
{
if (mtr.TestRslt.TestData.Name == testName)
{
testData = mtr.TestRslt.TestData;
return true;
}
}
testData = null;
return false;
}
/// <summary>
+104
View File
@@ -0,0 +1,104 @@
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Results.Forms
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class ListViewExtensions
{
[StructLayout(LayoutKind.Sequential)]
public struct HDITEM
{
public Mask mask;
public int cxy;
[MarshalAs(UnmanagedType.LPTStr)]
public string pszText;
public IntPtr hbm;
public int cchTextMax;
public Format fmt;
public IntPtr lParam;
// _WIN32_IE >= 0x0300
public int iImage;
public int iOrder;
// _WIN32_IE >= 0x0500
public uint type;
public IntPtr pvFilter;
// _WIN32_WINNT >= 0x0600
public uint state;
[Flags]
public enum Mask
{
Format = 0x4, // HDI_FORMAT
};
[Flags]
public enum Format
{
SortDown = 0x200, // HDF_SORTDOWN
SortUp = 0x400, // HDF_SORTUP
};
};
public const int LVM_FIRST = 0x1000;
public const int LVM_GETHEADER = LVM_FIRST + 31;
public const int HDM_FIRST = 0x1200;
public const int HDM_GETITEM = HDM_FIRST + 11;
public const int HDM_SETITEM = HDM_FIRST + 12;
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, ref HDITEM lParam);
public static void SetSortIcon(this ListViewEx listViewControl, int columnIndex, SortOrder order)
{
IntPtr columnHeader = SendMessage(listViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
for (int columnNumber = 0; columnNumber <= listViewControl.Columns.Count - 1; columnNumber++)
{
var columnPtr = new IntPtr(columnNumber);
var item = new HDITEM
{
mask = HDITEM.Mask.Format
};
if (SendMessage(columnHeader, HDM_GETITEM, columnPtr, ref item) == IntPtr.Zero)
{
throw new Win32Exception();
}
if (order != SortOrder.None && columnNumber == columnIndex)
{
switch (order)
{
case SortOrder.Ascending:
item.fmt &= ~HDITEM.Format.SortDown;
item.fmt |= HDITEM.Format.SortUp;
break;
case SortOrder.Descending:
item.fmt &= ~HDITEM.Format.SortUp;
item.fmt |= HDITEM.Format.SortDown;
break;
default:
break;
}
}
else
{
item.fmt &= ~HDITEM.Format.SortDown & ~HDITEM.Format.SortUp;
}
if (SendMessage(columnHeader, HDM_SETITEM, columnPtr, ref item) == IntPtr.Zero)
{
throw new Win32Exception();
}
}
}
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Windows.Forms;
namespace Results.Forms
{
public class LviIntColumnComparer : IComparer
{
int column;
SortOrder order;
public LviIntColumnComparer()
{
column = 0;
order = SortOrder.Ascending;
}
public LviIntColumnComparer(int column, SortOrder order)
{
this.column = column;
this.order = order;
}
public int Compare(object x, object y)
{
int valX = int.Parse(((ListViewItem)x).SubItems[column].Text);
int valY = int.Parse(((ListViewItem)y).SubItems[column].Text);
return (order == SortOrder.Descending) ? (valY - valX) : (valX - valY);
}
}
}
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Windows.Forms;
namespace Results.Forms
{
public class LviTextColumnComparer : IComparer
{
private int column;
SortOrder order;
public LviTextColumnComparer()
{
column = 0;
order = SortOrder.Ascending;
}
public LviTextColumnComparer(int column, SortOrder order)
{
this.column = column;
this.order = order;
}
public int Compare(object x, object y)
{
string txtX = ((ListViewItem)x).SubItems[column].Text;
string txtY = ((ListViewItem)y).SubItems[column].Text;
return (order == SortOrder.Descending) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2017 Sensus Metering Systems
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
///
using FluentNHibernate.Mapping;
using Results.Entities;
@@ -185,7 +185,7 @@ namespace Results.Output.Printers.Enhanced
Table table0 = Table.Create_TestsAreRows(batch.WaterMeters[0], testItems, style);
SizeF tableSize = table0.Measure(e);
int wmSectionHeight = (int)tableSize.Height + 3 * SpacingOne4Header;
int wmSectionHeight = (int)tableSize.Height + SpacingOne4Header * ((tableSize.Height > 0) ? 3 : 2);
nrWMsOnFirstPage = (printHeight - BodyTop + TitleY - 2 * SpacingOne) / wmSectionHeight;
nrWMsOnNextPage = (printHeight - 2 * SpacingOne) / wmSectionHeight;
@@ -239,7 +239,10 @@ namespace Results.Output.Printers.Enhanced
for (int wmNr = nextWMNr; wmNr < Math.Min(nextWMNr + nrWMsOnPage, batch.WaterMeters.Count); wmNr++) /// wmNr is 0-based
{
int wmPosition = true ? batch.WaterMeters[wmNr].WMPosition : (wmNr + 1);
nextWmTop = (int)PrintWM(e, batch.WaterMeters[wmNr], wmPosition, nextWmTop) + SpacingOneAndHalf4Header;
if (!cfg.GoodOnly || batch.WaterMeters[wmNr].Passed)
{
nextWmTop = (int)PrintWM(e, batch.WaterMeters[wmNr], wmPosition, nextWmTop) + SpacingOneAndHalf4Header;
}
}
nextWMNr += nrWMsOnPage;
@@ -265,7 +268,7 @@ namespace Results.Output.Printers.Enhanced
/// <param name="top">Top coordinate of watermeter data</param>
/// <returns>The height of the printed section</returns>
float PrintWM(System.Drawing.Printing.PrintPageEventArgs e,
Results.Entities.WaterMeter wm, int printedWMNr, int top)
Results.Entities.WaterMeter wm, int printedWMNr, int top)
{
/// Print the water meter number and the serial number
string wmText = string.Format("{0} {1}", Strings.Water_Meter, printedWMNr);
@@ -278,7 +281,14 @@ namespace Results.Output.Printers.Enhanced
Table table = Table.Create_TestsAreRows(wm, testItems, style);
return table.Draw(e, leftMargin, top + SpacingOneAndHalf4Header);
if (table.IsEmpty())
{
return top;
}
else
{
return table.Draw(e, leftMargin, top + SpacingOneAndHalf4Header);
}
}
@@ -6,6 +6,8 @@ using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
using Config.Entities;
using System.IO;
using Results.Resources;
namespace Results.Output.Printers.Munich
{
@@ -38,11 +40,16 @@ namespace Results.Output.Printers.Munich
readonly int resultsCount;
readonly bool compound; /// true when MetersKind is MetersKind.Combined
/// Top coordinate of the table
int nrPages;
int pageNr;
int firstTblTop;
int secondTblTop;
int pageNr; /// Current page number
int nrPages; /// Total number of pages
float tableTop; /// Top coordinate of the table
int[] firstTblRowsOnPage;
int[] secondTblRowsOnPage;
PageOrientation pageOrientation;
/// <summary>
/// Property variable for the Font the user wishes to use
@@ -51,7 +58,34 @@ namespace Results.Output.Printers.Munich
Font boldFont;
Font fontTitle;
/// <summary>
///
/// Table style
///
static TableStyle tableStyle = new TableStyle
{
Font = new Font(FontFamilyName, 10, FontStyle.Regular),
HeaderFont = new Font(FontFamilyName, 10, FontStyle.Regular),
MarginX = 7,
MarginY = 5,
LineWidth = 1,
TopHeadersCount = 1,
HorizLines = TableLines.FirstSecondAndLast,
VertLines = TableLines.All,
ColumnWidths = new float[] { 150, 70, 75, 75, 70, 75, 75 },
};
static Alignment[] horizontalAlignment = new Alignment[] /// Horizontal alignment of items of one row
{
Alignment.Left, Alignment.Left, Alignment.Left,
Alignment.Left, Alignment.Left, Alignment.Left, Alignment.Left
};
static VertAlignment[] verticalAlignment = new VertAlignment[] /// Vertical alignment of items of one row
{
VertAlignment.Middle, VertAlignment.Middle, VertAlignment.Middle,
VertAlignment.Middle, VertAlignment.Middle, VertAlignment.Middle, VertAlignment.Middle
};
/// <summary>
/// Constructor
/// </summary>
/// <param name="textToPrint">Text to be printed</param>
@@ -61,7 +95,8 @@ namespace Results.Output.Printers.Munich
{
this.docVersion = docVersion;
this.wm = wm;
compound = wm.Compound();
this.compound = wm.Compound();
this.pageOrientation = pageOrientation;
string[] info = wm.ProductName().Split(new char[] { ';' });
if (info.Length >= 2)
@@ -81,13 +116,88 @@ namespace Results.Output.Printers.Munich
}
results = wm.MeterTestRslts;
this.resultsCount = compound ? (results.Count / 3) : results.Count;
int resultsCount = wm.MeterTestRslts.Count;
if (compound) resultsCount /= 3;
resultsCount = 0;
foreach (var mtr in wm.MeterTestRslts)
{
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always) resultsCount++;
}
pageNr = 1;
nrPages = (compound ? (resultsCount > 7) : (resultsCount > 9)) ? 2 : 1;
if (compound)
{
/// Compound meter results
const int MaxOnFirstPage = 23;
const int MaxOnPage = 45;
if (resultsCount <= 7)
{
nrPages = 1;
firstTblRowsOnPage = new int[] { resultsCount };
secondTblRowsOnPage = new int[] { resultsCount };
}
else if (resultsCount <= MaxOnFirstPage)
{
nrPages = 2;
firstTblRowsOnPage = new int[] { resultsCount, 0 };
secondTblRowsOnPage = new int[] { 0, int.MaxValue };
}
else if (resultsCount <= MaxOnPage)
{
nrPages = 3;
firstTblRowsOnPage = new int[] { MaxOnFirstPage, (resultsCount - MaxOnFirstPage), 0 };
int secondTblRowsOn2ndPage = Math.Max(0, MaxOnFirstPage + MaxOnPage - 2 - resultsCount);
secondTblRowsOnPage = new int[] { 0, secondTblRowsOn2ndPage, resultsCount - secondTblRowsOn2ndPage };
}
else if (resultsCount <= MaxOnFirstPage + MaxOnPage)
{
nrPages = 4;
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, 0, 0 };
secondTblRowsOnPage = new int[] { 0, 0, MaxOnPage, MaxOnFirstPage };
}
else
{
nrPages = 5;
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, (resultsCount - MaxOnFirstPage - MaxOnPage), 0 };
secondTblRowsOnPage = new int[] { 0, 0, Math.Max(0, MaxOnFirstPage + 2 * MaxOnPage - 2 - resultsCount), MaxOnPage, MaxOnFirstPage };
}
}
else
{
/// Regular (single) meter results
const int MaxOnFirstPage = 27;
const int MaxOnPage = 45;
if (resultsCount <= 9)
{
nrPages = 1;
firstTblRowsOnPage = new int[] { resultsCount };
secondTblRowsOnPage = new int[] { resultsCount };
}
else if (resultsCount <= MaxOnFirstPage)
{
nrPages = 2;
firstTblRowsOnPage = new int[] { resultsCount, 0 };
secondTblRowsOnPage = new int[] { 0, int.MaxValue };
}
else if (resultsCount <= MaxOnPage)
{
nrPages = 3;
firstTblRowsOnPage = new int[] { MaxOnFirstPage, (resultsCount - MaxOnFirstPage), 0 };
int secondTblRowsOn2ndPage = Math.Max(0, MaxOnFirstPage + MaxOnPage - 2 - resultsCount);
secondTblRowsOnPage = new int[] { 0, secondTblRowsOn2ndPage, resultsCount - secondTblRowsOn2ndPage };
}
else if (resultsCount <= MaxOnFirstPage + MaxOnPage)
{
nrPages = 4;
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, 0, 0 };
secondTblRowsOnPage = new int[] { 0, 0, MaxOnPage, MaxOnFirstPage };
}
else
{
nrPages = 5;
firstTblRowsOnPage = new int[] { MaxOnFirstPage, MaxOnPage, (resultsCount - MaxOnFirstPage - MaxOnPage), 0 };
secondTblRowsOnPage = new int[] { 0, 0, Math.Max(0, MaxOnFirstPage + 2 * MaxOnPage - 2 - resultsCount), MaxOnPage, MaxOnFirstPage };
}
}
DefaultPageSettings.Landscape = (pageOrientation == PageOrientation.Landscape);
}
@@ -116,8 +226,30 @@ namespace Results.Output.Printers.Munich
/// Run base code
base.OnPrintPage(e);
/// Draw 2550 x 3507 'headpic' scaled to A4 at 100 DPI
e.Graphics.DrawImage(Results.Properties.Resources.Headpic, new Rectangle(0, 0, 827, 1137));
if (pageOrientation == PageOrientation.Portrait)
{
string[] templatePaths = new string[] { "C:\\TBF\\Templates\\MunichP.jpg", "C:\\TBF\\Templates\\MunichP.png", "C:\\TBF\\Templates\\MunichP.tif" };
foreach (var t in templatePaths)
{
if (File.Exists(t))
{
e.Graphics.DrawImage(new Bitmap(Image.FromFile(t), 827, 1169), new Rectangle(0, 0, 827, 1169));
break;
}
}
}
else
{
string[] templatePaths = new string[] { "C:\\TBF\\Templates\\MunichL.jpg", "C:\\TBF\\Templates\\MunichL.png", "C:\\TBF\\Templates\\MunichL.tif" };
foreach (var t in templatePaths)
{
if (File.Exists(t))
{
e.Graphics.DrawImage(new Bitmap(Image.FromFile(t), 1169, 827), new Rectangle(0, 0, 1169, 827));
break;
}
}
}
/// Set print area size and margins (in dots using 80 dpi)
int printHeight = base.DefaultPageSettings.PaperSize.Height - base.DefaultPageSettings.Margins.Top - base.DefaultPageSettings.Margins.Bottom;
@@ -144,27 +276,21 @@ namespace Results.Output.Printers.Munich
if (pageNr == 1)
{
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
/// This is the first page, drad the title, common part and the 1st table
RectangleF printArea = new RectangleF(TitleX, TitleY, 667, 50);
e.Graphics.DrawString(wm.Batch.ProtocolTitle, this.fontTitle, Brushes.Black, printArea);
///
/// Common
///
PrintAt(e, Tab1, lineNr * SpacingOne, docVersion);
lineNr++;
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Prüfstand Nr :");
PrintBoldAt(e, Tab2, lineNr * SpacingOne, wm.BenchId().ToString());
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Datum :");
PrintBoldAt(e, Tab4, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Zählertyp :");
PrintAt(e, Tab2, lineNr * SpacingOne, zaehlertyp);
PrintAt(e, Tab3, lineNr * SpacingOne, "Eichjahr :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.YearOfProduction.ToString());
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Prüfvorlage :");
PrintAt(e, Tab2, lineNr * SpacingOne, pruefvorlage);
DrawCommonTop(e, ref lineNr, wm, pruefvorlage, docVersion);
lineNr += 2;
tableTop = SpacingOne * lineNr;
}
else
{
/// This appears on the top of the 2nd and every subsequent page.
/// 2nd table starts from the top of the page.
lineNr -= 3;
if (compound)
{
@@ -189,228 +315,294 @@ namespace Results.Output.Printers.Munich
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
}
lineNr++;
lineNr += ((resultsCount + 2) * SpacingOneAndHalf) / SpacingOne + 2;
PrintAt(e, Tab1, lineNr * SpacingOne, wm.NewQnames() ? "Q3 :" : "Qn :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, wm.NewQnames() ? "Q3 :" : "Qn :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn_Aux().ToString());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Zulassungszeichen :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.ApprovalInfo());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Zulassungszeichen :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ApprovalInfoAux());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Metr. klasse :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.MetrologicalClass());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Metr. klasse :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.MetrologicalClassAux());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Stand :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.EndState);
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Stand :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.EndStateAux);
lineNr += 2;
PrintAt(e, Tab1, lineNr * SpacingOne, "Umschaltpunkte :");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Qsteig");
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QRise).ToString("F1") + " l/h");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Qfall");
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QFall).ToString("F1") + " l/h");
}
lineNr += 2;
firstTblTop = SpacingOne * lineNr;
///
/// Table 1
///
PrintTableOne(e, firstTblTop);
DrawTableFrame(e, resultsCount + 1, firstTblTop);
tableTop = TitleY + (compound ? 5 : 4) * SpacingOne;
}
if (firstTblRowsOnPage[pageNr - 1] > 0)
{
int from = 0;
for (int pN = 0; pN < pageNr - 1; pN++) from += firstTblRowsOnPage[pN];
Table table1 = PrepareTableOne(from, from + firstTblRowsOnPage[pageNr - 1] - 1);
tableTop = table1.Draw(e, Tab1, tableTop) + SpacingOneAndHalf;
}
if (pageNr == nrPages)
{
if (pageNr == 1)
{
secondTblTop = firstTblTop + (resultsCount + 2) * SpacingOneAndHalf;
lineNr += ((resultsCount + 2) * SpacingOneAndHalf * 2) / SpacingOne;
}
else
{
lineNr -= 3;
if (compound)
{
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
lineNr++;
}
if (secondTblRowsOnPage[pageNr - 1] > 0)
{
int from = 0;
for (int pN = 0; pN < pageNr - 1; pN++) from += secondTblRowsOnPage[pN];
Table table2 = PrepareTableTwo(from, from + secondTblRowsOnPage[pageNr - 1] - 1);
tableTop = table2.Draw(e, Tab1, tableTop) + SpacingOneAndHalf;
}
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
}
lineNr++;
if (pageNr == nrPages)
{
int top = topMargin + printHeight - 8 * SpacingOne;
DrawCommonBottom(e, top, wm);
}
else
{
e.HasMorePages = true;
}
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
}
lineNr += ((resultsCount + 2) * SpacingOneAndHalf) / SpacingOne + 2;
secondTblTop = TitleY + (compound ? 5 : 4) * SpacingOne;
}
///
/// Table 2
///
PrintTableTwo(e, secondTblTop);
DrawTableFrame(e, resultsCount + 1, secondTblTop);
///
/// Footer
///
PrintAt(e, Tab1, lineNr * SpacingOne, "Temperatur");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbTempMean().ToString("F1") + " \x00b0C");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Feuchtigkeit");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Batch.AmbHumiMean().ToString("F0") + " %");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Luftdruck");
PrintAt(e, Tab2, lineNr * SpacingOne, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbPressMean()).ToString("F0") + " mbar");
lineNr++;
PrintAt(e, Tab3, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
lineNr++;
PrintAt(e, Tab3, lineNr * SpacingOne, "Datum");
PrintAt(e, Tab4, lineNr * SpacingOne, "Unterschrift");
}
e.HasMorePages = (pageNr != nrPages);
pageNr++;
}
///
/// Draw a footer and increment the page number
///
string pageNrText = string.Format("{0} {1}/{2}", Strings.Page, pageNr++, nrPages);
int pageNrWidth = (int)e.Graphics.MeasureString(pageNrText, font).Width;
PrintAt(e, leftMargin + (printWidth - pageNrWidth) / 2, topMargin + printHeight - SpacingOne, pageNrText);
}
/// <summary>
/// Print table texts.
/// Prepares content and style of the first table.
/// </summary>
void PrintTableOne(System.Drawing.Printing.PrintPageEventArgs e, int tblTop)
/// <param name="from">0-based index fo the first result to print</param>
/// <param name="to">0-based index fo the last result to print</param>
/// <returns>Prepared table</returns>
Table PrepareTableOne(int from = 0, int to = int.MaxValue)
{
PrintAt(e, GetTabItemPos(0, 0, tblTop), "Prüflauf");
PrintAt(e, GetTabItemPos(0, 1, tblTop), "Q [l/h]");
PrintAt(e, GetTabItemPos(0, 2, tblTop), "Prüf-Vol.[l]");
PrintAt(e, GetTabItemPos(0, 3, tblTop), compound ? "HZ-Vol.[l]" : "Z-Vol.[l]");
PrintAt(e, GetTabItemPos(0, 4, tblTop), compound ? "NZ-Vol.[l]" : "-");
PrintAt(e, GetTabItemPos(0, 5, tblTop), "Fehler [%]");
PrintAt(e, GetTabItemPos(0, 6, tblTop), "Ergebnis");
Table table = new Table(7);
table.Style = tableStyle;
int rowCnt = 1;
string[] tableHeader = new string[]
{
"Prüflauf",
"Q [l/h]",
"Prüf-Vol.[l]",
compound ? "HZ-Vol.[l]" : "Z-Vol.[l]",
compound ? "NZ-Vol.[l]" : "-",
"Fehler [%]",
"Ergebnis",
};
table.AddRow(tableHeader, horizontalAlignment, verticalAlignment);
int rowCount = 0;
foreach (var mtr in wm.MeterTestRslts)
{
if (!compound || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
{
PrintAt(e, GetTabItemPos(rowCnt, 0, tblTop), mtr.Name());
PrintAt(e, GetTabItemPos(rowCnt, 1, tblTop), mtr.TestRslt.FlowMass.ToString("F1"));
PrintAt(e, GetTabItemPos(rowCnt, 2, tblTop), mtr.TestRslt.VolumeCTV.ToString("F2"));
if (compound)
{
Results.Entities.MeterTestRslt mainMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
Results.Entities.MeterTestRslt auxMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
{
if (from <= rowCount && rowCount <= to)
{
double flow_ctv = (mtr.TestRslt.TestTime != 0) ? (3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime) : 0;
PrintAt(e, GetTabItemPos(rowCnt, 3, tblTop), mainMtr.VolumeMeter.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 4, tblTop), auxMtr.VolumeMeter.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 5, tblTop), mtr.Error.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 6, tblTop), mtr.Passed ? "iO" : "NiO");
}
else
{
PrintAt(e, GetTabItemPos(rowCnt, 3, tblTop), mtr.VolumeMeter.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 4, tblTop), "-");
PrintAt(e, GetTabItemPos(rowCnt, 5, tblTop), mtr.Error.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 6, tblTop), mtr.Passed ? "iO" : "NiO");
}
if (compound)
{
Results.Entities.MeterTestRslt mainMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundMain);
Results.Entities.MeterTestRslt auxMtr = wm.GetMeterTestRslt(mtr.Name(), CompoundMeterId.CompoundAux);
rowCnt++;
table.AddRow(new string[] { mtr.Name(),
Config.Units.ConvertTo(Config.Unit.lph, flow_ctv).ToString("F1"),
mtr.TestRslt.VolumeCTV.ToString("F2"),
mainMtr.VolumeMeter.ToString("F2"),
auxMtr.VolumeMeter.ToString("F2"),
mtr.Error.ToString("F2"),
mtr.Passed ? "iO" : "NiO" },
horizontalAlignment,
verticalAlignment);
}
else
{
table.AddRow(new string[] { mtr.Name(),
Config.Units.ConvertTo(Config.Unit.lph, flow_ctv).ToString("F1"),
mtr.TestRslt.VolumeCTV.ToString("F2"),
mtr.VolumeMeter.ToString("F2"),
"-",
mtr.Error.ToString("F2"),
mtr.Passed ? "iO" : "NiO" },
horizontalAlignment,
verticalAlignment);
}
}
rowCount++;
}
}
return table;
}
void PrintTableTwo(System.Drawing.Printing.PrintPageEventArgs e, int tblTop)
/// <summary>
/// Prepares content and style of the second table.
/// </summary>
/// <param name="from">0-based index fo the first result to print</param>
/// <param name="to">0-based index fo the last result to print</param>
/// <returns>Prepared table</returns>
Table PrepareTableTwo(int from = 0, int to = int.MaxValue)
{
PrintAt(e, GetTabItemPos(0, 1, tblTop), "Q [l/h]");
PrintAt(e, GetTabItemPos(0, 2, tblTop), "Temperatur");
PrintAt(e, GetTabItemPos(0, 3, tblTop), "Dichte");
PrintAt(e, GetTabItemPos(0, 4, tblTop), "Prüfzeit");
PrintAt(e, GetTabItemPos(0, 5, tblTop), "Druck Eing.");
PrintAt(e, GetTabItemPos(0, 6, tblTop), "Druck Ausg.");
Table table = new Table(7);
table.Style = tableStyle;
int rowCnt = 1;
string[] tableHeader = new string[]
{
"",
"Q [l/h]",
"Temperatur",
"Dichte",
"Prüfzeit",
"Druck Eing.",
"Druck Ausg.",
};
table.AddRow(tableHeader, horizontalAlignment, verticalAlignment);
int rowCount = 0;
foreach (var mtr in wm.MeterTestRslts)
{
if (!compound || mtr.CompoundMeterId == (byte)CompoundMeterId.Compound)
{
Point p = GetTabItemPos(rowCnt, 0, tblTop);
PrintAt(e, p.X, p.Y, mtr.Name());
if (mtr != null && mtr.IsPilotRslt() && mtr.Publish() == Config.Entities.Publish.Always)
{
if (from <= rowCount && rowCount <= to)
{
double flow_ctv = (mtr.TestRslt.TestTime != 0) ? (3.6 * mtr.TestRslt.VolumeCTV / mtr.TestRslt.TestTime) : 0;
PrintAt(e, GetTabItemPos(rowCnt, 1, tblTop), mtr.TestRslt.FlowMass.ToString("F1"));
PrintAt(e, GetTabItemPos(rowCnt, 2, tblTop), mtr.TestRslt.TempDownMean.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 3, tblTop), mtr.TestRslt.DensityDiv.ToString("F2"));
PrintAt(e, GetTabItemPos(rowCnt, 4, tblTop), mtr.TestTime.ToString("F1"));
PrintAt(e, GetTabItemPos(rowCnt, 5, tblTop), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressUpMean).ToString("F3"));
PrintAt(e, GetTabItemPos(rowCnt, 6, tblTop), Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressDownMean).ToString("F3"));
rowCnt++;
}
table.AddRow(new string[] { mtr.Name(),
Config.Units.ConvertTo(Config.Unit.lph, flow_ctv).ToString("F1"),
mtr.TestRslt.TempDownMean.ToString("F2"),
mtr.TestRslt.DensityDiv.ToString("F2"),
mtr.TestTime.ToString("F1"),
Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressUpMean).ToString("F3"),
Config.Units.ConvertTo(Config.Unit.bar, mtr.TestRslt.PressDownMean).ToString("F3") },
horizontalAlignment,
verticalAlignment);
}
rowCount++;
}
}
return table;
}
/// <summary>
/// Draw table lines.
/// </summary>
void DrawTableFrame(System.Drawing.Printing.PrintPageEventArgs e, int rowsCount, int tblTop)
{
int t = tblTop;
int m = tblTop + SpacingOneAndHalf;
int b = tblTop + rowsCount * SpacingOneAndHalf;
/// <summary>
/// Prints text on the top of the first page (title, common information).
/// </summary>
/// <param name="e"></param>
/// <param name="lineNr"></param>
/// <param name="wm"></param>
/// <param name="pruefvorlage"></param>
/// <param name="docVersion"></param>
void DrawCommonTop(PrintPageEventArgs e, ref int lineNr, Entities.WaterMeter wm, string pruefvorlage, string docVersion)
{
///
///
///
PrintAt(e, Tab1, lineNr * SpacingOne, docVersion);
lineNr++;
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Prüfstand Nr :");
PrintBoldAt(e, Tab2, lineNr * SpacingOne, wm.BenchId().ToString());
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Datum :");
PrintBoldAt(e, Tab4, lineNr * SpacingOne, wm.Batch.EndTime.Date.ToString("d"));
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Zählertyp :");
PrintAt(e, Tab2, lineNr * SpacingOne, zaehlertyp);
PrintAt(e, Tab3, lineNr * SpacingOne, "Eichjahr :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.YearOfProduction.ToString());
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Prüfvorlage :");
PrintAt(e, Tab2, lineNr * SpacingOne, pruefvorlage);
lineNr += 2;
// Horizontal lines
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, t), new Point(747, t));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, m), new Point(747, m));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(80, b), new Point(747, b));
if (compound)
{
PrintBoldAt(e, Tab1, lineNr * SpacingOne, "Hauptzahler");
PrintBoldAt(e, Tab3, lineNr * SpacingOne, "Nebenzahler");
lineNr++;
}
// Vertical lines
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point( 80, t), new Point( 80, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(267, t), new Point(267, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(347, t), new Point(347, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(427, t), new Point(427, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(507, t), new Point(507, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(587, t), new Point(587, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(667, t), new Point(667, b));
e.Graphics.DrawLine(new Pen(Color.Black, BorderW), new Point(747, t), new Point(747, b));
}
PrintAt(e, Tab1, lineNr * SpacingOne, "Hersteller :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Producer());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Hersteller :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ProducerAux());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Seriennummer :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.SerialNr);
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Seriennummer :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.SerialNrAux);
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, wm.NewQnames() ? "Q3 :" : "Qn :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.Q3_Qn().ToString());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, wm.NewQnames() ? "Q3 :" : "Qn :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.Q3_Qn_Aux().ToString());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Zulassungszeichen :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.ApprovalInfo());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Zulassungszeichen :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.ApprovalInfoAux());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Metr. klasse :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.MetrologicalClass());
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Metr. klasse :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.MetrologicalClassAux());
}
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Stand :");
PrintAt(e, Tab2, lineNr * SpacingOne, wm.EndState);
if (compound)
{
PrintAt(e, Tab3, lineNr * SpacingOne, "Stand :");
PrintAt(e, Tab4, lineNr * SpacingOne, wm.EndStateAux);
lineNr += 2;
PrintAt(e, Tab1, lineNr * SpacingOne, "Umschaltpunkte :");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Qsteig");
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QRise).ToString("F1") + " l/h");
lineNr++;
PrintAt(e, Tab1, lineNr * SpacingOne, "Qfall");
PrintAt(e, Tab2, lineNr * SpacingOne, (1000.0 * wm.QFall).ToString("F1") + " l/h");
}
}
/// <summary>
/// Prints text at the bottom of the last page (footer).
/// </summary>
/// <param name="e"></param>
/// <param name="lineNr"></param>
/// <param name="wm"></param>
void DrawCommonBottom(PrintPageEventArgs e, float top, Entities.WaterMeter wm)
{
int iTop = (int)top;
PrintAt(e, Tab1, iTop, "Temperatur");
PrintAt(e, Tab2, iTop, wm.Batch.AmbTempMean().ToString("F1") + " \x00b0C");
iTop += SpacingOne;
PrintAt(e, Tab1, iTop, "Feuchtigkeit");
PrintAt(e, Tab2, iTop, wm.Batch.AmbHumiMean().ToString("F0") + " %");
iTop += SpacingOne;
PrintAt(e, Tab1, iTop, "Luftdruck");
PrintAt(e, Tab2, iTop, Config.Units.ConvertTo(Config.Unit.mbar, wm.Batch.AmbPressMean()).ToString("F0") + " mbar");
iTop += SpacingOne;
PrintAt(e, Tab3, iTop, wm.Batch.EndTime.Date.ToString("d"));
iTop += SpacingOne;
PrintAt(e, Tab3, iTop, "Datum");
PrintAt(e, Tab4, iTop, "Unterschrift");
}
void PrintAt(System.Drawing.Printing.PrintPageEventArgs e, Point p, string text)
@@ -434,18 +626,5 @@ namespace Results.Output.Printers.Munich
RectangleF printArea = new RectangleF(x, y, 667, SpacingOne);
e.Graphics.DrawString(text, this.boldFont, Brushes.Black, printArea);
}
/// <summary>
/// Get text position form a number of the test and a number of the parameter.
/// </summary>
/// <param name="row"></param>
/// <param name="column">Table column (0-based)</param>
/// <returns></returns>
Point GetTabItemPos(int row, int column, int tblTop)
{
int x = MarginLeft + ((column == 0) ? 80 : 187) + column * 80; /// leftmost column is wider
int y = MarginTop + tblTop + (row * SpacingOneAndHalf) - 2;
return new Point(x, y);
}
}
}
+19 -3
View File
@@ -25,6 +25,7 @@ namespace Results.Output.Printers
public float LineWidth;
public TableLines HorizLines;
public TableLines VertLines;
public float[] ColumnWidths; /// null = automatic
}
public class Table
@@ -57,10 +58,21 @@ namespace Results.Output.Printers
}
/// <summary>
/// Returns true when table has either rows or columns count == 0
/// </summary>
/// <returns>true when empty</returns>
public bool IsEmpty()
{
return (Rows == null || RowsCount == 0 || Rows[0] == null || Rows[0].Length == 0);
}
public SizeF Measure(System.Drawing.Printing.PrintPageEventArgs e)
{
SizeF retVal = new SizeF(0, 0);
if (RowsCount == 0) return retVal;
if (IsEmpty()) return retVal; /// Empty table => zero Size
float[] columnWidth = new float[ColumnsCount];
float[] rowHeight = new float[RowsCount];
@@ -117,10 +129,10 @@ namespace Results.Output.Printers
public float Draw(System.Drawing.Printing.PrintPageEventArgs e, float left, float top)
{
if (RowsCount == 0) return top;
if (IsEmpty()) return top; /// Empty table
int tblColumnsCount = Rows[0].Length;
float[] columnWidth = new float[tblColumnsCount];
float[] columnPos = new float[tblColumnsCount];
float[] vertLinePos = new float[tblColumnsCount + 1];
@@ -143,6 +155,10 @@ namespace Results.Output.Printers
/// In not a separator line
bool isHeader = (colIx < Style.LeftHeadersCount) || (rowIx < Style.TopHeadersCount);
SizeF size = PrintersCommon.Measure(e, Rows[rowIx][colIx], isHeader ? Style.HeaderFont : Style.Font);
if ((Style.ColumnWidths != null) && (Style.ColumnWidths.Length > colIx))
{
size.Width = Style.ColumnWidths[colIx]; /// Override measurement if column width is defined
}
if (size.Width > columnWidth[colIx]) columnWidth[colIx] = size.Width;
if (size.Height > rowHeight[rowIx]) rowHeight[rowIx] = size.Height;
}
+54
View File
@@ -69,6 +69,15 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Address.
/// </summary>
internal static string Address {
get {
return ResourceManager.GetString("Address", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Alignment.
/// </summary>
@@ -105,6 +114,15 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Batch.
/// </summary>
internal static string Batch {
get {
return ResourceManager.GetString("Batch", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Batch nr..
/// </summary>
@@ -123,6 +141,24 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Bench ID.
/// </summary>
internal static string Bench_ID {
get {
return ResourceManager.GetString("Bench_ID", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Bench name.
/// </summary>
internal static string Bench_name {
get {
return ResourceManager.GetString("Bench_name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cancel.
/// </summary>
@@ -636,6 +672,15 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Procedure description.
/// </summary>
internal static string Procedure_description {
get {
return ResourceManager.GetString("Procedure_description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Producer.
/// </summary>
@@ -1023,6 +1068,15 @@ namespace Results.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Relative error of a meter in previous test/in production.
/// </summary>
internal static string Tooltip_E_rel_last {
get {
return ResourceManager.GetString("Tooltip_E_rel_last", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Relative error of the master meter.
/// </summary>
+42
View File
@@ -213,4 +213,46 @@
<data name="Unit" xml:space="preserve">
<value>Jednotka</value>
</data>
<data name="Approval" xml:space="preserve">
<value>Schválení</value>
</data>
<data name="Bench" xml:space="preserve">
<value>Stanice</value>
</data>
<data name="Density" xml:space="preserve">
<value>Hustota</value>
</data>
<data name="Density_correction" xml:space="preserve">
<value>Korekce hustoty</value>
</data>
<data name="End" xml:space="preserve">
<value>Konec</value>
</data>
<data name="Procedure" xml:space="preserve">
<value>Procedura</value>
</data>
<data name="Procedure_description" xml:space="preserve">
<value>Popis procedury</value>
</data>
<data name="Start" xml:space="preserve">
<value>Začátek</value>
</data>
<data name="User" xml:space="preserve">
<value>Uživatel</value>
</data>
<data name="User_description" xml:space="preserve">
<value>Popis uživatele</value>
</data>
<data name="Bench_ID" xml:space="preserve">
<value>ID stanice</value>
</data>
<data name="Bench_name" xml:space="preserve">
<value>Jméno stanice</value>
</data>
<data name="Address" xml:space="preserve">
<value>Adresa</value>
</data>
<data name="Batch" xml:space="preserve">
<value>Dávka</value>
</data>
</root>
+18
View File
@@ -723,4 +723,22 @@
<data name="Unit" xml:space="preserve">
<value>Unit</value>
</data>
<data name="Procedure_description" xml:space="preserve">
<value>Procedure description</value>
</data>
<data name="Bench_ID" xml:space="preserve">
<value>Bench ID</value>
</data>
<data name="Bench_name" xml:space="preserve">
<value>Bench name</value>
</data>
<data name="Address" xml:space="preserve">
<value>Address</value>
</data>
<data name="Tooltip_E_rel_last" xml:space="preserve">
<value>Relative error of a meter in previous test/in production</value>
</data>
<data name="Batch" xml:space="preserve">
<value>Batch</value>
</data>
</root>
+5 -2
View File
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -27,7 +27,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -77,6 +77,9 @@
<Compile Include="Forms\ListViewEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\ListViewExtensions.cs" />
<Compile Include="Forms\LviIntColumnComparer.cs" />
<Compile Include="Forms\LviTextColumnComparer.cs" />
<Compile Include="Forms\ResultsConfigCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
+2 -2
View File
@@ -21,7 +21,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -31,7 +31,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH</DefineConstants>
<DefineConstants>TRACE;MUNICH;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -253,9 +253,11 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
{
writer = File.AppendText(GetFilename(destination, batch.EndTime));
WriteRsltsEx(batch, writer);
log.WarnFormat("Batch {0} written by {1} to file {2}", batch.BatchNr, Name, destination);
}
catch
{
log.ErrorFormat("Error writing batch {0} by {1} to file {2}", batch.BatchNr, Name, destination);
}
finally
{
@@ -242,20 +242,24 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
{
if (batch == null || batch.WaterMeters == null || batch.WaterMeters.Count <= 0) return;
StreamWriter writer = StreamWriter.Null;
if (!string.IsNullOrEmpty(destination))
{
StreamWriter writer = StreamWriter.Null;
try
{
writer = File.AppendText(GetFilename(destination, batch.EndTime));
WriteRsltsEx(batch, writer);
log.WarnFormat("Batch {0} written by {1} to file {2}", batch.BatchNr, Name, destination);
}
catch
{
log.ErrorFormat("Error writing batch {0} by {1} to file {2}", batch.BatchNr, Name, destination);
}
finally
{
writer.Close();
}
}
WriteRsltsEx(batch, writer);
writer.Close();
}
@@ -241,20 +241,24 @@ namespace TBF.BenchControl.Output.FileWriters.OneFilePerMeter
void WriteRslts(Results.Entities.Batch batch, string destination)
{
StreamWriter writer = StreamWriter.Null;
if (!string.IsNullOrEmpty(destination))
{
StreamWriter writer = StreamWriter.Null;
try
{
writer = File.AppendText(GetFilename(destination, batch.EndTime));
WriteRsltsEx(batch, writer);
log.WarnFormat("Batch {0} written by {1} to file {2}", batch.BatchNr, Name, destination);
}
catch
{
log.ErrorFormat("Error writing batch {0} by {1} to file {2}", batch.BatchNr, Name, destination);
}
finally
{
writer.Close();
}
}
WriteRsltsEx(batch, writer);
writer.Close();
}
@@ -222,14 +222,20 @@ namespace TBF.BenchControl.Output.FileWriters.Xml
foreach (var wm in batch.WaterMeters)
{
StreamWriter writer = StreamWriter.Null;
try
{
StreamWriter writer = File.AppendText(GetFilename(destination, batch.EndTime, wm.WMPosition));
writer = File.AppendText(GetFilename(destination, batch.EndTime, wm.WMPosition));
WriteWM(writer, wm);
writer.Close();
log.WarnFormat("Batch {0}/watermeter {1} written by {2} to file {3}", batch.BatchNr, wm.WMPosition, Name, destination);
}
catch
{
log.ErrorFormat("Error writing batch {0}/watermeter {1} by {2} to file {3}", batch.BatchNr, wm.WMPosition, Name, destination);
}
finally
{
writer.Close();
}
}
}
@@ -227,14 +227,20 @@ namespace TBF.BenchControl.Output.FileWriters.XmlBatch
if (string.IsNullOrEmpty(destination)) return;
if (batch.WaterMeters == null || batch.WaterMeters.Count == 0) return;
StreamWriter writer = StreamWriter.Null;
try
{
StreamWriter writer = File.AppendText(GetFilename(destination, batch.EndTime));
writer = File.AppendText(GetFilename(destination, batch.EndTime));
WriteBatch(writer);
writer.Close();
log.WarnFormat("Batch {0} written by {1} to file {2}", batch.BatchNr, Name, destination);
}
catch
{
log.ErrorFormat("Error writing batch {0} by {1} to file {2}", batch.BatchNr, Name, destination);
}
finally
{
writer.Close();
}
}
@@ -3,6 +3,7 @@
///
using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Globalization;
using System.Threading;
using Results.Output.Printers.Enhanced;
@@ -99,6 +100,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
printerCfg.Footer = newCfg.Footer;
printerCfg.DocName = newCfg.DocName;
printerCfg.NrOfCopies = newCfg.NrOfCopies;
ApplyConfig();
}
@@ -164,34 +166,38 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
if (batch.WaterMeters.Count > 0)
{
EnhancedPrinterCfg cfg = new EnhancedPrinterCfg
{
PageOrientation = printerCfg.PageOrientation,
Template = printerCfg.Template,
TopMargin = printerCfg.TopMargin,
BottomMargin = printerCfg.BottomMargin,
LeftMargin = printerCfg.LeftMargin,
TitFntFml = printerCfg.TitFntFml,
TitFntSz = printerCfg.TitFntSz,
TitFntSty = printerCfg.TitFntSty,
HdrFntFml = printerCfg.HdrFntFml,
HdrFntSz = printerCfg.HdrFntSz,
HdrFntSty = printerCfg.HdrFntSty,
BodyFntFml = printerCfg.BodyFntFml,
BodyFntSz = printerCfg.BodyFntSz,
BodyFntSty = printerCfg.BodyFntSty,
FooterFntFml = printerCfg.FooterFntFml,
FooterFntSz = printerCfg.FooterFntSz,
FooterFntSty = printerCfg.FooterFntSty,
GoodOnly = printerCfg.GoodOnly,
SupressPrinting = printerCfg.SupressPrinting,
CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()),
Header = printerCfg.Header,
CommonItems = printerCfg.CommonItems,
TestItems = printerCfg.SelectedItems,
Footer = printerCfg.Footer,
};
{
PageOrientation = printerCfg.PageOrientation,
Template = printerCfg.Template,
TopMargin = printerCfg.TopMargin,
BottomMargin = printerCfg.BottomMargin,
LeftMargin = printerCfg.LeftMargin,
TitFntFml = printerCfg.TitFntFml,
TitFntSz = printerCfg.TitFntSz,
TitFntSty = printerCfg.TitFntSty,
HdrFntFml = printerCfg.HdrFntFml,
HdrFntSz = printerCfg.HdrFntSz,
HdrFntSty = printerCfg.HdrFntSty,
BodyFntFml = printerCfg.BodyFntFml,
BodyFntSz = printerCfg.BodyFntSz,
BodyFntSty = printerCfg.BodyFntSty,
FooterFntFml = printerCfg.FooterFntFml,
FooterFntSz = printerCfg.FooterFntSz,
FooterFntSty = printerCfg.FooterFntSty,
GoodOnly = printerCfg.GoodOnly,
SupressPrinting = printerCfg.SupressPrinting,
CultureInfo = (printerCfg.Culture == Culture.system) ? Thread.CurrentThread.CurrentCulture : new CultureInfo(printerCfg.Culture.ToString()),
Header = printerCfg.Header,
CommonItems = printerCfg.CommonItems,
TestItems = printerCfg.SelectedItems,
Footer = printerCfg.Footer,
};
new Results.Output.Printers.Enhanced.EnhancedPrintDocument(batch, cfg, documentName).Print();
for (int i = 1; i <= printerCfg.NrOfCopies; i++)
{
string docName = string.Format(((printerCfg.NrOfCopies == 1) ? "{0}" : "{0}-{1}"), documentName, i);
new Results.Output.Printers.Enhanced.EnhancedPrintDocument(batch, cfg, docName).Print();
}
}
}
}
@@ -42,6 +42,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
public string Header; /// =Title
public string Footer;
public string DocName;
public int NrOfCopies;
[XmlIgnore]
public Config.Entities.MetersKind MetersKind;
@@ -81,6 +82,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
Header = string.Empty;
Footer = string.Empty;
DocName = string.Empty;
NrOfCopies = 1;
}
public string ToString(int i)
@@ -74,6 +74,8 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
this.headerFontLabel = new System.Windows.Forms.Label();
this.templateTextBox = new System.Windows.Forms.TextBox();
this.templateLabel = new System.Windows.Forms.Label();
this.nrOfCopiesTextBox = new System.Windows.Forms.TextBox();
this.nrOfCopiesLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
@@ -128,7 +130,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
this.orientationComboBox.FormattingEnabled = true;
this.orientationComboBox.Location = new System.Drawing.Point(142, 83);
this.orientationComboBox.Name = "orientationComboBox";
this.orientationComboBox.Size = new System.Drawing.Size(218, 21);
this.orientationComboBox.Size = new System.Drawing.Size(146, 21);
this.orientationComboBox.TabIndex = 6;
//
// topMarginTextBox
@@ -475,10 +477,29 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
this.templateLabel.TabIndex = 3;
this.templateLabel.Text = "Template";
//
// nrOfCopiesTextBox
//
this.nrOfCopiesTextBox.Enabled = false;
this.nrOfCopiesTextBox.Location = new System.Drawing.Point(340, 83);
this.nrOfCopiesTextBox.Name = "nrOfCopiesTextBox";
this.nrOfCopiesTextBox.Size = new System.Drawing.Size(20, 20);
this.nrOfCopiesTextBox.TabIndex = 43;
//
// nrOfCopiesLabel
//
this.nrOfCopiesLabel.AutoSize = true;
this.nrOfCopiesLabel.Location = new System.Drawing.Point(291, 86);
this.nrOfCopiesLabel.Name = "nrOfCopiesLabel";
this.nrOfCopiesLabel.Size = new System.Drawing.Size(48, 13);
this.nrOfCopiesLabel.TabIndex = 44;
this.nrOfCopiesLabel.Text = "# copies";
//
// PrinterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.nrOfCopiesLabel);
this.Controls.Add(this.nrOfCopiesTextBox);
this.Controls.Add(this.templateTextBox);
this.Controls.Add(this.templateLabel);
this.Controls.Add(this.footerItalicCheckBox);
@@ -575,5 +596,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
private System.Windows.Forms.Label headerFontLabel;
private System.Windows.Forms.TextBox templateTextBox;
private System.Windows.Forms.Label templateLabel;
private System.Windows.Forms.TextBox nrOfCopiesTextBox;
private System.Windows.Forms.Label nrOfCopiesLabel;
}
}
@@ -113,6 +113,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
cultureComboBox.Text = config.Culture.ToString();
docNameTextBox.Text = config.DocName;
nrOfCopiesTextBox.Text = config.NrOfCopies.ToString();
}
public void Unlock()
@@ -147,6 +148,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
testItemsButton.Enabled = true;
footerButton.Enabled = true;
docNameTextBox.Enabled = true;
nrOfCopiesTextBox.Enabled = true;
}
public CfgUpdateFlags VerifyCfg(ref string message)
@@ -204,9 +206,15 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid culture";
}
flags |= CfgUpdateFlags.Error;
}
if (!int.TryParse(nrOfCopiesTextBox.Text, out dummy) || dummy < 1 || dummy > 9)
{
message += Environment.NewLine + "'Copies' should be between 1 and 9";
flags |= CfgUpdateFlags.Error;
}
return flags;
}
@@ -282,6 +290,7 @@ namespace TBF.BenchControl.Output.Printers.Enhanced
flags |= UpdateDifferent(ref config.Footer, footer, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.DocName, docNameTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
flags |= UpdateDifferent(ref config.NrOfCopies, nrOfCopiesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
{
+9 -9
View File
@@ -741,16 +741,16 @@ namespace TBF.BenchControl.Sequences
.AddOperation(checkUiOp)
.AddOperations(measureOperations)
.AddOperation(readRegistersOp)
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.TempMtrUp == null ? null : benchPath.TempMtrUp.ReadTempOp(ref TempUp))
.AddOperation(benchPath.TempMtrDown == null ? null : benchPath.TempMtrDown.ReadTempOp(ref TempDown))
.AddOperation(outPath.TempDiv == null ? null : outPath.TempDiv.ReadTempOp(ref TempDiv))
.AddOperation(benchPath.PressMtrUp == null ? null : benchPath.PressMtrUp.ReadPressureOp(ref PressUp))
.AddOperation(benchPath.PressMtrDown == null ? null : benchPath.PressMtrDown.ReadPressureOp(ref PressDown))
.AddOperation(benchPath.PressMtrDelta == null ? null : benchPath.PressMtrDelta.ReadPressureOp(ref PressDelta))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm1.ReadTempOp(ref TempRefHi1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefWarm2.ReadTempOp(ref TempRefHi2))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1))
.AddOperation(heatMetersPath == null ? null : heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2))
.AddOperation(realTest ? outPath.Scale.ReadMassOp(ref Mass) : null)
.AddOperation(StateMachine.ControlBoard.UpdateTankWeightOp())
.AddOperation((StateMachine.Ambient != null)
+3 -3
View File
@@ -146,10 +146,10 @@ namespace TBF.BenchControl.Sequences
sum += filteredValue;
if (count == 0) first = filteredValue;
last = filteredValue;
if (value < min) min = filteredValue;
if (value > max) max = filteredValue;
if (filteredValue < min) min = filteredValue;
if (filteredValue > max) max = filteredValue;
plotter.UpdateGraph(graphId, (float)(count + SkippedSamplesCount + FilterSize / 2), (float)value);
plotter.UpdateGraph(graphId, (float)(count + SkippedSamplesCount + FilterSize / 2), (float)filteredValue);
count++;
}
+10 -5
View File
@@ -560,11 +560,12 @@ namespace TBF
{
TBF.LocalSettings ls = Program.LocalSettings;
historyListViewEx.Columns.Add(Strings.Name, (ls.HistoryColumnCount > 0) ? ls.HistoryColumnWidths[0] : 80);
historyListViewEx.Columns.Add(Strings.Revision, (ls.HistoryColumnCount > 0) ? ls.HistoryColumnWidths[0] : 80);
historyListViewEx.Columns.Add(Strings.Date_and_time, (ls.HistoryColumnCount > 1) ? ls.HistoryColumnWidths[1] : 120);
historyListViewEx.Columns.Add(Strings.User, (ls.HistoryColumnCount > 2) ? ls.HistoryColumnWidths[2] : 55);
historyListViewEx.Columns.Add(Strings.DescriptionColHdr, (ls.HistoryColumnCount > 3) ? ls.HistoryColumnWidths[3] : 300);
historyListViewEx.Columns.Add(Strings.Name, (ls.HistoryColumnCount > 0) ? ls.HistoryColumnWidths[0] : 80);
historyListViewEx.Columns.Add(Strings.Revision, (ls.HistoryColumnCount > 1) ? ls.HistoryColumnWidths[1] : 80);
historyListViewEx.Columns.Add(Strings.Date_and_time, (ls.HistoryColumnCount > 2) ? ls.HistoryColumnWidths[2] : 120);
historyListViewEx.Columns.Add(Strings.User, (ls.HistoryColumnCount > 3) ? ls.HistoryColumnWidths[3] : 55);
historyListViewEx.Columns.Add(Strings.DescriptionColHdr, (ls.HistoryColumnCount > 4) ? ls.HistoryColumnWidths[4] : 150);
RefreshHistoryTab();
}
@@ -721,6 +722,7 @@ namespace TBF
Test entity = (Test)lvi.Tag;
entity.Name = lvi.Text;
entity.ItemNr = i;
int part = entity.Part;
if (lvi.SubItems[(int)MtrlgyClmn.Part].Text.Equals("-"))
@@ -992,6 +994,7 @@ namespace TBF
Test entity = (Test)lvi.Tag;
entity.Name = lvi.Text;
entity.ItemNr = i;
int part = entity.Part;
if (lvi.SubItems[(int)Mtrlgy2Clmn.Part].Text.Equals("-"))
@@ -1238,6 +1241,7 @@ namespace TBF
Test entity = (Test)lvi.Tag;
entity.Name = lvi.Text;
entity.ItemNr = i;
int part = entity.Part;
if (lvi.SubItems[(int)ProcessClmn.Part].Text.Equals("-"))
@@ -1480,6 +1484,7 @@ namespace TBF
Test entity = (Test)lvi.Tag;
entity.Name = lvi.Text;
entity.ItemNr = i;
int part = entity.Part;
if (lvi.SubItems[(int)ParametersClmn.Part].Text.Equals("-"))
+2 -2
View File
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.955.0")]
[assembly: AssemblyFileVersion("2.18.955.0")]
[assembly: AssemblyVersion("2.18.1093.0")]
[assembly: AssemblyFileVersion("2.18.1093.0")]
+9
View File
@@ -3489,6 +3489,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Reload previous results.
/// </summary>
internal static string Reload_previous_results {
get {
return ResourceManager.GetString("Reload_previous_results", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to remaining time.
/// </summary>
+3
View File
@@ -1446,4 +1446,7 @@
<data name="Flow_adjustment_failed" xml:space="preserve">
<value>Durchfluss nicht erreicht</value>
</data>
<data name="Reload_previous_results" xml:space="preserve">
<value>Vorherige Ergebnisse Herunterladen</value>
</data>
</root>
+3
View File
@@ -1846,4 +1846,7 @@
<data name="Value" xml:space="preserve">
<value>Value</value>
</data>
<data name="Reload_previous_results" xml:space="preserve">
<value>Reload previous results</value>
</data>
</root>
+18 -4
View File
@@ -2,8 +2,10 @@
/// Copyright (c) 2018 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using TBF.Resources;
using TBF.UiBridge;
@@ -125,12 +127,24 @@ namespace TBF.Screens
try
{
string[] batches = Directory.GetDirectories(Program.GraphsDir);
int[] batchNrs = new int[batches.Length];
int i = 0;
foreach (var b in batches)
{
int nr;
if (int.TryParse(Path.GetFileName(b), out nr))
{
batchNrs[i++] = nr;
}
}
Array.Sort(batchNrs);
treeView.Nodes.Clear();
for (int i = batches.Length - 1; i >= Math.Max(0, batches.Length - 20); i--)
for (int j = batchNrs.Length - 1; j >= Math.Max(0, batchNrs.Length - 40); j--)
{
string b = batches[i];
string batchNrSstr = Path.GetFileName(b);
string rootNodeName = Path.GetFileName(b);
string batchNrSstr = batchNrs[j].ToString();
string b = Path.Combine(Program.GraphsDir, batchNrSstr);
string rootNodeName = batchNrSstr;
if ((TBF.BenchControl.Sequences.ProcessData.BatchRslts != null) && rootNodeName.Equals(TBF.BenchControl.Sequences.ProcessData.BatchRslts.Batch.BatchNr.ToString()))
{
rootNodeName = Strings.current;
+102 -102
View File
@@ -31,108 +31,108 @@ namespace TBF.Screens
/// </summary>
private void InitializeComponent()
{
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.reloadPreviousResultsButton = new System.Windows.Forms.Button();
this.columnWidthsButton = new System.Windows.Forms.Button();
this.showPreviousResultsButton = new System.Windows.Forms.Button();
this.configureButton = new System.Windows.Forms.Button();
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
this.SuspendLayout();
//
// splitContainer
//
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer.IsSplitterFixed = true;
this.splitContainer.Location = new System.Drawing.Point(0, 0);
this.splitContainer.Name = "splitContainer";
this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer.Panel1
//
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer.Panel1.Controls.Add(this.reloadPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.columnWidthsButton);
this.splitContainer.Panel1.Controls.Add(this.showPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.configureButton);
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.flowLayoutPanel);
this.splitContainer.Size = new System.Drawing.Size(1057, 706);
this.splitContainer.SplitterDistance = 42;
this.splitContainer.TabIndex = 0;
//
// reloadPreviousResultsButton
//
this.reloadPreviousResultsButton.Enabled = false;
this.reloadPreviousResultsButton.Location = new System.Drawing.Point(405, 10);
this.reloadPreviousResultsButton.Name = "reloadPreviousResultsButton";
this.reloadPreviousResultsButton.Size = new System.Drawing.Size(147, 30);
this.reloadPreviousResultsButton.TabIndex = 3;
this.reloadPreviousResultsButton.Text = "Reload previous results";
this.reloadPreviousResultsButton.UseVisualStyleBackColor = true;
this.reloadPreviousResultsButton.Click += new System.EventHandler(this.reloadPreviousResultsButton_Click);
//
// columnWidthsButton
//
this.columnWidthsButton.Location = new System.Drawing.Point(126, 10);
this.columnWidthsButton.Name = "columnWidthsButton";
this.columnWidthsButton.Size = new System.Drawing.Size(120, 30);
this.columnWidthsButton.TabIndex = 1;
this.columnWidthsButton.Text = "Save column widths";
this.columnWidthsButton.UseVisualStyleBackColor = true;
this.columnWidthsButton.Click += new System.EventHandler(this.columnWidthsButton_Click);
//
// showPreviousResultsButton
//
this.showPreviousResultsButton.Location = new System.Drawing.Point(252, 10);
this.showPreviousResultsButton.Name = "showPreviousResultsButton";
this.showPreviousResultsButton.Size = new System.Drawing.Size(147, 30);
this.showPreviousResultsButton.TabIndex = 2;
this.showPreviousResultsButton.Text = "Show previous results";
this.showPreviousResultsButton.UseVisualStyleBackColor = true;
this.showPreviousResultsButton.Click += new System.EventHandler(this.showPreviousResultsButton_Click);
//
// configureButton
//
this.configureButton.Location = new System.Drawing.Point(20, 10);
this.configureButton.Name = "configureButton";
this.configureButton.Size = new System.Drawing.Size(100, 30);
this.configureButton.TabIndex = 0;
this.configureButton.Text = "Configure";
this.configureButton.UseVisualStyleBackColor = true;
this.configureButton.Click += new System.EventHandler(this.configureButton_Click);
//
// flowLayoutPanel
//
this.flowLayoutPanel.AutoScroll = true;
this.flowLayoutPanel.BackColor = System.Drawing.SystemColors.Control;
this.flowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel.Name = "flowLayoutPanel";
this.flowLayoutPanel.Size = new System.Drawing.Size(1057, 660);
this.flowLayoutPanel.TabIndex = 0;
//
// ResultsTabPageCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Silver;
this.Controls.Add(this.splitContainer);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.Name = "ResultsTabPageCtrl";
this.Size = new System.Drawing.Size(1057, 706);
this.Load += new System.EventHandler(this.ResultsTabPageCtrl_Load);
this.splitContainer.Panel1.ResumeLayout(false);
this.splitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
this.splitContainer.ResumeLayout(false);
this.ResumeLayout(false);
this.splitContainer = new System.Windows.Forms.SplitContainer();
this.reloadPreviousResultsButton = new System.Windows.Forms.Button();
this.columnWidthsButton = new System.Windows.Forms.Button();
this.showPreviousResultsButton = new System.Windows.Forms.Button();
this.configureButton = new System.Windows.Forms.Button();
this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout();
this.splitContainer.Panel2.SuspendLayout();
this.splitContainer.SuspendLayout();
this.SuspendLayout();
//
// splitContainer
//
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer.IsSplitterFixed = true;
this.splitContainer.Location = new System.Drawing.Point(0, 0);
this.splitContainer.Name = "splitContainer";
this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer.Panel1
//
this.splitContainer.Panel1.BackColor = System.Drawing.SystemColors.Control;
this.splitContainer.Panel1.Controls.Add(this.reloadPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.columnWidthsButton);
this.splitContainer.Panel1.Controls.Add(this.showPreviousResultsButton);
this.splitContainer.Panel1.Controls.Add(this.configureButton);
//
// splitContainer.Panel2
//
this.splitContainer.Panel2.Controls.Add(this.flowLayoutPanel);
this.splitContainer.Size = new System.Drawing.Size(1057, 706);
this.splitContainer.SplitterDistance = 42;
this.splitContainer.TabIndex = 0;
//
// reloadPreviousResultsButton
//
this.reloadPreviousResultsButton.Enabled = false;
this.reloadPreviousResultsButton.Location = new System.Drawing.Point(405, 10);
this.reloadPreviousResultsButton.Name = "reloadPreviousResultsButton";
this.reloadPreviousResultsButton.Size = new System.Drawing.Size(185, 30);
this.reloadPreviousResultsButton.TabIndex = 3;
this.reloadPreviousResultsButton.Text = "Reload previous results";
this.reloadPreviousResultsButton.UseVisualStyleBackColor = true;
this.reloadPreviousResultsButton.Click += new System.EventHandler(this.reloadPreviousResultsButton_Click);
//
// columnWidthsButton
//
this.columnWidthsButton.Location = new System.Drawing.Point(126, 10);
this.columnWidthsButton.Name = "columnWidthsButton";
this.columnWidthsButton.Size = new System.Drawing.Size(120, 30);
this.columnWidthsButton.TabIndex = 1;
this.columnWidthsButton.Text = "Save column widths";
this.columnWidthsButton.UseVisualStyleBackColor = true;
this.columnWidthsButton.Click += new System.EventHandler(this.columnWidthsButton_Click);
//
// showPreviousResultsButton
//
this.showPreviousResultsButton.Location = new System.Drawing.Point(252, 10);
this.showPreviousResultsButton.Name = "showPreviousResultsButton";
this.showPreviousResultsButton.Size = new System.Drawing.Size(147, 30);
this.showPreviousResultsButton.TabIndex = 2;
this.showPreviousResultsButton.Text = "Show previous results";
this.showPreviousResultsButton.UseVisualStyleBackColor = true;
this.showPreviousResultsButton.Click += new System.EventHandler(this.showPreviousResultsButton_Click);
//
// configureButton
//
this.configureButton.Location = new System.Drawing.Point(20, 10);
this.configureButton.Name = "configureButton";
this.configureButton.Size = new System.Drawing.Size(100, 30);
this.configureButton.TabIndex = 0;
this.configureButton.Text = "Configure";
this.configureButton.UseVisualStyleBackColor = true;
this.configureButton.Click += new System.EventHandler(this.configureButton_Click);
//
// flowLayoutPanel
//
this.flowLayoutPanel.AutoScroll = true;
this.flowLayoutPanel.BackColor = System.Drawing.SystemColors.Control;
this.flowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel.Name = "flowLayoutPanel";
this.flowLayoutPanel.Size = new System.Drawing.Size(1057, 660);
this.flowLayoutPanel.TabIndex = 0;
//
// ResultsTabPageCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Silver;
this.Controls.Add(this.splitContainer);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.Name = "ResultsTabPageCtrl";
this.Size = new System.Drawing.Size(1057, 706);
this.Load += new System.EventHandler(this.ResultsTabPageCtrl_Load);
this.splitContainer.Panel1.ResumeLayout(false);
this.splitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
this.splitContainer.ResumeLayout(false);
this.ResumeLayout(false);
}
+1 -4
View File
@@ -40,10 +40,6 @@ namespace TBF.Screens
{
InitializeComponent();
#if MUNICH
reloadPreviousResultsButton.Visible = false;
#endif
if (Program.LocalSettings != null)
{
MetersArrangement = Program.LocalSettings.ResultsConfigMeters;
@@ -100,6 +96,7 @@ namespace TBF.Screens
configureButton.Text = Strings.Configure;
columnWidthsButton.Text = Strings.Save_column_widths;
showPreviousResultsButton.Text = Strings.Previous_results;
reloadPreviousResultsButton.Text = Strings.Reload_previous_results;
RedrawAll(TBF.BenchControl.Sequences.ProcessData.BatchRslts);
}
+4 -4
View File
@@ -39,7 +39,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA;NO_GRAPHS;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -49,7 +49,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;MUNICH;CAMERA;NO_GRAPHS;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
@@ -58,7 +58,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;DEBUG;MUNICH;CAMERA;NO_GRAPHS;LANG_DE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
@@ -67,7 +67,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;MUNICH;CAMERA</DefineConstants>
<DefineConstants>TRACE;MUNICH;CAMERA;NO_GRAPHS;LANG_DE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
+286 -286
View File
@@ -31,292 +31,292 @@ namespace TBF.TestWizard
/// </summary>
private void InitializeComponent()
{
this.horizSplitContainer = new System.Windows.Forms.SplitContainer();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.qFromLabel = new System.Windows.Forms.Label();
this.qToLabel = new System.Windows.Forms.Label();
this.qFromTextBox = new System.Windows.Forms.TextBox();
this.qToTextBox = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.q2TextBox = new System.Windows.Forms.TextBox();
this.dQTextBox = new System.Windows.Forms.TextBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.q3TextBox = new System.Windows.Forms.TextBox();
this.dQpctTextBox = new System.Windows.Forms.TextBox();
this.sensorsComboBox = new System.Windows.Forms.ComboBox();
this.sensorsLabel = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.nextButton = new System.Windows.Forms.Button();
this.backButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
this.horizSplitContainer.Panel1.SuspendLayout();
this.horizSplitContainer.Panel2.SuspendLayout();
this.horizSplitContainer.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// horizSplitContainer
//
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
this.horizSplitContainer.Name = "horizSplitContainer";
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// horizSplitContainer.Panel1
//
this.horizSplitContainer.Panel1.Controls.Add(this.tabControl1);
this.horizSplitContainer.Panel1.Controls.Add(this.sensorsComboBox);
this.horizSplitContainer.Panel1.Controls.Add(this.sensorsLabel);
//
// horizSplitContainer.Panel2
//
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
this.horizSplitContainer.Panel2.Controls.Add(this.backButton);
this.horizSplitContainer.Size = new System.Drawing.Size(284, 262);
this.horizSplitContainer.SplitterDistance = 182;
this.horizSplitContainer.TabIndex = 1;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(0, 3);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(284, 123);
this.tabControl1.TabIndex = 11;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
this.tabPage1.Controls.Add(this.qFromLabel);
this.tabPage1.Controls.Add(this.qToLabel);
this.tabPage1.Controls.Add(this.qFromTextBox);
this.tabPage1.Controls.Add(this.qToTextBox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(276, 97);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Q from / Q to";
//
// qFromLabel
//
this.qFromLabel.AutoSize = true;
this.qFromLabel.Location = new System.Drawing.Point(18, 35);
this.qFromLabel.Name = "qFromLabel";
this.qFromLabel.Size = new System.Drawing.Size(72, 13);
this.qFromLabel.TabIndex = 1;
this.qFromLabel.Text = "Q from [m3/h]";
//
// qToLabel
//
this.qToLabel.AutoSize = true;
this.qToLabel.Location = new System.Drawing.Point(18, 61);
this.qToLabel.Name = "qToLabel";
this.qToLabel.Size = new System.Drawing.Size(61, 13);
this.qToLabel.TabIndex = 2;
this.qToLabel.Text = "Q to [m3/h]";
//
// qFromTextBox
//
this.qFromTextBox.Location = new System.Drawing.Point(134, 32);
this.qFromTextBox.Name = "qFromTextBox";
this.qFromTextBox.Size = new System.Drawing.Size(124, 20);
this.qFromTextBox.TabIndex = 4;
this.qFromTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// qToTextBox
//
this.qToTextBox.Location = new System.Drawing.Point(134, 58);
this.qToTextBox.Name = "qToTextBox";
this.qToTextBox.Size = new System.Drawing.Size(124, 20);
this.qToTextBox.TabIndex = 5;
this.qToTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.SystemColors.Control;
this.tabPage2.Controls.Add(this.label1);
this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Controls.Add(this.q2TextBox);
this.tabPage2.Controls.Add(this.dQTextBox);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(276, 97);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Q +/- dQ";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 13);
this.label1.TabIndex = 6;
this.label1.Text = "Q [m3/h]";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(18, 61);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 13);
this.label2.TabIndex = 7;
this.label2.Text = "dQ [m3/h]";
//
// q2TextBox
//
this.q2TextBox.Location = new System.Drawing.Point(134, 32);
this.q2TextBox.Name = "q2TextBox";
this.q2TextBox.Size = new System.Drawing.Size(124, 20);
this.q2TextBox.TabIndex = 8;
this.q2TextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// dQTextBox
//
this.dQTextBox.Location = new System.Drawing.Point(134, 58);
this.dQTextBox.Name = "dQTextBox";
this.dQTextBox.Size = new System.Drawing.Size(124, 20);
this.dQTextBox.TabIndex = 9;
this.dQTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// tabPage3
//
this.tabPage3.BackColor = System.Drawing.SystemColors.Control;
this.tabPage3.Controls.Add(this.label3);
this.tabPage3.Controls.Add(this.label4);
this.tabPage3.Controls.Add(this.q3TextBox);
this.tabPage3.Controls.Add(this.dQpctTextBox);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(276, 97);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Q +/- delta [%]";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 35);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(49, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Q [m3/h]";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(18, 61);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(38, 13);
this.label4.TabIndex = 7;
this.label4.Text = "dQ [%]";
//
// q3TextBox
//
this.q3TextBox.Location = new System.Drawing.Point(134, 32);
this.q3TextBox.Name = "q3TextBox";
this.q3TextBox.Size = new System.Drawing.Size(124, 20);
this.q3TextBox.TabIndex = 8;
this.q3TextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// dQpctTextBox
//
this.dQpctTextBox.Location = new System.Drawing.Point(134, 58);
this.dQpctTextBox.Name = "dQpctTextBox";
this.dQpctTextBox.Size = new System.Drawing.Size(124, 20);
this.dQpctTextBox.TabIndex = 9;
this.dQpctTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// sensorsComboBox
//
this.sensorsComboBox.FormattingEnabled = true;
this.sensorsComboBox.Location = new System.Drawing.Point(137, 145);
this.sensorsComboBox.Name = "sensorsComboBox";
this.sensorsComboBox.Size = new System.Drawing.Size(124, 21);
this.sensorsComboBox.TabIndex = 7;
this.sensorsComboBox.SelectedIndexChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// sensorsLabel
//
this.sensorsLabel.AutoSize = true;
this.sensorsLabel.Location = new System.Drawing.Point(21, 148);
this.sensorsLabel.Name = "sensorsLabel";
this.sensorsLabel.Size = new System.Drawing.Size(45, 13);
this.sensorsLabel.TabIndex = 6;
this.sensorsLabel.Text = "Sensors";
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(186, 17);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 42);
this.cancelButton.TabIndex = 27;
this.cancelButton.Text = "&Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// nextButton
//
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.nextButton.Location = new System.Drawing.Point(105, 17);
this.nextButton.Name = "nextButton";
this.nextButton.Size = new System.Drawing.Size(75, 42);
this.nextButton.TabIndex = 26;
this.nextButton.Text = "&Next >";
this.nextButton.UseVisualStyleBackColor = true;
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
//
// backButton
//
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.backButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
this.backButton.Location = new System.Drawing.Point(24, 17);
this.backButton.Name = "backButton";
this.backButton.Size = new System.Drawing.Size(75, 42);
this.backButton.TabIndex = 25;
this.backButton.Text = "< &Back";
this.backButton.UseVisualStyleBackColor = true;
this.backButton.Click += new System.EventHandler(this.backButton_Click);
//
// FlowSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.horizSplitContainer);
this.Name = "FlowSelection";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "FlowSelection";
this.Load += new System.EventHandler(this.FlowSelection_Load);
this.horizSplitContainer.Panel1.ResumeLayout(false);
this.horizSplitContainer.Panel1.PerformLayout();
this.horizSplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
this.horizSplitContainer.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.ResumeLayout(false);
this.horizSplitContainer = new System.Windows.Forms.SplitContainer();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.qFromLabel = new System.Windows.Forms.Label();
this.qToLabel = new System.Windows.Forms.Label();
this.qFromTextBox = new System.Windows.Forms.TextBox();
this.qToTextBox = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.q2TextBox = new System.Windows.Forms.TextBox();
this.dQTextBox = new System.Windows.Forms.TextBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.q3TextBox = new System.Windows.Forms.TextBox();
this.dQpctTextBox = new System.Windows.Forms.TextBox();
this.sensorsComboBox = new System.Windows.Forms.ComboBox();
this.sensorsLabel = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.nextButton = new System.Windows.Forms.Button();
this.backButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
this.horizSplitContainer.Panel1.SuspendLayout();
this.horizSplitContainer.Panel2.SuspendLayout();
this.horizSplitContainer.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// horizSplitContainer
//
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
this.horizSplitContainer.Name = "horizSplitContainer";
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// horizSplitContainer.Panel1
//
this.horizSplitContainer.Panel1.Controls.Add(this.tabControl1);
this.horizSplitContainer.Panel1.Controls.Add(this.sensorsComboBox);
this.horizSplitContainer.Panel1.Controls.Add(this.sensorsLabel);
//
// horizSplitContainer.Panel2
//
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
this.horizSplitContainer.Panel2.Controls.Add(this.backButton);
this.horizSplitContainer.Size = new System.Drawing.Size(284, 262);
this.horizSplitContainer.SplitterDistance = 182;
this.horizSplitContainer.TabIndex = 1;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(0, 3);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(284, 123);
this.tabControl1.TabIndex = 11;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
this.tabPage1.Controls.Add(this.qFromLabel);
this.tabPage1.Controls.Add(this.qToLabel);
this.tabPage1.Controls.Add(this.qFromTextBox);
this.tabPage1.Controls.Add(this.qToTextBox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(276, 97);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Q von / Q bis";
//
// qFromLabel
//
this.qFromLabel.AutoSize = true;
this.qFromLabel.Location = new System.Drawing.Point(18, 35);
this.qFromLabel.Name = "qFromLabel";
this.qFromLabel.Size = new System.Drawing.Size(72, 13);
this.qFromLabel.TabIndex = 1;
this.qFromLabel.Text = "Q from [m3/h]";
//
// qToLabel
//
this.qToLabel.AutoSize = true;
this.qToLabel.Location = new System.Drawing.Point(18, 61);
this.qToLabel.Name = "qToLabel";
this.qToLabel.Size = new System.Drawing.Size(61, 13);
this.qToLabel.TabIndex = 2;
this.qToLabel.Text = "Q to [m3/h]";
//
// qFromTextBox
//
this.qFromTextBox.Location = new System.Drawing.Point(134, 32);
this.qFromTextBox.Name = "qFromTextBox";
this.qFromTextBox.Size = new System.Drawing.Size(124, 20);
this.qFromTextBox.TabIndex = 4;
this.qFromTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// qToTextBox
//
this.qToTextBox.Location = new System.Drawing.Point(134, 58);
this.qToTextBox.Name = "qToTextBox";
this.qToTextBox.Size = new System.Drawing.Size(124, 20);
this.qToTextBox.TabIndex = 5;
this.qToTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.SystemColors.Control;
this.tabPage2.Controls.Add(this.label1);
this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Controls.Add(this.q2TextBox);
this.tabPage2.Controls.Add(this.dQTextBox);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(276, 97);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Q +/- dQ";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 13);
this.label1.TabIndex = 6;
this.label1.Text = "Q [m3/h]";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(18, 61);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 13);
this.label2.TabIndex = 7;
this.label2.Text = "dQ [m3/h]";
//
// q2TextBox
//
this.q2TextBox.Location = new System.Drawing.Point(134, 32);
this.q2TextBox.Name = "q2TextBox";
this.q2TextBox.Size = new System.Drawing.Size(124, 20);
this.q2TextBox.TabIndex = 8;
this.q2TextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// dQTextBox
//
this.dQTextBox.Location = new System.Drawing.Point(134, 58);
this.dQTextBox.Name = "dQTextBox";
this.dQTextBox.Size = new System.Drawing.Size(124, 20);
this.dQTextBox.TabIndex = 9;
this.dQTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// tabPage3
//
this.tabPage3.BackColor = System.Drawing.SystemColors.Control;
this.tabPage3.Controls.Add(this.label3);
this.tabPage3.Controls.Add(this.label4);
this.tabPage3.Controls.Add(this.q3TextBox);
this.tabPage3.Controls.Add(this.dQpctTextBox);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(276, 97);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Q +/- delta [%]";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 35);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(49, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Q [m3/h]";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(18, 61);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(38, 13);
this.label4.TabIndex = 7;
this.label4.Text = "dQ [%]";
//
// q3TextBox
//
this.q3TextBox.Location = new System.Drawing.Point(134, 32);
this.q3TextBox.Name = "q3TextBox";
this.q3TextBox.Size = new System.Drawing.Size(124, 20);
this.q3TextBox.TabIndex = 8;
this.q3TextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// dQpctTextBox
//
this.dQpctTextBox.Location = new System.Drawing.Point(134, 58);
this.dQpctTextBox.Name = "dQpctTextBox";
this.dQpctTextBox.Size = new System.Drawing.Size(124, 20);
this.dQpctTextBox.TabIndex = 9;
this.dQpctTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// sensorsComboBox
//
this.sensorsComboBox.FormattingEnabled = true;
this.sensorsComboBox.Location = new System.Drawing.Point(137, 145);
this.sensorsComboBox.Name = "sensorsComboBox";
this.sensorsComboBox.Size = new System.Drawing.Size(124, 21);
this.sensorsComboBox.TabIndex = 7;
this.sensorsComboBox.SelectedIndexChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// sensorsLabel
//
this.sensorsLabel.AutoSize = true;
this.sensorsLabel.Location = new System.Drawing.Point(21, 148);
this.sensorsLabel.Name = "sensorsLabel";
this.sensorsLabel.Size = new System.Drawing.Size(45, 13);
this.sensorsLabel.TabIndex = 6;
this.sensorsLabel.Text = "Sensors";
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(186, 17);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 42);
this.cancelButton.TabIndex = 27;
this.cancelButton.Text = "&Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// nextButton
//
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.nextButton.Location = new System.Drawing.Point(105, 17);
this.nextButton.Name = "nextButton";
this.nextButton.Size = new System.Drawing.Size(75, 42);
this.nextButton.TabIndex = 26;
this.nextButton.Text = "&Next >";
this.nextButton.UseVisualStyleBackColor = true;
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
//
// backButton
//
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.backButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
this.backButton.Location = new System.Drawing.Point(24, 17);
this.backButton.Name = "backButton";
this.backButton.Size = new System.Drawing.Size(75, 42);
this.backButton.TabIndex = 25;
this.backButton.Text = "< &Back";
this.backButton.UseVisualStyleBackColor = true;
this.backButton.Click += new System.EventHandler(this.backButton_Click);
//
// FlowSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.horizSplitContainer);
this.Name = "FlowSelection";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "FlowSelection";
this.Load += new System.EventHandler(this.FlowSelection_Load);
this.horizSplitContainer.Panel1.ResumeLayout(false);
this.horizSplitContainer.Panel1.PerformLayout();
this.horizSplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
this.horizSplitContainer.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.ResumeLayout(false);
}
+214 -280
View File
@@ -31,280 +31,219 @@ namespace TBF.TestWizard
/// </summary>
private void InitializeComponent()
{
this.horizSplitContainer = new System.Windows.Forms.SplitContainer();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.errLoPctLabel = new System.Windows.Forms.Label();
this.errHiPctLabel = new System.Windows.Forms.Label();
this.errHiPctTextBox = new System.Windows.Forms.TextBox();
this.errLoPctTextBox = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.classComboBox = new System.Windows.Forms.ComboBox();
this.classLabel = new System.Windows.Forms.Label();
this.qpLabel = new System.Windows.Forms.Label();
this.qpTextBox = new System.Windows.Forms.TextBox();
this.uncertaintyTextBox = new System.Windows.Forms.TextBox();
this.durationTextBox = new System.Windows.Forms.TextBox();
this.volumeTextBox = new System.Windows.Forms.TextBox();
this.uncertaintyLabel = new System.Windows.Forms.Label();
this.durationLabel = new System.Windows.Forms.Label();
this.volumeLabel = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.nextButton = new System.Windows.Forms.Button();
this.backButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
this.horizSplitContainer.Panel1.SuspendLayout();
this.horizSplitContainer.Panel2.SuspendLayout();
this.horizSplitContainer.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// horizSplitContainer
//
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
this.horizSplitContainer.Name = "horizSplitContainer";
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// horizSplitContainer.Panel1
//
this.horizSplitContainer.Panel1.Controls.Add(this.tabControl1);
this.horizSplitContainer.Panel1.Controls.Add(this.uncertaintyTextBox);
this.horizSplitContainer.Panel1.Controls.Add(this.durationTextBox);
this.horizSplitContainer.Panel1.Controls.Add(this.volumeTextBox);
this.horizSplitContainer.Panel1.Controls.Add(this.uncertaintyLabel);
this.horizSplitContainer.Panel1.Controls.Add(this.durationLabel);
this.horizSplitContainer.Panel1.Controls.Add(this.volumeLabel);
//
// horizSplitContainer.Panel2
//
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
this.horizSplitContainer.Panel2.Controls.Add(this.backButton);
this.horizSplitContainer.Size = new System.Drawing.Size(284, 262);
this.horizSplitContainer.SplitterDistance = 182;
this.horizSplitContainer.TabIndex = 1;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(284, 93);
this.tabControl1.TabIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
this.tabPage1.Controls.Add(this.errLoPctLabel);
this.tabPage1.Controls.Add(this.errHiPctLabel);
this.tabPage1.Controls.Add(this.errHiPctTextBox);
this.tabPage1.Controls.Add(this.errLoPctTextBox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(276, 67);
this.tabPage1.TabIndex = 0;
//
// errLoPctLabel
//
this.errLoPctLabel.AutoSize = true;
this.errLoPctLabel.Location = new System.Drawing.Point(31, 16);
this.errLoPctLabel.Name = "errLoPctLabel";
this.errLoPctLabel.Size = new System.Drawing.Size(85, 13);
this.errLoPctLabel.TabIndex = 0;
this.errLoPctLabel.Text = "Error low limit [%]";
//
// errHiPctLabel
//
this.errHiPctLabel.AutoSize = true;
this.errHiPctLabel.Location = new System.Drawing.Point(31, 41);
this.errHiPctLabel.Name = "errHiPctLabel";
this.errHiPctLabel.Size = new System.Drawing.Size(89, 13);
this.errHiPctLabel.TabIndex = 2;
this.errHiPctLabel.Text = "Error high limit [%]";
//
// errHiPctTextBox
//
this.errHiPctTextBox.Location = new System.Drawing.Point(146, 38);
this.errHiPctTextBox.Name = "errHiPctTextBox";
this.errHiPctTextBox.Size = new System.Drawing.Size(86, 20);
this.errHiPctTextBox.TabIndex = 3;
this.errHiPctTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// errLoPctTextBox
//
this.errLoPctTextBox.Location = new System.Drawing.Point(146, 13);
this.errLoPctTextBox.Name = "errLoPctTextBox";
this.errLoPctTextBox.Size = new System.Drawing.Size(86, 20);
this.errLoPctTextBox.TabIndex = 1;
this.errLoPctTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.SystemColors.Control;
this.tabPage2.Controls.Add(this.classComboBox);
this.tabPage2.Controls.Add(this.classLabel);
this.tabPage2.Controls.Add(this.qpLabel);
this.tabPage2.Controls.Add(this.qpTextBox);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(276, 67);
this.tabPage2.TabIndex = 1;
//
// classComboBox
//
this.classComboBox.FormattingEnabled = true;
this.classComboBox.Items.AddRange(new object[] {
"1",
"2",
"3"});
this.classComboBox.Location = new System.Drawing.Point(146, 13);
this.classComboBox.Name = "classComboBox";
this.classComboBox.Size = new System.Drawing.Size(86, 21);
this.classComboBox.TabIndex = 1;
this.classComboBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// classLabel
//
this.classLabel.AutoSize = true;
this.classLabel.Location = new System.Drawing.Point(31, 17);
this.classLabel.Name = "classLabel";
this.classLabel.Size = new System.Drawing.Size(32, 13);
this.classLabel.TabIndex = 0;
this.classLabel.Text = "Class";
//
// qpLabel
//
this.qpLabel.AutoSize = true;
this.qpLabel.Location = new System.Drawing.Point(31, 42);
this.qpLabel.Name = "qpLabel";
this.qpLabel.Size = new System.Drawing.Size(55, 13);
this.qpLabel.TabIndex = 2;
this.qpLabel.Text = "Qp [m3/h]";
//
// qpTextBox
//
this.qpTextBox.Location = new System.Drawing.Point(146, 39);
this.qpTextBox.Name = "qpTextBox";
this.qpTextBox.Size = new System.Drawing.Size(86, 20);
this.qpTextBox.TabIndex = 3;
this.qpTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// uncertaintyTextBox
//
this.uncertaintyTextBox.Location = new System.Drawing.Point(150, 100);
this.uncertaintyTextBox.Name = "uncertaintyTextBox";
this.uncertaintyTextBox.Size = new System.Drawing.Size(86, 20);
this.uncertaintyTextBox.TabIndex = 2;
this.uncertaintyTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// durationTextBox
//
this.durationTextBox.Location = new System.Drawing.Point(150, 149);
this.durationTextBox.Name = "durationTextBox";
this.durationTextBox.Size = new System.Drawing.Size(86, 20);
this.durationTextBox.TabIndex = 6;
this.durationTextBox.TextChanged += new System.EventHandler(this.durationTextBox_TextChanged);
//
// volumeTextBox
//
this.volumeTextBox.Location = new System.Drawing.Point(150, 124);
this.volumeTextBox.Name = "volumeTextBox";
this.volumeTextBox.Size = new System.Drawing.Size(86, 20);
this.volumeTextBox.TabIndex = 4;
this.volumeTextBox.TextChanged += new System.EventHandler(this.volumeTextBox_TextChanged);
//
// uncertaintyLabel
//
this.uncertaintyLabel.AutoSize = true;
this.uncertaintyLabel.Location = new System.Drawing.Point(35, 103);
this.uncertaintyLabel.Name = "uncertaintyLabel";
this.uncertaintyLabel.Size = new System.Drawing.Size(78, 13);
this.uncertaintyLabel.TabIndex = 1;
this.uncertaintyLabel.Text = "Uncertainty [%]";
//
// durationLabel
//
this.durationLabel.AutoSize = true;
this.durationLabel.Location = new System.Drawing.Point(35, 152);
this.durationLabel.Name = "durationLabel";
this.durationLabel.Size = new System.Drawing.Size(83, 13);
this.durationLabel.TabIndex = 5;
this.durationLabel.Text = "Test duration [s]";
//
// volumeLabel
//
this.volumeLabel.AutoSize = true;
this.volumeLabel.Location = new System.Drawing.Point(35, 127);
this.volumeLabel.Name = "volumeLabel";
this.volumeLabel.Size = new System.Drawing.Size(53, 13);
this.volumeLabel.TabIndex = 3;
this.volumeLabel.Text = "Volume [l]";
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(186, 17);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 42);
this.cancelButton.TabIndex = 2;
this.cancelButton.Text = "&Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// nextButton
//
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.nextButton.Location = new System.Drawing.Point(105, 17);
this.nextButton.Name = "nextButton";
this.nextButton.Size = new System.Drawing.Size(75, 42);
this.nextButton.TabIndex = 1;
this.nextButton.Text = "&Next >";
this.nextButton.UseVisualStyleBackColor = true;
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
//
// backButton
//
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.backButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
this.backButton.Location = new System.Drawing.Point(24, 17);
this.backButton.Name = "backButton";
this.backButton.Size = new System.Drawing.Size(75, 42);
this.backButton.TabIndex = 0;
this.backButton.Text = "< &Back";
this.backButton.UseVisualStyleBackColor = true;
this.backButton.Click += new System.EventHandler(this.backButton_Click);
//
// VolumeAndErrorSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.horizSplitContainer);
this.Name = "VolumeAndErrorSelection";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "VolumeAndErrorSelection";
this.Load += new System.EventHandler(this.VolumeAndErrorSelection_Load);
this.horizSplitContainer.Panel1.ResumeLayout(false);
this.horizSplitContainer.Panel1.PerformLayout();
this.horizSplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
this.horizSplitContainer.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.ResumeLayout(false);
this.horizSplitContainer = new System.Windows.Forms.SplitContainer();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.errLoPctLabel = new System.Windows.Forms.Label();
this.errHiPctLabel = new System.Windows.Forms.Label();
this.errHiPctTextBox = new System.Windows.Forms.TextBox();
this.errLoPctTextBox = new System.Windows.Forms.TextBox();
this.uncertaintyTextBox = new System.Windows.Forms.TextBox();
this.durationTextBox = new System.Windows.Forms.TextBox();
this.volumeTextBox = new System.Windows.Forms.TextBox();
this.uncertaintyLabel = new System.Windows.Forms.Label();
this.durationLabel = new System.Windows.Forms.Label();
this.volumeLabel = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.nextButton = new System.Windows.Forms.Button();
this.backButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).BeginInit();
this.horizSplitContainer.Panel1.SuspendLayout();
this.horizSplitContainer.Panel2.SuspendLayout();
this.horizSplitContainer.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// horizSplitContainer
//
this.horizSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.horizSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.horizSplitContainer.Location = new System.Drawing.Point(0, 0);
this.horizSplitContainer.Name = "horizSplitContainer";
this.horizSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// horizSplitContainer.Panel1
//
this.horizSplitContainer.Panel1.Controls.Add(this.tabControl1);
this.horizSplitContainer.Panel1.Controls.Add(this.uncertaintyTextBox);
this.horizSplitContainer.Panel1.Controls.Add(this.durationTextBox);
this.horizSplitContainer.Panel1.Controls.Add(this.volumeTextBox);
this.horizSplitContainer.Panel1.Controls.Add(this.uncertaintyLabel);
this.horizSplitContainer.Panel1.Controls.Add(this.durationLabel);
this.horizSplitContainer.Panel1.Controls.Add(this.volumeLabel);
//
// horizSplitContainer.Panel2
//
this.horizSplitContainer.Panel2.Controls.Add(this.cancelButton);
this.horizSplitContainer.Panel2.Controls.Add(this.nextButton);
this.horizSplitContainer.Panel2.Controls.Add(this.backButton);
this.horizSplitContainer.Size = new System.Drawing.Size(284, 262);
this.horizSplitContainer.SplitterDistance = 182;
this.horizSplitContainer.TabIndex = 1;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(284, 93);
this.tabControl1.TabIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.BackColor = System.Drawing.SystemColors.Control;
this.tabPage1.Controls.Add(this.errLoPctLabel);
this.tabPage1.Controls.Add(this.errHiPctLabel);
this.tabPage1.Controls.Add(this.errHiPctTextBox);
this.tabPage1.Controls.Add(this.errLoPctTextBox);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(276, 67);
this.tabPage1.TabIndex = 0;
//
// errLoPctLabel
//
this.errLoPctLabel.AutoSize = true;
this.errLoPctLabel.Location = new System.Drawing.Point(31, 16);
this.errLoPctLabel.Name = "errLoPctLabel";
this.errLoPctLabel.Size = new System.Drawing.Size(85, 13);
this.errLoPctLabel.TabIndex = 0;
this.errLoPctLabel.Text = "Error low limit [%]";
//
// errHiPctLabel
//
this.errHiPctLabel.AutoSize = true;
this.errHiPctLabel.Location = new System.Drawing.Point(31, 41);
this.errHiPctLabel.Name = "errHiPctLabel";
this.errHiPctLabel.Size = new System.Drawing.Size(89, 13);
this.errHiPctLabel.TabIndex = 2;
this.errHiPctLabel.Text = "Error high limit [%]";
//
// errHiPctTextBox
//
this.errHiPctTextBox.Location = new System.Drawing.Point(146, 38);
this.errHiPctTextBox.Name = "errHiPctTextBox";
this.errHiPctTextBox.Size = new System.Drawing.Size(86, 20);
this.errHiPctTextBox.TabIndex = 3;
this.errHiPctTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// errLoPctTextBox
//
this.errLoPctTextBox.Location = new System.Drawing.Point(146, 13);
this.errLoPctTextBox.Name = "errLoPctTextBox";
this.errLoPctTextBox.Size = new System.Drawing.Size(86, 20);
this.errLoPctTextBox.TabIndex = 1;
this.errLoPctTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// uncertaintyTextBox
//
this.uncertaintyTextBox.Location = new System.Drawing.Point(150, 100);
this.uncertaintyTextBox.Name = "uncertaintyTextBox";
this.uncertaintyTextBox.Size = new System.Drawing.Size(86, 20);
this.uncertaintyTextBox.TabIndex = 2;
this.uncertaintyTextBox.TextChanged += new System.EventHandler(this.anyTextBox_TextChanged);
//
// durationTextBox
//
this.durationTextBox.Location = new System.Drawing.Point(150, 149);
this.durationTextBox.Name = "durationTextBox";
this.durationTextBox.Size = new System.Drawing.Size(86, 20);
this.durationTextBox.TabIndex = 6;
this.durationTextBox.TextChanged += new System.EventHandler(this.durationTextBox_TextChanged);
//
// volumeTextBox
//
this.volumeTextBox.Location = new System.Drawing.Point(150, 124);
this.volumeTextBox.Name = "volumeTextBox";
this.volumeTextBox.Size = new System.Drawing.Size(86, 20);
this.volumeTextBox.TabIndex = 4;
this.volumeTextBox.TextChanged += new System.EventHandler(this.volumeTextBox_TextChanged);
//
// uncertaintyLabel
//
this.uncertaintyLabel.AutoSize = true;
this.uncertaintyLabel.Location = new System.Drawing.Point(35, 103);
this.uncertaintyLabel.Name = "uncertaintyLabel";
this.uncertaintyLabel.Size = new System.Drawing.Size(78, 13);
this.uncertaintyLabel.TabIndex = 1;
this.uncertaintyLabel.Text = "Uncertainty [%]";
//
// durationLabel
//
this.durationLabel.AutoSize = true;
this.durationLabel.Location = new System.Drawing.Point(35, 152);
this.durationLabel.Name = "durationLabel";
this.durationLabel.Size = new System.Drawing.Size(83, 13);
this.durationLabel.TabIndex = 5;
this.durationLabel.Text = "Test duration [s]";
//
// volumeLabel
//
this.volumeLabel.AutoSize = true;
this.volumeLabel.Location = new System.Drawing.Point(35, 127);
this.volumeLabel.Name = "volumeLabel";
this.volumeLabel.Size = new System.Drawing.Size(53, 13);
this.volumeLabel.TabIndex = 3;
this.volumeLabel.Text = "Volume [l]";
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(186, 17);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 42);
this.cancelButton.TabIndex = 2;
this.cancelButton.Text = "&Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// nextButton
//
this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.nextButton.Location = new System.Drawing.Point(105, 17);
this.nextButton.Name = "nextButton";
this.nextButton.Size = new System.Drawing.Size(75, 42);
this.nextButton.TabIndex = 1;
this.nextButton.Text = "&Next >";
this.nextButton.UseVisualStyleBackColor = true;
this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
//
// backButton
//
this.backButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.backButton.DialogResult = System.Windows.Forms.DialogResult.Retry;
this.backButton.Location = new System.Drawing.Point(24, 17);
this.backButton.Name = "backButton";
this.backButton.Size = new System.Drawing.Size(75, 42);
this.backButton.TabIndex = 0;
this.backButton.Text = "< &Back";
this.backButton.UseVisualStyleBackColor = true;
this.backButton.Click += new System.EventHandler(this.backButton_Click);
//
// VolumeAndErrorSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.horizSplitContainer);
this.Name = "VolumeAndErrorSelection";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "VolumeAndErrorSelection";
this.Load += new System.EventHandler(this.VolumeAndErrorSelection_Load);
this.horizSplitContainer.Panel1.ResumeLayout(false);
this.horizSplitContainer.Panel1.PerformLayout();
this.horizSplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.horizSplitContainer)).EndInit();
this.horizSplitContainer.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.ResumeLayout(false);
}
@@ -325,11 +264,6 @@ namespace TBF.TestWizard
private System.Windows.Forms.TextBox uncertaintyTextBox;
private System.Windows.Forms.Label uncertaintyLabel;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Label classLabel;
private System.Windows.Forms.Label qpLabel;
private System.Windows.Forms.TextBox qpTextBox;
private System.Windows.Forms.ComboBox classComboBox;
private System.Windows.Forms.TabPage tabPage1;
}
}
+10 -9
View File
@@ -35,9 +35,9 @@ namespace TBF.TestWizard
nextButton.Text = Strings.FinishBtnText;
cancelButton.Text = Strings.CancelBtnText;
tabPage1.Text = Strings.Water_Meter;
tabPage2.Text = Strings.Heat_meter;
classLabel.Text = Strings.Metrological_class;
qpLabel.Text = "Qp [m3/h]";
//tabPage2.Text = Strings.Heat_meter;
//classLabel.Text = Strings.Metrological_class;
//qpLabel.Text = "Qp [m3/h]";
}
public VolumeAndErrorSelection(bool first, bool last, Test test)
@@ -58,7 +58,7 @@ namespace TBF.TestWizard
errLoPctTextBox.Text = test.ErrLimLo.ToString();
errHiPctTextBox.Text = test.ErrLimHi.ToString();
uncertaintyTextBox.Text = test.Uncertainty.ToString();
classComboBox.Text = "2";
//classComboBox.Text = "2";
nextButton.Enabled = IsFormValid();
}
@@ -77,9 +77,10 @@ namespace TBF.TestWizard
&& Utils.TryParseSFloat(errHiPctTextBox.Text, out dummy);
break;
case TabId.HeatMeterTab:
tabsValid = int.TryParse(classComboBox.Text, out idummy)
&& idummy >= 1 && idummy <= 3
&& Utils.TryParseUFloat(qpTextBox.Text, out dummy);
//tabsValid = int.TryParse(classComboBox.Text, out idummy)
// && idummy >= 1 && idummy <= 3
// && Utils.TryParseUFloat(qpTextBox.Text, out dummy);
tabsValid = true;
break;
}
@@ -103,8 +104,8 @@ namespace TBF.TestWizard
test.ErrLimHi = Utils.ParseSFloat(errHiPctTextBox.Text);
break;
case TabId.HeatMeterTab:
test.ErrLimLo = (float)int.Parse(classComboBox.Text);
test.ErrLimHi = -Utils.ParseUFloat(qpTextBox.Text);
//test.ErrLimLo = (float)int.Parse(classComboBox.Text);
//test.ErrLimHi = -Utils.ParseUFloat(qpTextBox.Text);
break;
}
}