Compare commits

...
21 changed files with 234 additions and 92 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;BERLIN;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;BERLIN;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+10
View File
@@ -286,6 +286,16 @@ namespace Results
batches = session.QueryOver<Batch>()
.Where(x => (x.BatchNr == batchNr))
.List();
foreach (var batch in batches)
{
batch.TestRslts = session.QueryOver<TestRslt>()
.Where(x => (x.Batch.Id == batch.Id))
.List();
batch.WaterMeters = session.QueryOver<WaterMeter>()
.Where(x => (x.Batch.Id == batch.Id))
.List();
}
}
catch (Exception exc)
{
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.12.486.0")]
[assembly: AssemblyFileVersion("2.12.486.0")]
[assembly: AssemblyVersion("2.12.544.0")]
[assembly: AssemblyFileVersion("2.12.544.0")]
+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;BERLIN;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;BERLIN;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+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;BERLIN;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;BERLIN;LANG_DE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -3,6 +3,7 @@
///
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading;
using log4net;
@@ -153,6 +154,12 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
completed2 = true;
});
if (writerCfg.Culture > Culture.system && writerCfg.Culture < Culture.Count)
{
thread1.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
thread2.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
}
return this;
}
@@ -19,7 +19,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
public MonthFolders MonthFolders;
public DayFolders DayFolders;
public string FileNameFormat;
public Separator Separator;
public Culture Culture;
public Separator Separator;
public bool SaveGoodOnly;
public string[] SelectedItems;
@@ -38,15 +38,11 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
private void WriterCfgCtrl_Load(object sender, EventArgs e)
{
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
for (YearFolders s = 0; s < YearFolders.Count; s++) yearFoldersComboBox.Items.Add(s.ToString());
for (MonthFolders s = 0; s < MonthFolders.Count; s++) monthFoldersComboBox.Items.Add(s.ToString());
for (DayFolders s = 0; s < DayFolders.Count; s++) dayFoldersComboBox.Items.Add(s.ToString());
for (int i = 0; i < (int)Separator.Count; i++)
{
separatorComboBox.Items.Add(((Separator)i).ToString());
}
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
selectedItems = config.SelectedItems;
@@ -68,7 +64,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
monthFoldersComboBox.Text = config.MonthFolders.ToString();
dayFoldersComboBox.Text = config.DayFolders.ToString();
fileNameFmtTextBox.Text = config.FileNameFormat;
separatorComboBox.Text = config.Separator.ToString();
cultureComboBox.Text = config.Culture.ToString();
separatorComboBox.Text = config.Separator.ToString();
goodOnlyCheckBox.Checked = config.SaveGoodOnly;
}
@@ -83,7 +80,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
monthFoldersComboBox.Enabled = true;
dayFoldersComboBox.Enabled = true;
fileNameFmtTextBox.Enabled = true;
separatorComboBox.Enabled = true;
cultureComboBox.Enabled = true;
separatorComboBox.Enabled = true;
goodOnlyCheckBox.Enabled = true;
selectItemsButton.Enabled = true;
}
@@ -110,6 +108,12 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
message += Environment.NewLine + "Invalid day folder selection";
}
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid culture";
}
if (!separatorComboBox.Items.Contains(separatorComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
@@ -176,6 +180,16 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
flags = CfgUpdateFlags.RestartRqrd;
}
for (Culture i = 0; i < Culture.Count; i++)
{
if (i.ToString().Equals(cultureComboBox.Text) && (config.Culture != i))
{
config.Culture = i;
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
break;
}
}
for (Separator i = 0; i < Separator.Count; i++)
{
if (i.ToString().Equals(separatorComboBox.Text) && (config.Separator != i))
@@ -52,6 +52,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
this.fileNameFmtTextBox = new System.Windows.Forms.TextBox();
this.fileNameFmtLabel = new System.Windows.Forms.Label();
this.goodOnlyCheckBox = new System.Windows.Forms.CheckBox();
this.cultureComboBox = new System.Windows.Forms.ComboBox();
this.cultureLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
@@ -111,25 +113,25 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
// separatorLabel
//
this.separatorLabel.AutoSize = true;
this.separatorLabel.Location = new System.Drawing.Point(17, 184);
this.separatorLabel.Location = new System.Drawing.Point(17, 206);
this.separatorLabel.Name = "separatorLabel";
this.separatorLabel.Size = new System.Drawing.Size(53, 13);
this.separatorLabel.TabIndex = 15;
this.separatorLabel.TabIndex = 17;
this.separatorLabel.Text = "Separator";
//
// separatorComboBox
//
this.separatorComboBox.Enabled = false;
this.separatorComboBox.FormattingEnabled = true;
this.separatorComboBox.Location = new System.Drawing.Point(108, 181);
this.separatorComboBox.Location = new System.Drawing.Point(108, 203);
this.separatorComboBox.Name = "separatorComboBox";
this.separatorComboBox.Size = new System.Drawing.Size(146, 21);
this.separatorComboBox.TabIndex = 16;
this.separatorComboBox.TabIndex = 18;
//
// selectItemsButton
//
this.selectItemsButton.Enabled = false;
this.selectItemsButton.Location = new System.Drawing.Point(108, 203);
this.selectItemsButton.Location = new System.Drawing.Point(108, 225);
this.selectItemsButton.Name = "selectItemsButton";
this.selectItemsButton.Size = new System.Drawing.Size(145, 23);
this.selectItemsButton.TabIndex = 20;
@@ -238,17 +240,37 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
// goodOnlyCheckBox
//
this.goodOnlyCheckBox.AutoSize = true;
this.goodOnlyCheckBox.Location = new System.Drawing.Point(20, 207);
this.goodOnlyCheckBox.Location = new System.Drawing.Point(20, 229);
this.goodOnlyCheckBox.Name = "goodOnlyCheckBox";
this.goodOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.goodOnlyCheckBox.TabIndex = 17;
this.goodOnlyCheckBox.TabIndex = 19;
this.goodOnlyCheckBox.Text = "Good only";
this.goodOnlyCheckBox.UseVisualStyleBackColor = true;
//
// cultureComboBox
//
this.cultureComboBox.Enabled = false;
this.cultureComboBox.FormattingEnabled = true;
this.cultureComboBox.Location = new System.Drawing.Point(108, 181);
this.cultureComboBox.Name = "cultureComboBox";
this.cultureComboBox.Size = new System.Drawing.Size(146, 21);
this.cultureComboBox.TabIndex = 16;
//
// cultureLabel
//
this.cultureLabel.AutoSize = true;
this.cultureLabel.Location = new System.Drawing.Point(17, 184);
this.cultureLabel.Name = "cultureLabel";
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
this.cultureLabel.TabIndex = 15;
this.cultureLabel.Text = "Cullture";
//
// WriterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.cultureComboBox);
this.Controls.Add(this.cultureLabel);
this.Controls.Add(this.goodOnlyCheckBox);
this.Controls.Add(this.fileNameFmtTextBox);
this.Controls.Add(this.fileNameFmtLabel);
@@ -271,7 +293,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
this.Controls.Add(this.nameLabel);
this.Controls.Add(this.classNameLabel);
this.Name = "WriterCfgCtrl";
this.Size = new System.Drawing.Size(300, 230);
this.Size = new System.Drawing.Size(300, 282);
this.Load += new System.EventHandler(this.WriterCfgCtrl_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -301,5 +323,7 @@ namespace TBF.BenchControl.Output.FileWriters.Basic
private System.Windows.Forms.TextBox fileNameFmtTextBox;
private System.Windows.Forms.Label fileNameFmtLabel;
private System.Windows.Forms.CheckBox goodOnlyCheckBox;
private System.Windows.Forms.ComboBox cultureComboBox;
private System.Windows.Forms.Label cultureLabel;
}
}
@@ -3,6 +3,7 @@
///
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading;
using log4net;
@@ -93,8 +94,9 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
writerCfg.MonthFolders = newCfg.MonthFolders;
writerCfg.DayFolders = newCfg.DayFolders;
writerCfg.FileNameFormat = newCfg.FileNameFormat;
writerCfg.Separator = newCfg.Separator;
writerCfg.EliminateSpaces = newCfg.EliminateSpaces;
writerCfg.Culture = newCfg.Culture;
writerCfg.Separator = newCfg.Separator;
writerCfg.EliminateSpaces = newCfg.EliminateSpaces;
writerCfg.CommonItems = newCfg.CommonItems;
writerCfg.SelectedItems = newCfg.SelectedItems;
writerCfg.Header = newCfg.Header;
@@ -221,6 +223,12 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
completed2 = true;
});
if (writerCfg.Culture > Culture.system && writerCfg.Culture < Culture.Count)
{
thread1.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
thread2.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
}
return this;
}
@@ -19,6 +19,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
public MonthFolders MonthFolders;
public DayFolders DayFolders;
public string FileNameFormat;
public Culture Culture;
public Separator Separator;
public bool EliminateSpaces;
public string[] CommonItems;
@@ -42,15 +42,11 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
private void WriterCfgCtrl_Load(object sender, EventArgs e)
{
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
for (YearFolders s = 0; s < YearFolders.Count; s++) yearFoldersComboBox.Items.Add(s.ToString());
for (MonthFolders s = 0; s < MonthFolders.Count; s++) monthFoldersComboBox.Items.Add(s.ToString());
for (DayFolders s = 0; s < DayFolders.Count; s++) dayFoldersComboBox.Items.Add(s.ToString());
for (int i = 0; i < (int)Separator.Count; i++)
{
separatorComboBox.Items.Add(((Separator)i).ToString());
}
for (Culture s = 0; s < Culture.Count; s++) cultureComboBox.Items.Add(s.ToString());
for (Separator s = 0; s < Separator.Count; s++) separatorComboBox.Items.Add(s.ToString());
header = config.Header;
commonItems = config.CommonItems;
@@ -69,6 +65,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
monthFoldersLabel.Text = "Month folders";
dayFoldersLabel.Text = "Day folders";
fileNameFmtLabel.Text = "File name format";
cultureLabel.Text = "Culture";
separatorLabel.Text = "Separator";
eliminateSpacesCheckBox.Text = "No spaces";
headerButton.Text = Strings.Header;
@@ -93,7 +90,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
monthFoldersComboBox.Text = config.MonthFolders.ToString();
dayFoldersComboBox.Text = config.DayFolders.ToString();
fileNameFmtTextBox.Text = config.FileNameFormat;
separatorComboBox.Text = config.Separator.ToString();
cultureComboBox.Text = config.Culture.ToString();
separatorComboBox.Text = config.Separator.ToString();
eliminateSpacesCheckBox.Checked = config.EliminateSpaces;
}
@@ -108,7 +106,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
monthFoldersComboBox.Enabled = true;
dayFoldersComboBox.Enabled = true;
fileNameFmtTextBox.Enabled = true;
separatorComboBox.Enabled = true;
cultureComboBox.Enabled = true;
separatorComboBox.Enabled = true;
eliminateSpacesCheckBox.Enabled = true;
headerButton.Enabled = true;
commonItemsButton.Enabled = true;
@@ -138,6 +137,12 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
message += Environment.NewLine + "Invalid day folder selection";
}
if (!cultureComboBox.Items.Contains(cultureComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "Invalid culture";
}
if (!separatorComboBox.Items.Contains(separatorComboBox.Text))
{
flags |= CfgUpdateFlags.Error;
@@ -208,6 +213,15 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
}
for (Culture i = 0; i < Culture.Count; i++)
{
if (i.ToString().Equals(cultureComboBox.Text) && (config.Culture != i))
{
config.Culture = i;
flags |= (CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
break;
}
}
for (Separator i = 0; i < Separator.Count; i++)
{
@@ -56,12 +56,14 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
this.footerButton = new System.Windows.Forms.Button();
this.commonItemsButton = new System.Windows.Forms.Button();
this.upgradeWizardButton = new System.Windows.Forms.Button();
this.cultureComboBox = new System.Windows.Forms.ComboBox();
this.cultureLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(108, 31);
this.nameTextBox.Location = new System.Drawing.Point(108, 28);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(146, 20);
this.nameTextBox.TabIndex = 2;
@@ -69,7 +71,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// nameLabel
//
this.nameLabel.AutoSize = true;
this.nameLabel.Location = new System.Drawing.Point(17, 34);
this.nameLabel.Location = new System.Drawing.Point(17, 31);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 1;
@@ -78,7 +80,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(105, 9);
this.classNameLabel.Location = new System.Drawing.Point(105, 6);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 0;
@@ -87,7 +89,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// destinationTextBox
//
this.destinationTextBox.Enabled = false;
this.destinationTextBox.Location = new System.Drawing.Point(108, 52);
this.destinationTextBox.Location = new System.Drawing.Point(108, 49);
this.destinationTextBox.Name = "destinationTextBox";
this.destinationTextBox.Size = new System.Drawing.Size(146, 20);
this.destinationTextBox.TabIndex = 4;
@@ -95,7 +97,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// destinationLabel
//
this.destinationLabel.AutoSize = true;
this.destinationLabel.Location = new System.Drawing.Point(17, 55);
this.destinationLabel.Location = new System.Drawing.Point(17, 52);
this.destinationLabel.Name = "destinationLabel";
this.destinationLabel.Size = new System.Drawing.Size(60, 13);
this.destinationLabel.TabIndex = 3;
@@ -104,7 +106,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// destinationButton
//
this.destinationButton.Enabled = false;
this.destinationButton.Location = new System.Drawing.Point(269, 52);
this.destinationButton.Location = new System.Drawing.Point(269, 49);
this.destinationButton.Name = "destinationButton";
this.destinationButton.Size = new System.Drawing.Size(30, 20);
this.destinationButton.TabIndex = 5;
@@ -115,28 +117,28 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// separatorLabel
//
this.separatorLabel.AutoSize = true;
this.separatorLabel.Location = new System.Drawing.Point(17, 184);
this.separatorLabel.Location = new System.Drawing.Point(17, 203);
this.separatorLabel.Name = "separatorLabel";
this.separatorLabel.Size = new System.Drawing.Size(53, 13);
this.separatorLabel.TabIndex = 17;
this.separatorLabel.TabIndex = 19;
this.separatorLabel.Text = "Separator";
//
// separatorComboBox
//
this.separatorComboBox.Enabled = false;
this.separatorComboBox.FormattingEnabled = true;
this.separatorComboBox.Location = new System.Drawing.Point(108, 181);
this.separatorComboBox.Location = new System.Drawing.Point(108, 200);
this.separatorComboBox.Name = "separatorComboBox";
this.separatorComboBox.Size = new System.Drawing.Size(146, 21);
this.separatorComboBox.TabIndex = 18;
this.separatorComboBox.TabIndex = 20;
//
// testItemsButton
//
this.testItemsButton.Enabled = false;
this.testItemsButton.Location = new System.Drawing.Point(108, 278);
this.testItemsButton.Location = new System.Drawing.Point(108, 297);
this.testItemsButton.Name = "testItemsButton";
this.testItemsButton.Size = new System.Drawing.Size(146, 23);
this.testItemsButton.TabIndex = 22;
this.testItemsButton.TabIndex = 24;
this.testItemsButton.Text = "Test items";
this.testItemsButton.UseVisualStyleBackColor = true;
this.testItemsButton.Click += new System.EventHandler(this.testItemsButton_Click);
@@ -144,7 +146,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// yearFoldersLabel
//
this.yearFoldersLabel.AutoSize = true;
this.yearFoldersLabel.Location = new System.Drawing.Point(17, 97);
this.yearFoldersLabel.Location = new System.Drawing.Point(17, 94);
this.yearFoldersLabel.Name = "yearFoldersLabel";
this.yearFoldersLabel.Size = new System.Drawing.Size(63, 13);
this.yearFoldersLabel.TabIndex = 9;
@@ -153,7 +155,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// monthFoldersLabel
//
this.monthFoldersLabel.AutoSize = true;
this.monthFoldersLabel.Location = new System.Drawing.Point(17, 119);
this.monthFoldersLabel.Location = new System.Drawing.Point(17, 116);
this.monthFoldersLabel.Name = "monthFoldersLabel";
this.monthFoldersLabel.Size = new System.Drawing.Size(71, 13);
this.monthFoldersLabel.TabIndex = 11;
@@ -162,7 +164,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// dayFoldersLabel
//
this.dayFoldersLabel.AutoSize = true;
this.dayFoldersLabel.Location = new System.Drawing.Point(17, 141);
this.dayFoldersLabel.Location = new System.Drawing.Point(17, 138);
this.dayFoldersLabel.Name = "dayFoldersLabel";
this.dayFoldersLabel.Size = new System.Drawing.Size(60, 13);
this.dayFoldersLabel.TabIndex = 13;
@@ -172,7 +174,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
//
this.yearFoldersComboBox.Enabled = false;
this.yearFoldersComboBox.FormattingEnabled = true;
this.yearFoldersComboBox.Location = new System.Drawing.Point(108, 94);
this.yearFoldersComboBox.Location = new System.Drawing.Point(108, 91);
this.yearFoldersComboBox.Name = "yearFoldersComboBox";
this.yearFoldersComboBox.Size = new System.Drawing.Size(146, 21);
this.yearFoldersComboBox.TabIndex = 10;
@@ -181,7 +183,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
//
this.monthFoldersComboBox.Enabled = false;
this.monthFoldersComboBox.FormattingEnabled = true;
this.monthFoldersComboBox.Location = new System.Drawing.Point(108, 116);
this.monthFoldersComboBox.Location = new System.Drawing.Point(108, 113);
this.monthFoldersComboBox.Name = "monthFoldersComboBox";
this.monthFoldersComboBox.Size = new System.Drawing.Size(146, 21);
this.monthFoldersComboBox.TabIndex = 12;
@@ -190,7 +192,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
//
this.dayFoldersComboBox.Enabled = false;
this.dayFoldersComboBox.FormattingEnabled = true;
this.dayFoldersComboBox.Location = new System.Drawing.Point(108, 138);
this.dayFoldersComboBox.Location = new System.Drawing.Point(108, 135);
this.dayFoldersComboBox.Name = "dayFoldersComboBox";
this.dayFoldersComboBox.Size = new System.Drawing.Size(146, 21);
this.dayFoldersComboBox.TabIndex = 14;
@@ -198,7 +200,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// destination2Button
//
this.destination2Button.Enabled = false;
this.destination2Button.Location = new System.Drawing.Point(269, 73);
this.destination2Button.Location = new System.Drawing.Point(269, 70);
this.destination2Button.Name = "destination2Button";
this.destination2Button.Size = new System.Drawing.Size(30, 20);
this.destination2Button.TabIndex = 8;
@@ -208,7 +210,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// destination2TextBox
//
this.destination2TextBox.Enabled = false;
this.destination2TextBox.Location = new System.Drawing.Point(108, 73);
this.destination2TextBox.Location = new System.Drawing.Point(108, 70);
this.destination2TextBox.Name = "destination2TextBox";
this.destination2TextBox.Size = new System.Drawing.Size(146, 20);
this.destination2TextBox.TabIndex = 7;
@@ -216,7 +218,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// destination2Label
//
this.destination2Label.AutoSize = true;
this.destination2Label.Location = new System.Drawing.Point(17, 76);
this.destination2Label.Location = new System.Drawing.Point(17, 73);
this.destination2Label.Name = "destination2Label";
this.destination2Label.Size = new System.Drawing.Size(69, 13);
this.destination2Label.TabIndex = 6;
@@ -225,7 +227,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// fileNameFmtTextBox
//
this.fileNameFmtTextBox.Enabled = false;
this.fileNameFmtTextBox.Location = new System.Drawing.Point(108, 160);
this.fileNameFmtTextBox.Location = new System.Drawing.Point(108, 157);
this.fileNameFmtTextBox.Name = "fileNameFmtTextBox";
this.fileNameFmtTextBox.Size = new System.Drawing.Size(146, 20);
this.fileNameFmtTextBox.TabIndex = 16;
@@ -233,7 +235,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// fileNameFmtLabel
//
this.fileNameFmtLabel.AutoSize = true;
this.fileNameFmtLabel.Location = new System.Drawing.Point(17, 163);
this.fileNameFmtLabel.Location = new System.Drawing.Point(17, 160);
this.fileNameFmtLabel.Name = "fileNameFmtLabel";
this.fileNameFmtLabel.Size = new System.Drawing.Size(84, 13);
this.fileNameFmtLabel.TabIndex = 15;
@@ -242,20 +244,20 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// eliminateSpacesCheckBox
//
this.eliminateSpacesCheckBox.AutoSize = true;
this.eliminateSpacesCheckBox.Location = new System.Drawing.Point(108, 208);
this.eliminateSpacesCheckBox.Location = new System.Drawing.Point(108, 227);
this.eliminateSpacesCheckBox.Name = "eliminateSpacesCheckBox";
this.eliminateSpacesCheckBox.Size = new System.Drawing.Size(77, 17);
this.eliminateSpacesCheckBox.TabIndex = 19;
this.eliminateSpacesCheckBox.TabIndex = 21;
this.eliminateSpacesCheckBox.Text = "No spaces";
this.eliminateSpacesCheckBox.UseVisualStyleBackColor = true;
//
// headerButton
//
this.headerButton.Enabled = false;
this.headerButton.Location = new System.Drawing.Point(108, 228);
this.headerButton.Location = new System.Drawing.Point(108, 247);
this.headerButton.Name = "headerButton";
this.headerButton.Size = new System.Drawing.Size(146, 23);
this.headerButton.TabIndex = 20;
this.headerButton.TabIndex = 22;
this.headerButton.Text = "Header";
this.headerButton.UseVisualStyleBackColor = true;
this.headerButton.Click += new System.EventHandler(this.headerButton_Click);
@@ -263,10 +265,10 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// footerButton
//
this.footerButton.Enabled = false;
this.footerButton.Location = new System.Drawing.Point(108, 303);
this.footerButton.Location = new System.Drawing.Point(108, 322);
this.footerButton.Name = "footerButton";
this.footerButton.Size = new System.Drawing.Size(146, 23);
this.footerButton.TabIndex = 23;
this.footerButton.TabIndex = 25;
this.footerButton.Text = "Footer";
this.footerButton.UseVisualStyleBackColor = true;
this.footerButton.Click += new System.EventHandler(this.footerButton_Click);
@@ -274,28 +276,48 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
// commonItemsButton
//
this.commonItemsButton.Enabled = false;
this.commonItemsButton.Location = new System.Drawing.Point(108, 253);
this.commonItemsButton.Location = new System.Drawing.Point(108, 272);
this.commonItemsButton.Name = "commonItemsButton";
this.commonItemsButton.Size = new System.Drawing.Size(146, 23);
this.commonItemsButton.TabIndex = 21;
this.commonItemsButton.TabIndex = 23;
this.commonItemsButton.Text = "Common items";
this.commonItemsButton.UseVisualStyleBackColor = true;
this.commonItemsButton.Click += new System.EventHandler(this.commonItemsButton_Click);
//
// upgradeWizardButton
//
this.upgradeWizardButton.Location = new System.Drawing.Point(269, 253);
this.upgradeWizardButton.Location = new System.Drawing.Point(269, 272);
this.upgradeWizardButton.Name = "upgradeWizardButton";
this.upgradeWizardButton.Size = new System.Drawing.Size(80, 48);
this.upgradeWizardButton.TabIndex = 24;
this.upgradeWizardButton.TabIndex = 26;
this.upgradeWizardButton.Text = "Upgrade wizard";
this.upgradeWizardButton.UseVisualStyleBackColor = true;
this.upgradeWizardButton.Click += new System.EventHandler(this.upgradeWizardButton_Click);
//
// cultureComboBox
//
this.cultureComboBox.Enabled = false;
this.cultureComboBox.FormattingEnabled = true;
this.cultureComboBox.Location = new System.Drawing.Point(108, 178);
this.cultureComboBox.Name = "cultureComboBox";
this.cultureComboBox.Size = new System.Drawing.Size(146, 21);
this.cultureComboBox.TabIndex = 18;
//
// cultureLabel
//
this.cultureLabel.AutoSize = true;
this.cultureLabel.Location = new System.Drawing.Point(17, 181);
this.cultureLabel.Name = "cultureLabel";
this.cultureLabel.Size = new System.Drawing.Size(42, 13);
this.cultureLabel.TabIndex = 17;
this.cultureLabel.Text = "Cullture";
//
// WriterCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.cultureComboBox);
this.Controls.Add(this.cultureLabel);
this.Controls.Add(this.upgradeWizardButton);
this.Controls.Add(this.commonItemsButton);
this.Controls.Add(this.footerButton);
@@ -356,5 +378,7 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced
private System.Windows.Forms.Button footerButton;
private System.Windows.Forms.Button commonItemsButton;
private System.Windows.Forms.Button upgradeWizardButton;
private System.Windows.Forms.ComboBox cultureComboBox;
private System.Windows.Forms.Label cultureLabel;
}
}
@@ -40,6 +40,7 @@ namespace TBF.BenchControl.Output.FileWriters
public enum Culture
{
system,
EN,
DE,
SK,
@@ -3,6 +3,7 @@
///
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading;
using log4net;
@@ -198,7 +199,13 @@ namespace TBF.BenchControl.Output.FileWriters.Xml
WriteRslts(batch, writerCfg.DestinationPath2);
completed2 = true;
});
if (writerCfg.Culture > Culture.system && writerCfg.Culture < Culture.Count)
{
thread1.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
thread2.CurrentCulture = new CultureInfo(writerCfg.Culture.ToString());
}
return this;
}
@@ -234,14 +234,14 @@ namespace TBF.BenchControl.Sequences
/// Procedure selected at this point, a new batch was started
///
StateMachine.LoadProcedureParams(StateMachine.Procedure);
Bridge.Bench2UI(ButtonsEtc.StopBtnEn); /// Enable STOP button
int newBatchNr = Program.LocalSettings.BatchNr;
log.FatalFormat("New measurement session started: batch = {0}, procedure = {1}", newBatchNr, StateMachine.Procedure.Name);
if (selection == Selection.RestoreBatch)
{
BatchRslts = RestoreBatchResults(TBF.UiBridge.Bridge.BatchNr, /// Original batch number
Program.LocalSettings.BatchNr, /// New batch number
StateMachine.Procedure);
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
RestoreBatchResults(TBF.UiBridge.Bridge.BatchNr, ref BatchRslts); /// pass the original batch number of the batch to be restored
}
else if (selection == Selection.Custom)
{
@@ -254,7 +254,7 @@ namespace TBF.BenchControl.Sequences
}
}
BatchRslts = CreateNewBatchResults(Program.LocalSettings.BatchNr, StateMachine.Procedure);
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
for (int i = StateMachine.Procedure.Tests.Count - 1; i >= 0; i--)
{
@@ -266,7 +266,7 @@ namespace TBF.BenchControl.Sequences
}
else
{
BatchRslts = CreateNewBatchResults(Program.LocalSettings.BatchNr, StateMachine.Procedure);
BatchRslts = CreateNewBatchResults(newBatchNr, StateMachine.Procedure);
}
@@ -897,11 +897,13 @@ namespace TBF.BenchControl.Sequences
summaryResults.Info(TestResult2CsvLine(tr));
}
Program.LocalSettings.BatchNr++;
Program.LocalSettings.Save();
log.FatalFormat("BatchNr = {0} (incremented)", Program.LocalSettings.BatchNr);
log.FatalFormat("Measurement session saved: batch = {0}, procedure = {1}, next batch nr. = {2}",
ProcessData.BatchRslts.Batch.BatchNr,
ProcessData.BatchRslts.Batch.ProcedureName,
Program.LocalSettings.BatchNr);
if (simultWithEvacuationCount > 0)
{
@@ -1356,13 +1358,42 @@ namespace TBF.BenchControl.Sequences
/// <param name="newBatchNr">New unique batch number</param>
/// <param name="procedure">Reloaded procedure</param>
/// <returns></returns>
Results.BatchResults RestoreBatchResults(int oriBatchNr, int newBatchNr, Procedure procedure)
void RestoreBatchResults(int oriBatchNr, ref Results.BatchResults batchResults)
{
return Results.BatchResults.FromBatch(Results.DB.LoadBatch(oriBatchNr));
Batch oriBatch = Results.DB.LoadBatch(oriBatchNr);
batchResults.Batch.StartTime = oriBatch.StartTime;
foreach (var testRslt in batchResults.Batch.TestRslts)
{
foreach (var oriTstRslt in oriBatch.TestRslts)
{
if (testRslt.Name() == oriTstRslt.Name() &&
testRslt.Part == oriTstRslt.Part &&
testRslt.RepetitionNr == oriTstRslt.RepetitionNr)
{
testRslt.CopyContentFrom(oriTstRslt);
break;
}
}
}
for (int i = 0; i < batchResults.WaterMeters.Length; i++)
{
WaterMeter wm = batchResults.WaterMeters[i];
foreach (var wm2 in oriBatch.WaterMeters)
{
if (wm.WMPosition == wm2.WMPosition)
{
wm.CopyContentFrom(wm2);
break;
}
}
}
}
void CollectSimultSteps()
void CollectSimultSteps()
{
///
/// Collect steps (e.g. iPerl communication) to be done simultaneously with purging
@@ -53,12 +53,12 @@ namespace TBF.Forms
sentCheckBox.Text = Strings.Printed;
sentCheckBox.Checked = Sent;
sendReloadButton.Enabled = true; /// 'Print again' function always available
sendReloadButton.Text = reloadEn ? Strings.Reload : Strings.Print_again;
sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Print_again;
#elif ORACLE_DB
sentCheckBox.Text = Strings.Sent;
sentCheckBox.Checked = Sent;
sendReloadButton.Enabled = reloadEn || !Sent;
sendReloadButton.Text = reloadEn ? Strings.Reload : Strings.Save_again;
sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Save_again;
#else
sentCheckBox.Visible = false;
sendReloadButton.Enabled = reloadEn;
+1 -1
View File
@@ -54,7 +54,7 @@ namespace TBF
this.horizontalSplitContainer = new System.Windows.Forms.SplitContainer();
this.mainTabControl = new System.Windows.Forms.TabControl();
this.homeTabPage = new System.Windows.Forms.TabPage();
this.ctrlBrdComponent = new ControlComponent3Munich.UserControl1();
this.ctrlBrdComponent = new ControlComponent_Izrael2014.UserControl1();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processTabPageCtrl = new TBF.Screens.ProcessTabPageCtrl6();
this.insertTabPage = new System.Windows.Forms.TabPage();
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.12.542.1")]
[assembly: AssemblyFileVersion("2.12.542.1")]
[assembly: AssemblyVersion("2.12.544.1")]
[assembly: AssemblyFileVersion("2.12.544.1")]
+6 -6
View File
@@ -39,7 +39,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MUNICH</DefineConstants>
<DefineConstants>TRACE;DEBUG;BERLIN;LANG_DE;STABLE_MASS_EXTRAS</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</DefineConstants>
<DefineConstants>TRACE;BERLIN;LANG_DE;STABLE_MASS_EXTRAS</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</DefineConstants>
<DefineConstants>TRACE;DEBUG;BERLIN;LANG_DE;STABLE_MASS_EXTRAS</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</DefineConstants>
<DefineConstants>TRACE;BERLIN;LANG_DE;STABLE_MASS_EXTRAS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
@@ -97,8 +97,8 @@
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlComponent3Munich">
<HintPath>..\packages\ControlBoard\Munich\ControlComponent3Munich.dll</HintPath>
<Reference Include="ControlComponent3U">
<HintPath>..\packages\ControlBoard\Berlin\ControlComponent3U.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
+1 -1
View File
@@ -194,7 +194,7 @@ namespace Users.Forms
MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
catch (Exception exc)
catch (Exception)
{
MessageBox.Show(Strings.Copying_remote_users_failed,
Strings.Confirmation,