ResultsBrowser rewritten for the new Results DB, version 2.1.186.
This commit is contained in:
parent
d8d8f24843
commit
951a62ad06
@ -67,5 +67,9 @@ namespace Results.Entities
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Batch #{0}, Start:{1}, End:{2}, Procedure:{3}", BatchNr, StartTime, EndTime, ProcedureName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
130
ResultsBrowser/BenchesDlg.Designer.cs
generated
130
ResultsBrowser/BenchesDlg.Designer.cs
generated
@ -1,130 +0,0 @@
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
partial class BenchesDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BenchesDlg));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.testBenchesListBox = new System.Windows.Forms.ListBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.editButton = new System.Windows.Forms.Button();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.removeButton = new System.Windows.Forms.Button();
|
||||
this.copyButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// testBenchesListBox
|
||||
//
|
||||
resources.ApplyResources(this.testBenchesListBox, "testBenchesListBox");
|
||||
this.testBenchesListBox.FormattingEnabled = true;
|
||||
this.testBenchesListBox.Name = "testBenchesListBox";
|
||||
this.testBenchesListBox.DoubleClick += new System.EventHandler(this.testBenchesListBox_DoubleClick);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// editButton
|
||||
//
|
||||
resources.ApplyResources(this.editButton, "editButton");
|
||||
this.editButton.Name = "editButton";
|
||||
this.editButton.UseVisualStyleBackColor = true;
|
||||
this.editButton.Click += new System.EventHandler(this.editButton_Click);
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
resources.ApplyResources(this.addButton, "addButton");
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// removeButton
|
||||
//
|
||||
resources.ApplyResources(this.removeButton, "removeButton");
|
||||
this.removeButton.Name = "removeButton";
|
||||
this.removeButton.UseVisualStyleBackColor = true;
|
||||
this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
|
||||
//
|
||||
// copyButton
|
||||
//
|
||||
resources.ApplyResources(this.copyButton, "copyButton");
|
||||
this.copyButton.Name = "copyButton";
|
||||
this.copyButton.UseVisualStyleBackColor = true;
|
||||
this.copyButton.Click += new System.EventHandler(this.copyButton_Click);
|
||||
//
|
||||
// BenchesDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.copyButton);
|
||||
this.Controls.Add(this.removeButton);
|
||||
this.Controls.Add(this.addButton);
|
||||
this.Controls.Add(this.editButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.testBenchesListBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "BenchesDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.ListBox testBenchesListBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button editButton;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.Button removeButton;
|
||||
private System.Windows.Forms.Button copyButton;
|
||||
}
|
||||
}
|
||||
@ -1,205 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialog to edit local settings that specify database parameters (S1.2)
|
||||
/// </summary>
|
||||
public partial class BenchesDlg : Form
|
||||
{
|
||||
// Local copy of 'local settings' initialized to Program.localSettings.
|
||||
// Dialog modifies this copy and updates Program.localSettings just
|
||||
// when 'OK' is pressed.
|
||||
LocalSettings localSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor, initializes the dialog
|
||||
/// </summary>
|
||||
public BenchesDlg()
|
||||
{
|
||||
Program.LocalSettings.Save();
|
||||
localSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (localSettings == null) throw new Exception("Cannot load local settings");
|
||||
|
||||
InitializeComponent();
|
||||
RedrawTestBenchesListBox();
|
||||
}
|
||||
|
||||
void RedrawTestBenchesListBox()
|
||||
{
|
||||
testBenchesListBox.Items.Clear();
|
||||
if (localSettings.TestBenches != null)
|
||||
{
|
||||
int nrBenches = localSettings.TestBenches.GetLength(0);
|
||||
for (int i = 0; i < nrBenches; i++)
|
||||
{
|
||||
testBenchesListBox.Items.Add(localSettings.TestBenches[i].BenchName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new test bench DB specification and append it to the list
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.DatabaseSettings bench = new Config.DatabaseSettings();
|
||||
Forms.DatabaseSettingsDlg dlg = new Forms.DatabaseSettingsDlg(bench);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
int nrBenches =
|
||||
(localSettings.TestBenches == null) ? 0 : localSettings.TestBenches.GetLength(0);
|
||||
|
||||
if (nrBenches == 0)
|
||||
{
|
||||
localSettings.TestBenches = new Config.DatabaseSettings[1];
|
||||
localSettings.TestBenches[0] = bench;
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.DatabaseSettings[] newTestBenches = new Config.DatabaseSettings[nrBenches + 1];
|
||||
for (int i = 0; i < nrBenches; i++)
|
||||
{
|
||||
newTestBenches[i] = localSettings.TestBenches[i];
|
||||
}
|
||||
newTestBenches[nrBenches] = bench;
|
||||
localSettings.TestBenches = newTestBenches;
|
||||
}
|
||||
|
||||
testBenchesListBox.Items.Add(bench.BenchName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new test bench DB specification,which is a copy of the
|
||||
/// selected bench, and append it to the list
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void copyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (testBenchesListBox.SelectedIndex >= 0)
|
||||
{
|
||||
Config.DatabaseSettings ori = localSettings.TestBenches[testBenchesListBox.SelectedIndex];
|
||||
Config.DatabaseSettings bench = (Config.DatabaseSettings)ori.Clone();
|
||||
|
||||
Forms.DatabaseSettingsDlg dlg = new Forms.DatabaseSettingsDlg(bench);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
int nrBenches =
|
||||
(localSettings.TestBenches == null) ? 0 : localSettings.TestBenches.GetLength(0);
|
||||
|
||||
Config.DatabaseSettings[] newTestBenches = new Config.DatabaseSettings[nrBenches + 1];
|
||||
for (int i = 0; i < nrBenches; i++)
|
||||
{
|
||||
newTestBenches[i] = localSettings.TestBenches[i];
|
||||
}
|
||||
newTestBenches[nrBenches] = bench;
|
||||
localSettings.TestBenches = newTestBenches;
|
||||
|
||||
testBenchesListBox.Items.Add(bench.BenchName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit selected test bench DB specification
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void editButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (testBenchesListBox.SelectedIndex >= 0)
|
||||
{
|
||||
Forms.DatabaseSettingsDlg dlg = new Forms.DatabaseSettingsDlg(localSettings.TestBenches[testBenchesListBox.SelectedIndex]);
|
||||
DialogResult dr = dlg.ShowDialog();
|
||||
if (dr == DialogResult.OK)
|
||||
{
|
||||
// Update the item name
|
||||
testBenchesListBox.Items[testBenchesListBox.SelectedIndex] =
|
||||
localSettings.TestBenches[testBenchesListBox.SelectedIndex].BenchName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove selected test bench DB specification from the list
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void removeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
int selectedIx = testBenchesListBox.SelectedIndex;
|
||||
if (selectedIx >= 0)
|
||||
{
|
||||
int nrBenches =
|
||||
(localSettings.TestBenches == null) ? 0 : localSettings.TestBenches.GetLength(0);
|
||||
|
||||
if (nrBenches == 1)
|
||||
{
|
||||
localSettings.TestBenches = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Config.DatabaseSettings[] newTestBenches = new Config.DatabaseSettings[nrBenches - 1];
|
||||
for (int i = 0; i < selectedIx; i++)
|
||||
{
|
||||
newTestBenches[i] = localSettings.TestBenches[i];
|
||||
}
|
||||
for (int i = selectedIx + 1; i < nrBenches; i++)
|
||||
{
|
||||
newTestBenches[i - 1] = localSettings.TestBenches[i];
|
||||
}
|
||||
localSettings.TestBenches = newTestBenches;
|
||||
}
|
||||
|
||||
RedrawTestBenchesListBox();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update setting, return 'OK'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
localSettings.Save();
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throw away changes, return 'Cancel'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Double click on an item = edit item
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void testBenchesListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
editButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,336 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testBenchesListBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="editButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 105</value>
|
||||
</data>
|
||||
<data name=">>copyButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="addButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 37</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="addButton.Text" xml:space="preserve">
|
||||
<value>&Add</value>
|
||||
</data>
|
||||
<data name=">>removeButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="editButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name=">>editButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>BenchesDlg</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name="removeButton.Text" xml:space="preserve">
|
||||
<value>&Remove</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.Name" xml:space="preserve">
|
||||
<value>testBenchesListBox</value>
|
||||
</data>
|
||||
<data name="copyButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 71</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="editButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="copyButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name=">>editButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>79, 13</value>
|
||||
</data>
|
||||
<data name="addButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name=">>removeButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="testBenchesListBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 37</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name=">>copyButton.Name" xml:space="preserve">
|
||||
<value>copyButton</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="editButton.Text" xml:space="preserve">
|
||||
<value>&Edit</value>
|
||||
</data>
|
||||
<data name=">>addButton.Name" xml:space="preserve">
|
||||
<value>addButton</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="removeButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>192, 139</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>344, 37</value>
|
||||
</data>
|
||||
<data name="copyButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="removeButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name=">>removeButton.Name" xml:space="preserve">
|
||||
<value>removeButton</value>
|
||||
</data>
|
||||
<data name="copyButton.Text" xml:space="preserve">
|
||||
<value>&Copy</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>344, 71</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>addButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>addButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>editButton.Name" xml:space="preserve">
|
||||
<value>editButton</value>
|
||||
</data>
|
||||
<data name="removeButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>editButton.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="testBenchesListBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>164, 134</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 15</value>
|
||||
</data>
|
||||
<data name=">>removeButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>copyButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testBenchesListBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>addButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Database Settings</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>459, 185</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>copyButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="addButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Test Benches :</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@ -1,147 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
public static class DataDeposit
|
||||
{
|
||||
public static IList<TestResult> ReportTestResults;
|
||||
public static IList<Results.Entities.WaterMeter> ReportWaterMeterResults;
|
||||
|
||||
public static IList<TestResult> QueryTestResults;
|
||||
public static IList<Results.Entities.WaterMeter> QueryWaterMeterResults;
|
||||
|
||||
static DataDeposit()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
public static void Clear()
|
||||
{
|
||||
ReportTestResults = new List<TestResult>();
|
||||
ReportWaterMeterResults = new List<Results.Entities.WaterMeter>();
|
||||
|
||||
QueryTestResults = new List<TestResult>();
|
||||
QueryWaterMeterResults = new List<Results.Entities.WaterMeter>();
|
||||
}
|
||||
|
||||
public static void ProcessQueryTestResults(IList<TestResult> testResults, bool resolveManually)
|
||||
{
|
||||
IList<TestResult> selectedTestResults = new List<TestResult>();
|
||||
|
||||
///
|
||||
/// Place all batch numbers into one list without duplicates
|
||||
///
|
||||
IList<int> batchNrs = new List<int>();
|
||||
foreach (var tr in testResults)
|
||||
{
|
||||
if (tr.TestName.ToLower().Contains("q") && !tr.TestName.ToLower().Contains("adj") /*&& tr.TestName.Length == 2*/)
|
||||
{
|
||||
selectedTestResults.Insert(0, tr);
|
||||
|
||||
if (!batchNrs.Contains(tr.BatchNr))
|
||||
{
|
||||
batchNrs.Add(tr.BatchNr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// TODO: Optionally sort them in reverse order (they should be now sorted in this way)
|
||||
|
||||
///
|
||||
/// Iterate through all batch numbers
|
||||
///
|
||||
foreach (var batchNr in batchNrs)
|
||||
{
|
||||
IList<Results.Entities.WaterMeter> wmResults = new List<Results.Entities.WaterMeter>();
|
||||
bool waterMetersCreated = false;
|
||||
|
||||
foreach (var tr in selectedTestResults)
|
||||
{
|
||||
//if (tr.TestName.ToLower().Contains("q2"))
|
||||
{
|
||||
if (tr.BatchNr == batchNr)
|
||||
{
|
||||
if (!waterMetersCreated)
|
||||
{
|
||||
//foreach (var mtr in tr.Meters) wmResults.Add(new Results.Entities.WaterMeter(mtr, 5));
|
||||
waterMetersCreated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < Math.Min(tr.Meters.Count, wmResults.Count); i++)
|
||||
{
|
||||
// TODO: Rewrite
|
||||
//wmResults[i].MeterTestResults(tr.Meters[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Exclude 'failed' water meters
|
||||
for (int i = wmResults.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (string.IsNullOrEmpty(wmResults[i].SerialNr) || !wmResults[i].Passed)
|
||||
{
|
||||
wmResults.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
int added = AddWMResultsAvoidDuplicates(wmResults, resolveManually);
|
||||
Console.WriteLine("batch={0} added={1}", batchNr, added);
|
||||
}
|
||||
|
||||
foreach (var tr in selectedTestResults) QueryTestResults.Add(tr);
|
||||
}
|
||||
|
||||
public static int AddWMResultsAvoidDuplicates(IList<Results.Entities.WaterMeter> wmResults, bool resolveManually)
|
||||
{
|
||||
int added = 0;
|
||||
foreach (var wmr in wmResults)
|
||||
{
|
||||
Results.Entities.WaterMeter foundWM = null;
|
||||
|
||||
foreach (var wm in QueryWaterMeterResults)
|
||||
{
|
||||
if (wm.SerialNr.Equals(wmr.SerialNr))
|
||||
{
|
||||
foundWM = wm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundWM == null)
|
||||
{
|
||||
QueryWaterMeterResults.Add(wmr);
|
||||
added++;
|
||||
}
|
||||
else if (resolveManually)
|
||||
{
|
||||
if (DialogResult.Yes == MessageBox.Show(string.Format("New watermeter: {0}\r\nWatermeter in data set: {1}\r\nDou you want to replace the watermeter in the data set?", wmr, foundWM),
|
||||
"Resolve duplicity", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
|
||||
{
|
||||
QueryWaterMeterResults.Remove(foundWM);
|
||||
QueryWaterMeterResults.Add(wmr);
|
||||
added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
public static void AddQueryToReport()
|
||||
{
|
||||
foreach (var wm in QueryWaterMeterResults) ReportWaterMeterResults.Add(wm);
|
||||
QueryWaterMeterResults.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
142
ResultsBrowser/Forms/AdditionalDataDlg.Designer.cs
generated
142
ResultsBrowser/Forms/AdditionalDataDlg.Designer.cs
generated
@ -1,142 +0,0 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class AdditionalDataDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.typeApprovalTextBox = new System.Windows.Forms.TextBox();
|
||||
this.metrologicalClassTextBox = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.typeTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(34, 56);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(75, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Type approval";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(34, 88);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(91, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Metrological class";
|
||||
//
|
||||
// typeApprovalTextBox
|
||||
//
|
||||
this.typeApprovalTextBox.Location = new System.Drawing.Point(154, 53);
|
||||
this.typeApprovalTextBox.Name = "typeApprovalTextBox";
|
||||
this.typeApprovalTextBox.Size = new System.Drawing.Size(133, 20);
|
||||
this.typeApprovalTextBox.TabIndex = 3;
|
||||
//
|
||||
// metrologicalClassTextBox
|
||||
//
|
||||
this.metrologicalClassTextBox.Location = new System.Drawing.Point(154, 85);
|
||||
this.metrologicalClassTextBox.Name = "metrologicalClassTextBox";
|
||||
this.metrologicalClassTextBox.Size = new System.Drawing.Size(133, 20);
|
||||
this.metrologicalClassTextBox.TabIndex = 5;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(246, 200);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 50);
|
||||
this.okButton.TabIndex = 6;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(337, 200);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 50);
|
||||
this.cancelButton.TabIndex = 7;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// typeTextBox
|
||||
//
|
||||
this.typeTextBox.Location = new System.Drawing.Point(154, 21);
|
||||
this.typeTextBox.Name = "typeTextBox";
|
||||
this.typeTextBox.Size = new System.Drawing.Size(133, 20);
|
||||
this.typeTextBox.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(34, 24);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(31, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Type";
|
||||
//
|
||||
// AdditionalDataDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(428, 262);
|
||||
this.Controls.Add(this.typeTextBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.metrologicalClassTextBox);
|
||||
this.Controls.Add(this.typeApprovalTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "AdditionalDataDlg";
|
||||
this.Text = "AdditionalDataDlg";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox typeApprovalTextBox;
|
||||
private System.Windows.Forms.TextBox metrologicalClassTextBox;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.TextBox typeTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class AdditionalDataDlg : Form
|
||||
{
|
||||
public string Type { get { return typeTextBox.Text; } }
|
||||
public string TypeApproval { get { return typeApprovalTextBox.Text; } }
|
||||
public string MetrologicalClass { get { return metrologicalClassTextBox.Text; } }
|
||||
|
||||
public AdditionalDataDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
144
ResultsBrowser/Forms/DatabaseSettings.Designer.cs
generated
Normal file
144
ResultsBrowser/Forms/DatabaseSettings.Designer.cs
generated
Normal file
@ -0,0 +1,144 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class DatabaseSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox10 = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox11 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBox12 = new System.Windows.Forms.TextBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox10
|
||||
//
|
||||
this.textBox10.Location = new System.Drawing.Point(85, 23);
|
||||
this.textBox10.Name = "textBox10";
|
||||
this.textBox10.Size = new System.Drawing.Size(555, 20);
|
||||
this.textBox10.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(26, 26);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "WR10";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(26, 52);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(38, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "WR11";
|
||||
//
|
||||
// textBox11
|
||||
//
|
||||
this.textBox11.Location = new System.Drawing.Point(85, 49);
|
||||
this.textBox11.Name = "textBox11";
|
||||
this.textBox11.Size = new System.Drawing.Size(555, 20);
|
||||
this.textBox11.TabIndex = 2;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(26, 78);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(38, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "WR12";
|
||||
//
|
||||
// textBox12
|
||||
//
|
||||
this.textBox12.Location = new System.Drawing.Point(85, 75);
|
||||
this.textBox12.Name = "textBox12";
|
||||
this.textBox12.Size = new System.Drawing.Size(555, 20);
|
||||
this.textBox12.TabIndex = 4;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(434, 109);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 6;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(545, 109);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 7;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// DatabaseSettings
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(668, 159);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox12);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox11);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox10);
|
||||
this.Name = "DatabaseSettings";
|
||||
this.Text = "Database Settings";
|
||||
this.Load += new System.EventHandler(this.DatabaseSettings_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox10;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox11;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBox12;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
}
|
||||
}
|
||||
44
ResultsBrowser/Forms/DatabaseSettings.cs
Normal file
44
ResultsBrowser/Forms/DatabaseSettings.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
public partial class DatabaseSettings : Form
|
||||
{
|
||||
public DatabaseSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DatabaseSettings_Load(object sender, EventArgs e)
|
||||
{
|
||||
textBox10.Text = Program.LocalSettings.ConnectionString_WR10;
|
||||
textBox11.Text = Program.LocalSettings.ConnectionString_WR11;
|
||||
textBox12.Text = Program.LocalSettings.ConnectionString_WR12;
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Program.LocalSettings.ConnectionString_WR10 = textBox10.Text;
|
||||
Program.LocalSettings.ConnectionString_WR11 = textBox11.Text;
|
||||
Program.LocalSettings.ConnectionString_WR12 = textBox12.Text;
|
||||
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
211
ResultsBrowser/Forms/DatabaseSettingsDlg.Designer.cs
generated
211
ResultsBrowser/Forms/DatabaseSettingsDlg.Designer.cs
generated
@ -1,211 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class DatabaseSettingsDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DatabaseSettingsDlg));
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.benchNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.connectionStringLabel = new System.Windows.Forms.Label();
|
||||
this.configDbConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.resultsDbConnectionStringTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.realBenchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.dbTypeLabel = new System.Windows.Forms.Label();
|
||||
this.configDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.resultsDbTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.testConnConfigDbBtn = new System.Windows.Forms.Button();
|
||||
this.testConnResultsDbBtn = new System.Windows.Forms.Button();
|
||||
this.createConfigDbBtn = new System.Windows.Forms.Button();
|
||||
this.createResultsDbBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// benchNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.benchNameTextBox, "benchNameTextBox");
|
||||
this.benchNameTextBox.Name = "benchNameTextBox";
|
||||
//
|
||||
// connectionStringLabel
|
||||
//
|
||||
resources.ApplyResources(this.connectionStringLabel, "connectionStringLabel");
|
||||
this.connectionStringLabel.Name = "connectionStringLabel";
|
||||
//
|
||||
// configDbConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.configDbConnectionStringTextBox, "configDbConnectionStringTextBox");
|
||||
this.configDbConnectionStringTextBox.Name = "configDbConnectionStringTextBox";
|
||||
//
|
||||
// resultsDbConnectionStringTextBox
|
||||
//
|
||||
resources.ApplyResources(this.resultsDbConnectionStringTextBox, "resultsDbConnectionStringTextBox");
|
||||
this.resultsDbConnectionStringTextBox.Name = "resultsDbConnectionStringTextBox";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
resources.ApplyResources(this.label4, "label4");
|
||||
this.label4.Name = "label4";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// realBenchCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.realBenchCheckBox, "realBenchCheckBox");
|
||||
this.realBenchCheckBox.Name = "realBenchCheckBox";
|
||||
this.realBenchCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// dbTypeLabel
|
||||
//
|
||||
resources.ApplyResources(this.dbTypeLabel, "dbTypeLabel");
|
||||
this.dbTypeLabel.Name = "dbTypeLabel";
|
||||
//
|
||||
// configDbTypeComboBox
|
||||
//
|
||||
this.configDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.configDbTypeComboBox, "configDbTypeComboBox");
|
||||
this.configDbTypeComboBox.Name = "configDbTypeComboBox";
|
||||
//
|
||||
// resultsDbTypeComboBox
|
||||
//
|
||||
this.resultsDbTypeComboBox.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.resultsDbTypeComboBox, "resultsDbTypeComboBox");
|
||||
this.resultsDbTypeComboBox.Name = "resultsDbTypeComboBox";
|
||||
//
|
||||
// testConnConfigDbBtn
|
||||
//
|
||||
this.testConnConfigDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnConfigDbBtn, "testConnConfigDbBtn");
|
||||
this.testConnConfigDbBtn.Name = "testConnConfigDbBtn";
|
||||
this.testConnConfigDbBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnConfigDbBtn.Click += new System.EventHandler(this.testConnConfigDbBtn_Click);
|
||||
//
|
||||
// testConnResultsDbBtn
|
||||
//
|
||||
this.testConnResultsDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.testConnResultsDbBtn, "testConnResultsDbBtn");
|
||||
this.testConnResultsDbBtn.Name = "testConnResultsDbBtn";
|
||||
this.testConnResultsDbBtn.UseVisualStyleBackColor = true;
|
||||
this.testConnResultsDbBtn.Click += new System.EventHandler(this.testConnResultsDbBtn_Click);
|
||||
//
|
||||
// createConfigDbBtn
|
||||
//
|
||||
this.createConfigDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createConfigDbBtn, "createConfigDbBtn");
|
||||
this.createConfigDbBtn.Name = "createConfigDbBtn";
|
||||
this.createConfigDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createConfigDbBtn.Click += new System.EventHandler(this.createConfigDbBtn_Click);
|
||||
//
|
||||
// createResultsDbBtn
|
||||
//
|
||||
this.createResultsDbBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.createResultsDbBtn, "createResultsDbBtn");
|
||||
this.createResultsDbBtn.Name = "createResultsDbBtn";
|
||||
this.createResultsDbBtn.UseVisualStyleBackColor = true;
|
||||
this.createResultsDbBtn.Click += new System.EventHandler(this.createResultsDbBtn_Click);
|
||||
//
|
||||
// DatabaseSettingsDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.createResultsDbBtn);
|
||||
this.Controls.Add(this.createConfigDbBtn);
|
||||
this.Controls.Add(this.testConnResultsDbBtn);
|
||||
this.Controls.Add(this.testConnConfigDbBtn);
|
||||
this.Controls.Add(this.resultsDbTypeComboBox);
|
||||
this.Controls.Add(this.configDbTypeComboBox);
|
||||
this.Controls.Add(this.dbTypeLabel);
|
||||
this.Controls.Add(this.realBenchCheckBox);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.resultsDbConnectionStringTextBox);
|
||||
this.Controls.Add(this.configDbConnectionStringTextBox);
|
||||
this.Controls.Add(this.connectionStringLabel);
|
||||
this.Controls.Add(this.benchNameTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "DatabaseSettingsDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.BenchSettingsDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox benchNameTextBox;
|
||||
private System.Windows.Forms.Label connectionStringLabel;
|
||||
private System.Windows.Forms.TextBox configDbConnectionStringTextBox;
|
||||
private System.Windows.Forms.TextBox resultsDbConnectionStringTextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.CheckBox realBenchCheckBox;
|
||||
private System.Windows.Forms.Label dbTypeLabel;
|
||||
private System.Windows.Forms.ComboBox configDbTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox resultsDbTypeComboBox;
|
||||
private System.Windows.Forms.Button testConnConfigDbBtn;
|
||||
private System.Windows.Forms.Button testConnResultsDbBtn;
|
||||
private System.Windows.Forms.Button createConfigDbBtn;
|
||||
private System.Windows.Forms.Button createResultsDbBtn;
|
||||
}
|
||||
}
|
||||
@ -1,177 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Dialog to process test bench name and database settings (BenchSettings)
|
||||
/// </summary>
|
||||
public partial class DatabaseSettingsDlg : Form
|
||||
{
|
||||
// Reference to bench DB settins (not a local copy)
|
||||
Config.DatabaseSettings bench;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="bench">Test bench database settings</param>
|
||||
public DatabaseSettingsDlg(Config.DatabaseSettings bench)
|
||||
{
|
||||
this.bench = bench;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Test_Bench_Databases_Specification;
|
||||
label1.Text = Strings.Test_bench_name;
|
||||
realBenchCheckBox.Text = Strings.Test_bench_is_controlled_by_this_computer;
|
||||
dbTypeLabel.Text = Strings.Database_type;
|
||||
connectionStringLabel.Text = Strings.Connection_string;
|
||||
label4.Text = Strings.Procedures;
|
||||
label6.Text = Strings.Water_meter_data;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
|
||||
testConnConfigDbBtn.Text = Strings.Test_connection;
|
||||
testConnResultsDbBtn.Text = Strings.Test_connection;
|
||||
|
||||
createConfigDbBtn.Text = Strings.Create_DB;
|
||||
createResultsDbBtn.Text = Strings.Create_DB;
|
||||
}
|
||||
|
||||
private void BenchSettingsDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
benchNameTextBox.Text = bench.BenchName;
|
||||
realBenchCheckBox.Checked = bench.IsRealBench;
|
||||
|
||||
/// Initialize 'Database type' combo-boxes
|
||||
for (int i = 0; i < (int)Config.Entities.DBType.DbTypesCount; i++)
|
||||
{
|
||||
Config.Entities.DBType dbType = (Config.Entities.DBType)i;
|
||||
configDbTypeComboBox.Items.Add(dbType);
|
||||
resultsDbTypeComboBox.Items.Add(dbType);
|
||||
}
|
||||
configDbTypeComboBox.SelectedIndex = (int)bench.ProceduresDBSettings.DbType;
|
||||
resultsDbTypeComboBox.SelectedIndex = (int)bench.WaterMetersDBSettings.DbType;
|
||||
|
||||
/// Initialize connection strings
|
||||
configDbConnectionStringTextBox.Text = bench.ProceduresDBSettings.ConnectionString;
|
||||
resultsDbConnectionStringTextBox.Text = bench.WaterMetersDBSettings.ConnectionString;
|
||||
}
|
||||
|
||||
bool UpdateBenchFromUIControls()
|
||||
{
|
||||
/// TODO: The following code doesnot work as expected - error message shown!
|
||||
//for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
||||
//{
|
||||
// if (bench != Program.LocalSettings.TestBenches[i] &&
|
||||
// benchNameTextBox.Text == Program.LocalSettings.TestBenches[i].BenchName)
|
||||
// {
|
||||
// MessageBox.Show(Strings.Bench_name_conflict_Use_another_name_pls, Strings.Error, MessageBoxButtons.OK);
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
|
||||
bench.BenchName = benchNameTextBox.Text;
|
||||
bench.IsRealBench = realBenchCheckBox.Checked;
|
||||
|
||||
bench.ProceduresDBSettings.ConnectionString = configDbConnectionStringTextBox.Text;
|
||||
bench.WaterMetersDBSettings.ConnectionString = resultsDbConnectionStringTextBox.Text;
|
||||
|
||||
bench.ProceduresDBSettings.DbType = (Config.Entities.DBType)configDbTypeComboBox.SelectedIndex;
|
||||
bench.WaterMetersDBSettings.DbType = (Config.Entities.DBType)resultsDbTypeComboBox.SelectedIndex;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update bench DB setting, return 'OK'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (UpdateBenchFromUIControls())
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throw away changes, return 'Cancel'
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used</param>
|
||||
/// <param name="e">Not used</param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void createConfigDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Config.FluentCommon.CreateEmptyConfigDB(bench.ProceduresDBSettings);
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void createResultsDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!UpdateBenchFromUIControls()) return;
|
||||
|
||||
if (DialogResult.OK == MessageBox.Show(Strings.DB_will_be_overwritten + Environment.NewLine +
|
||||
Strings.Do_you_want_to_proceed, Strings.Warning,
|
||||
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation))
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
Results.DB.DbType = bench.WaterMetersDBSettings.DbType;
|
||||
Results.DB.ConnectionString = bench.WaterMetersDBSettings.ConnectionString;
|
||||
Results.DB.CreateEmptyDB();
|
||||
MessageBox.Show(Strings.DB_was_successfully_created, Strings.Notification);
|
||||
Cursor.Current = Cursors.Default;
|
||||
DialogResult = DialogResult.None;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
MessageBox.Show(Strings.Error_while_creating_DB_Reason + exception.Message, Strings.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void testConnConfigDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void testConnResultsDbBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,567 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 15</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>225, 28</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 49</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>225, 28</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 18</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 13</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Test Bench Name</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 15</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>315, 20</value>
|
||||
</data>
|
||||
<data name="benchNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Name" xml:space="preserve">
|
||||
<value>benchNameTextBox</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>benchNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>199, 82</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 13</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="connectionStringLabel.Text" xml:space="preserve">
|
||||
<value>Connection string</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Name" xml:space="preserve">
|
||||
<value>connectionStringLabel</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>connectionStringLabel.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="configDbConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 107</value>
|
||||
</data>
|
||||
<data name="configDbConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="configDbConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name=">>configDbConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>configDbConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>configDbConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>configDbConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>configDbConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="resultsDbConnectionStringTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>202, 137</value>
|
||||
</data>
|
||||
<data name="resultsDbConnectionStringTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>406, 20</value>
|
||||
</data>
|
||||
<data name="resultsDbConnectionStringTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name=">>resultsDbConnectionStringTextBox.Name" xml:space="preserve">
|
||||
<value>resultsDbConnectionStringTextBox</value>
|
||||
</data>
|
||||
<data name=">>resultsDbConnectionStringTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>resultsDbConnectionStringTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>resultsDbConnectionStringTextBox.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 110</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 13</value>
|
||||
</data>
|
||||
<data name="label4.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>49</value>
|
||||
</data>
|
||||
<data name="label4.Text" xml:space="preserve">
|
||||
<value>Configuration</value>
|
||||
</data>
|
||||
<data name=">>label4.Name" xml:space="preserve">
|
||||
<value>label4</value>
|
||||
</data>
|
||||
<data name=">>label4.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label4.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 140</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>42, 13</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>51</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Results</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 47</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>219, 17</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>54</value>
|
||||
</data>
|
||||
<data name="realBenchCheckBox.Text" xml:space="preserve">
|
||||
<value>Test bench is controlled by this computer</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Name" xml:space="preserve">
|
||||
<value>realBenchCheckBox</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>realBenchCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>113, 82</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 13</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>55</value>
|
||||
</data>
|
||||
<data name="dbTypeLabel.Text" xml:space="preserve">
|
||||
<value>Database type</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Name" xml:space="preserve">
|
||||
<value>dbTypeLabel</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>dbTypeLabel.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="configDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 107</value>
|
||||
</data>
|
||||
<data name="configDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="configDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>58</value>
|
||||
</data>
|
||||
<data name=">>configDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>configDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>configDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>configDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>configDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="resultsDbTypeComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>116, 137</value>
|
||||
</data>
|
||||
<data name="resultsDbTypeComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>80, 21</value>
|
||||
</data>
|
||||
<data name="resultsDbTypeComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>60</value>
|
||||
</data>
|
||||
<data name=">>resultsDbTypeComboBox.Name" xml:space="preserve">
|
||||
<value>resultsDbTypeComboBox</value>
|
||||
</data>
|
||||
<data name=">>resultsDbTypeComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>resultsDbTypeComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>resultsDbTypeComboBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testConnConfigDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 105</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>62</value>
|
||||
</data>
|
||||
<data name="testConnConfigDbBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnConfigDbBtn.Name" xml:space="preserve">
|
||||
<value>testConnConfigDbBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnConfigDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnConfigDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnConfigDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>614, 135</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>95, 23</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>64</value>
|
||||
</data>
|
||||
<data name="testConnResultsDbBtn.Text" xml:space="preserve">
|
||||
<value>Test Connection</value>
|
||||
</data>
|
||||
<data name=">>testConnResultsDbBtn.Name" xml:space="preserve">
|
||||
<value>testConnResultsDbBtn</value>
|
||||
</data>
|
||||
<data name=">>testConnResultsDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testConnResultsDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>testConnResultsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>715, 104</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>124, 23</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>66</value>
|
||||
</data>
|
||||
<data name="createConfigDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createConfigDbBtn.Name" xml:space="preserve">
|
||||
<value>createConfigDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createConfigDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createConfigDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createConfigDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>715, 134</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>124, 23</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>68</value>
|
||||
</data>
|
||||
<data name="createResultsDbBtn.Text" xml:space="preserve">
|
||||
<value>Create DB</value>
|
||||
</data>
|
||||
<data name=">>createResultsDbBtn.Name" xml:space="preserve">
|
||||
<value>createResultsDbBtn</value>
|
||||
</data>
|
||||
<data name=">>createResultsDbBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>createResultsDbBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>createResultsDbBtn.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>853, 172</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Test Bench Databases Specification</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>DatabaseSettingsDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
107
ResultsBrowser/Forms/LoginDlg.Designer.cs
generated
107
ResultsBrowser/Forms/LoginDlg.Designer.cs
generated
@ -1,107 +0,0 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class LoginDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlg));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.passwordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.userNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// passwordTextBox
|
||||
//
|
||||
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
|
||||
this.passwordTextBox.Name = "passwordTextBox";
|
||||
this.passwordTextBox.UseSystemPasswordChar = true;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// userNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
|
||||
this.userNameTextBox.Name = "userNameTextBox";
|
||||
//
|
||||
// LoginDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.Controls.Add(this.userNameTextBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.passwordTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "LoginDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.LoginDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox userNameTextBox;
|
||||
private System.Windows.Forms.TextBox passwordTextBox;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
}
|
||||
}
|
||||
@ -1,132 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Config.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides login dialog as well as user authorization using TBF.User.Authorize(...)
|
||||
/// (i.e. when DialogResult is OK, user was authorized).
|
||||
/// </summary>
|
||||
public partial class LoginDlg : Form
|
||||
{
|
||||
// Private fields
|
||||
string user;
|
||||
string password;
|
||||
Config.Grp.GID requiredGroupMembership = Config.Grp.GID.Invalid;
|
||||
bool noDatabase;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public LoginDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user.
|
||||
/// </summary>
|
||||
public LoginDlg(string predefinedUser)
|
||||
: this()
|
||||
{
|
||||
user = predefinedUser;
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with 'no Database' flag.
|
||||
/// </summary>
|
||||
public LoginDlg(bool noDatabase)
|
||||
: this()
|
||||
{
|
||||
this.noDatabase = noDatabase;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor when a specific group membership is required.
|
||||
/// </summary>
|
||||
public LoginDlg(Config.Grp.GID requiredGroupMembership)
|
||||
: this()
|
||||
{
|
||||
this.requiredGroupMembership = requiredGroupMembership;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user when a specific group membership is required.
|
||||
/// </summary>
|
||||
public LoginDlg(string predefinedUser, Config.Grp.GID requiredGroupMembership)
|
||||
: this()
|
||||
{
|
||||
user = predefinedUser;
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
this.requiredGroupMembership = requiredGroupMembership;
|
||||
}
|
||||
|
||||
private void LoginDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Text = Strings.User_Login;
|
||||
label1.Text = Strings.Username;
|
||||
label2.Text = Strings.Password;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
|
||||
if (user == null) userNameTextBox.Select();
|
||||
else passwordTextBox.Select();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to authorize the user when OK clicked.
|
||||
/// </summary>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
user = userNameTextBox.Text;
|
||||
password = passwordTextBox.Text;
|
||||
|
||||
bool authorized = Config.Entities.User.IsPowerUser(user, password);
|
||||
|
||||
if (!authorized && !noDatabase)
|
||||
{
|
||||
User loadedUser = User.LoadUserByName(user);
|
||||
if (loadedUser != null)
|
||||
{
|
||||
if (requiredGroupMembership == Config.Grp.GID.Invalid)
|
||||
{
|
||||
authorized = loadedUser.Authorize(user, password);
|
||||
}
|
||||
else
|
||||
{
|
||||
authorized = loadedUser.Authorize(user, password, requiredGroupMembership);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel clicked, do not try to authorize.
|
||||
/// </summary>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (requiredGroupMembership == Config.Grp.GID.Invalid)
|
||||
{
|
||||
User.Unauthorize();
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,288 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Name" xml:space="preserve">
|
||||
<value>passwordTextBox</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 51</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 48</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 24</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LoginDlg</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>402, 88</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 14</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 48</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 22</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>User login</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Name" xml:space="preserve">
|
||||
<value>userNameTextBox</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@ -1,117 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides login dialog that includes test bench selection.
|
||||
/// It is used only once on program startup. Does not do authorisation
|
||||
/// as User.users have not been loadded from the DB yet.
|
||||
/// </summary>
|
||||
public partial class LoginDlgWithBenchSelection : Form
|
||||
{
|
||||
// Private fields
|
||||
string user;
|
||||
string password;
|
||||
string benchName = null;
|
||||
|
||||
// Readonly public properties to do the authorization.
|
||||
public string User { get { return user; } }
|
||||
public string Password { get { return password; } }
|
||||
public string BenchName { get { return benchName; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public LoginDlgWithBenchSelection()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined bench.
|
||||
/// </summary>
|
||||
public LoginDlgWithBenchSelection(string predefinedBench)
|
||||
: this()
|
||||
{
|
||||
benchName = predefinedBench;
|
||||
}
|
||||
|
||||
private void LoginDlgWithBenchSelection_Load(object sender, EventArgs e)
|
||||
{
|
||||
#if DEBUG
|
||||
userNameTextBox.Text = Config.Data.AdminUsername;
|
||||
passwordTextBox.Text = Config.Data.AdminPassword;
|
||||
#endif
|
||||
for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
testBenchComboBox.Items.Add(Program.LocalSettings.TestBenches[i].BenchName);
|
||||
if (benchName != null && benchName == Program.LocalSettings.TestBenches[i].BenchName)
|
||||
{
|
||||
testBenchComboBox.Text = benchName;
|
||||
}
|
||||
}
|
||||
|
||||
Localize();
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.User_Login;
|
||||
label1.Text = Strings.Username;
|
||||
label2.Text = Strings.Password;
|
||||
label3.Text = Strings.Test_bench;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OK clicked (authorization is done outside this dialog).
|
||||
/// </summary>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (testBenchComboBox.SelectedItem != null)
|
||||
{
|
||||
user = userNameTextBox.Text;
|
||||
password = passwordTextBox.Text;
|
||||
benchName = testBenchComboBox.SelectedItem.ToString();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(Strings.PLs_select_testbench, Strings.Warning, MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel clicked.
|
||||
/// </summary>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
private void passwordTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (passwordTextBox.Text != "")
|
||||
{
|
||||
this.AcceptButton = okButton;
|
||||
}
|
||||
}
|
||||
|
||||
private void userNameTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
passwordTextBox.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,125 +0,0 @@
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
partial class LoginDlgWithBenchSelection
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlgWithBenchSelection));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.testBenchComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.passwordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.userNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
resources.ApplyResources(this.label3, "label3");
|
||||
this.label3.Name = "label3";
|
||||
//
|
||||
// testBenchComboBox
|
||||
//
|
||||
resources.ApplyResources(this.testBenchComboBox, "testBenchComboBox");
|
||||
this.testBenchComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.testBenchComboBox.FormattingEnabled = true;
|
||||
this.testBenchComboBox.Name = "testBenchComboBox";
|
||||
//
|
||||
// passwordTextBox
|
||||
//
|
||||
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
|
||||
this.passwordTextBox.Name = "passwordTextBox";
|
||||
this.passwordTextBox.UseSystemPasswordChar = true;
|
||||
this.passwordTextBox.TextChanged += new System.EventHandler(this.passwordTextBox_TextChanged);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// userNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
|
||||
this.userNameTextBox.Name = "userNameTextBox";
|
||||
this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress);
|
||||
//
|
||||
// LoginDlgWithBenchSelection
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.userNameTextBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.passwordTextBox);
|
||||
this.Controls.Add(this.testBenchComboBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "LoginDlgWithBenchSelection";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.LoginDlgWithBenchSelection_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox userNameTextBox;
|
||||
private System.Windows.Forms.TextBox passwordTextBox;
|
||||
private System.Windows.Forms.ComboBox testBenchComboBox;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
}
|
||||
}
|
||||
@ -1,336 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LoginDlgWithBenchSelection</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="testBenchComboBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>label3.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 15</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="testBenchComboBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 67</value>
|
||||
</data>
|
||||
<data name=">>label3.Name" xml:space="preserve">
|
||||
<value>label3</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 70</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>96, 41</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Name" xml:space="preserve">
|
||||
<value>userNameTextBox</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.Name" xml:space="preserve">
|
||||
<value>testBenchComboBox</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="testBenchComboBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 21</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 14</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label3.Text" xml:space="preserve">
|
||||
<value>Test bench</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>285, 48</value>
|
||||
</data>
|
||||
<data name=">>label2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>testBenchComboBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 17</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>User login</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Name" xml:space="preserve">
|
||||
<value>passwordTextBox</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name="label3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 44</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>402, 102</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name=">>label3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@ -9,8 +9,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
@ -21,24 +20,24 @@ namespace ResultsBrowser.Forms
|
||||
/// Required access rights to make changes with this form
|
||||
/// </summary>
|
||||
const Config.Grp.GID RequiredGroupMembership = Config.Grp.GID.Metrologists;
|
||||
public TestsArrangement TestsArrangement;
|
||||
public MetersArrangement MetersArrangement;
|
||||
public Config.Entities.TestsArrangement TestsArrangement;
|
||||
public Config.Entities.MetersArrangement MetersArrangement;
|
||||
public int NrMetersInOneGroup;
|
||||
|
||||
public IList<ResultItemSpec> currentlyAvailableItems;
|
||||
public IList<ResultItemSpec> ReportItems_Single;
|
||||
public IList<ResultItemSpec> ReportItems_Compound;
|
||||
public IList<Results.ItemSpec> currentlyAvailableItems;
|
||||
public IList<Results.ItemSpec> ReportItems_Single;
|
||||
public IList<Results.ItemSpec> ReportItems_Compound;
|
||||
|
||||
bool combined; /// false = single meter items, true = combined meter items
|
||||
Device device; /// Screen, Printer or Disk
|
||||
bool unlocked; /// true = changes enabled
|
||||
bool combined; /// false = single meter items, true = combined meter items
|
||||
Config.Entities.Device device; /// Screen, Printer or Disk
|
||||
bool unlocked; /// true = changes enabled
|
||||
|
||||
public ResultsConfig(bool combined)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.combined = combined;
|
||||
device = Device.Screen;
|
||||
device = Config.Entities.Device.Screen;
|
||||
unlocked = false;
|
||||
cancelButton.Visible = false;
|
||||
}
|
||||
@ -74,7 +73,7 @@ namespace ResultsBrowser.Forms
|
||||
/// Gets the list of selected items based on watermeter type and device selections
|
||||
/// </summary>
|
||||
/// <returns>List of selected result items</returns>
|
||||
IList<ResultItemSpec> GetSelectedItems()
|
||||
IList<Results.ItemSpec> GetSelectedItems()
|
||||
{
|
||||
if (combined)
|
||||
{
|
||||
@ -92,8 +91,8 @@ namespace ResultsBrowser.Forms
|
||||
void RedrawAvailable()
|
||||
{
|
||||
availableResultsListBox.Items.Clear();
|
||||
currentlyAvailableItems = new List<ResultItemSpec>();
|
||||
foreach (var item in ResultItemSpec.AllItems)
|
||||
currentlyAvailableItems = new List<Results.ItemSpec>();
|
||||
foreach (var item in Results.ItemSpec.AllItems)
|
||||
{
|
||||
if (!GetSelectedItems().Contains(item) && (combined ? item.CanPrintCombined : item.CanPrintSingle))
|
||||
{
|
||||
@ -119,10 +118,10 @@ namespace ResultsBrowser.Forms
|
||||
{
|
||||
if (!unlocked)
|
||||
{
|
||||
if (!User.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
{
|
||||
if ((new LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK) return;
|
||||
}
|
||||
//if (!User.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
//{
|
||||
// if ((new LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK) return;
|
||||
//}
|
||||
|
||||
unlocked = true;
|
||||
|
||||
@ -149,7 +148,7 @@ namespace ResultsBrowser.Forms
|
||||
void availableResultsListBox_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
/// Double click works when just one item is selected
|
||||
IList<ResultItemSpec> itemsToRemove = new List<ResultItemSpec>();
|
||||
IList<Results.ItemSpec> itemsToRemove = new List<Results.ItemSpec>();
|
||||
if (availableResultsListBox.SelectedIndices.Count == 1)
|
||||
{
|
||||
var item = currentlyAvailableItems[availableResultsListBox.SelectedIndices[0]];
|
||||
|
||||
@ -26,12 +26,10 @@ namespace ResultsBrowser
|
||||
/// <summary>C:\VSProjects\TBF\TestBenchFramework\LocalSettings.cs
|
||||
/// Names and database settings of test benches.
|
||||
/// </summary>
|
||||
[XmlArrayAttribute("TestBenches")]
|
||||
public Config.DatabaseSettings[] TestBenches;
|
||||
[XmlIgnore]
|
||||
public int BenchesCount { get { return (TestBenches != null) ? TestBenches.GetLength(0) : 0; } }
|
||||
public string ConnectionString_WR10;
|
||||
public string ConnectionString_WR11;
|
||||
public string ConnectionString_WR12;
|
||||
|
||||
public string LastBenchName;
|
||||
public bool FilterPurchaseOrder;
|
||||
public bool FilterProcedure;
|
||||
public bool FilterBatchNr;
|
||||
|
||||
969
ResultsBrowser/MainWnd.Designer.cs
generated
969
ResultsBrowser/MainWnd.Designer.cs
generated
@ -28,486 +28,500 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.queryButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.batchNrGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.batchNrToTextBox = new System.Windows.Forms.TextBox();
|
||||
this.batchNrFromTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.batchNrCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.removeFromQueryButton = new System.Windows.Forms.Button();
|
||||
this.addToReportButton = new System.Windows.Forms.Button();
|
||||
this.resolveManuallyCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.procedureGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.procedureCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.procedureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.clearButton = new System.Windows.Forms.Button();
|
||||
this.fromGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.filterDateCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.toDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.fromDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.purchaseOrderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.purchaseOrderCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.purchaseOrderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.queryResultsListBox = new System.Windows.Forms.ListBox();
|
||||
this.configReportButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.makeReportButton = new System.Windows.Forms.Button();
|
||||
this.removeFromReportButton = new System.Windows.Forms.Button();
|
||||
this.reportFileGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.browseFileButton = new System.Windows.Forms.Button();
|
||||
this.reportFileComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.makeAscFileButton = new System.Windows.Forms.Button();
|
||||
this.addOracleDataButton = new System.Windows.Forms.Button();
|
||||
this.reportListBox = new System.Windows.Forms.ListBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.batchNrGroupBox.SuspendLayout();
|
||||
this.procedureGroupBox.SuspendLayout();
|
||||
this.fromGroupBox.SuspendLayout();
|
||||
this.purchaseOrderGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
|
||||
this.splitContainer3.Panel1.SuspendLayout();
|
||||
this.splitContainer3.Panel2.SuspendLayout();
|
||||
this.splitContainer3.SuspendLayout();
|
||||
this.reportFileGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// queryButton
|
||||
//
|
||||
this.queryButton.Location = new System.Drawing.Point(15, 178);
|
||||
this.queryButton.Name = "queryButton";
|
||||
this.queryButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.queryButton.TabIndex = 3;
|
||||
this.queryButton.Text = "Query";
|
||||
this.queryButton.UseVisualStyleBackColor = true;
|
||||
this.queryButton.Click += new System.EventHandler(this.queryButton_Click);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.batchNrGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.removeFromQueryButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.addToReportButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.resolveManuallyCheckBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.procedureGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.clearButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.fromGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.purchaseOrderGroupBox);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.queryResultsListBox);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(604, 624);
|
||||
this.splitContainer1.SplitterDistance = 220;
|
||||
this.splitContainer1.TabIndex = 5;
|
||||
//
|
||||
// batchNrGroupBox
|
||||
//
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrToTextBox);
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrFromTextBox);
|
||||
this.batchNrGroupBox.Controls.Add(this.label4);
|
||||
this.batchNrGroupBox.Controls.Add(this.label3);
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrCheckBox);
|
||||
this.batchNrGroupBox.Location = new System.Drawing.Point(15, 122);
|
||||
this.batchNrGroupBox.Name = "batchNrGroupBox";
|
||||
this.batchNrGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.batchNrGroupBox.TabIndex = 11;
|
||||
this.batchNrGroupBox.TabStop = false;
|
||||
//
|
||||
// batchNrToTextBox
|
||||
//
|
||||
this.batchNrToTextBox.Location = new System.Drawing.Point(157, 21);
|
||||
this.batchNrToTextBox.Name = "batchNrToTextBox";
|
||||
this.batchNrToTextBox.Size = new System.Drawing.Size(62, 20);
|
||||
this.batchNrToTextBox.TabIndex = 5;
|
||||
//
|
||||
// batchNrFromTextBox
|
||||
//
|
||||
this.batchNrFromTextBox.Location = new System.Drawing.Point(56, 21);
|
||||
this.batchNrFromTextBox.Name = "batchNrFromTextBox";
|
||||
this.batchNrFromTextBox.Size = new System.Drawing.Size(62, 20);
|
||||
this.batchNrFromTextBox.TabIndex = 4;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(131, 24);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(20, 13);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "To";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(19, 24);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(30, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "From";
|
||||
//
|
||||
// batchNrCheckBox
|
||||
//
|
||||
this.batchNrCheckBox.AutoSize = true;
|
||||
this.batchNrCheckBox.Location = new System.Drawing.Point(19, 0);
|
||||
this.batchNrCheckBox.Name = "batchNrCheckBox";
|
||||
this.batchNrCheckBox.Size = new System.Drawing.Size(116, 17);
|
||||
this.batchNrCheckBox.TabIndex = 1;
|
||||
this.batchNrCheckBox.Text = "Filter batch number";
|
||||
this.batchNrCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// removeFromQueryButton
|
||||
//
|
||||
this.removeFromQueryButton.Location = new System.Drawing.Point(453, 162);
|
||||
this.removeFromQueryButton.Name = "removeFromQueryButton";
|
||||
this.removeFromQueryButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.removeFromQueryButton.TabIndex = 9;
|
||||
this.removeFromQueryButton.Text = "Delete";
|
||||
this.removeFromQueryButton.UseVisualStyleBackColor = true;
|
||||
this.removeFromQueryButton.Click += new System.EventHandler(this.removeFromQueryButton_Click);
|
||||
//
|
||||
// addToReportButton
|
||||
//
|
||||
this.addToReportButton.Location = new System.Drawing.Point(558, 162);
|
||||
this.addToReportButton.Name = "addToReportButton";
|
||||
this.addToReportButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.addToReportButton.TabIndex = 8;
|
||||
this.addToReportButton.Text = ">>>";
|
||||
this.addToReportButton.UseVisualStyleBackColor = true;
|
||||
this.addToReportButton.Click += new System.EventHandler(this.addToReportButton_Click);
|
||||
//
|
||||
// resolveManuallyCheckBox
|
||||
//
|
||||
this.resolveManuallyCheckBox.AutoSize = true;
|
||||
this.resolveManuallyCheckBox.Location = new System.Drawing.Point(282, 143);
|
||||
this.resolveManuallyCheckBox.Name = "resolveManuallyCheckBox";
|
||||
this.resolveManuallyCheckBox.Size = new System.Drawing.Size(158, 17);
|
||||
this.resolveManuallyCheckBox.TabIndex = 7;
|
||||
this.resolveManuallyCheckBox.Text = "Resolve duplicities manually";
|
||||
this.resolveManuallyCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// procedureGroupBox
|
||||
//
|
||||
this.procedureGroupBox.Controls.Add(this.procedureCheckBox);
|
||||
this.procedureGroupBox.Controls.Add(this.procedureComboBox);
|
||||
this.procedureGroupBox.Location = new System.Drawing.Point(15, 68);
|
||||
this.procedureGroupBox.Name = "procedureGroupBox";
|
||||
this.procedureGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.procedureGroupBox.TabIndex = 6;
|
||||
this.procedureGroupBox.TabStop = false;
|
||||
//
|
||||
// procedureCheckBox
|
||||
//
|
||||
this.procedureCheckBox.AutoSize = true;
|
||||
this.procedureCheckBox.Location = new System.Drawing.Point(19, 0);
|
||||
this.procedureCheckBox.Name = "procedureCheckBox";
|
||||
this.procedureCheckBox.Size = new System.Drawing.Size(99, 17);
|
||||
this.procedureCheckBox.TabIndex = 1;
|
||||
this.procedureCheckBox.Text = "Filter procedure";
|
||||
this.procedureCheckBox.UseVisualStyleBackColor = true;
|
||||
this.procedureCheckBox.CheckedChanged += new System.EventHandler(this.procedureCheckBox_CheckedChanged);
|
||||
//
|
||||
// procedureComboBox
|
||||
//
|
||||
this.procedureComboBox.FormattingEnabled = true;
|
||||
this.procedureComboBox.Location = new System.Drawing.Point(18, 19);
|
||||
this.procedureComboBox.Name = "procedureComboBox";
|
||||
this.procedureComboBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.procedureComboBox.TabIndex = 0;
|
||||
//
|
||||
// clearButton
|
||||
//
|
||||
this.clearButton.Location = new System.Drawing.Point(149, 178);
|
||||
this.clearButton.Name = "clearButton";
|
||||
this.clearButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.clearButton.TabIndex = 4;
|
||||
this.clearButton.Text = "Clear";
|
||||
this.clearButton.UseVisualStyleBackColor = true;
|
||||
this.clearButton.Click += new System.EventHandler(this.clearButton_Click);
|
||||
//
|
||||
// fromGroupBox
|
||||
//
|
||||
this.fromGroupBox.Controls.Add(this.label2);
|
||||
this.fromGroupBox.Controls.Add(this.label1);
|
||||
this.fromGroupBox.Controls.Add(this.filterDateCheckBox);
|
||||
this.fromGroupBox.Controls.Add(this.toDateTimePicker);
|
||||
this.fromGroupBox.Controls.Add(this.fromDateTimePicker);
|
||||
this.fromGroupBox.Location = new System.Drawing.Point(263, 14);
|
||||
this.fromGroupBox.Name = "fromGroupBox";
|
||||
this.fromGroupBox.Size = new System.Drawing.Size(242, 104);
|
||||
this.fromGroupBox.TabIndex = 3;
|
||||
this.fromGroupBox.TabStop = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(16, 68);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(20, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "To";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(16, 36);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(30, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "From";
|
||||
//
|
||||
// filterDateCheckBox
|
||||
//
|
||||
this.filterDateCheckBox.AutoSize = true;
|
||||
this.filterDateCheckBox.Location = new System.Drawing.Point(19, -1);
|
||||
this.filterDateCheckBox.Name = "filterDateCheckBox";
|
||||
this.filterDateCheckBox.Size = new System.Drawing.Size(72, 17);
|
||||
this.filterDateCheckBox.TabIndex = 1;
|
||||
this.filterDateCheckBox.Text = "Filter date";
|
||||
this.filterDateCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// toDateTimePicker
|
||||
//
|
||||
this.toDateTimePicker.Location = new System.Drawing.Point(68, 65);
|
||||
this.toDateTimePicker.Name = "toDateTimePicker";
|
||||
this.toDateTimePicker.Size = new System.Drawing.Size(151, 20);
|
||||
this.toDateTimePicker.TabIndex = 0;
|
||||
//
|
||||
// fromDateTimePicker
|
||||
//
|
||||
this.fromDateTimePicker.Location = new System.Drawing.Point(68, 32);
|
||||
this.fromDateTimePicker.Name = "fromDateTimePicker";
|
||||
this.fromDateTimePicker.Size = new System.Drawing.Size(151, 20);
|
||||
this.fromDateTimePicker.TabIndex = 0;
|
||||
//
|
||||
// purchaseOrderGroupBox
|
||||
//
|
||||
this.purchaseOrderGroupBox.Controls.Add(this.purchaseOrderCheckBox);
|
||||
this.purchaseOrderGroupBox.Controls.Add(this.purchaseOrderComboBox);
|
||||
this.purchaseOrderGroupBox.Location = new System.Drawing.Point(15, 14);
|
||||
this.purchaseOrderGroupBox.Name = "purchaseOrderGroupBox";
|
||||
this.purchaseOrderGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.purchaseOrderGroupBox.TabIndex = 2;
|
||||
this.purchaseOrderGroupBox.TabStop = false;
|
||||
//
|
||||
// purchaseOrderCheckBox
|
||||
//
|
||||
this.purchaseOrderCheckBox.AutoSize = true;
|
||||
this.purchaseOrderCheckBox.Location = new System.Drawing.Point(19, 0);
|
||||
this.purchaseOrderCheckBox.Name = "purchaseOrderCheckBox";
|
||||
this.purchaseOrderCheckBox.Size = new System.Drawing.Size(122, 17);
|
||||
this.purchaseOrderCheckBox.TabIndex = 1;
|
||||
this.purchaseOrderCheckBox.Text = "Filter purchase order";
|
||||
this.purchaseOrderCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// purchaseOrderComboBox
|
||||
//
|
||||
this.purchaseOrderComboBox.FormattingEnabled = true;
|
||||
this.purchaseOrderComboBox.Location = new System.Drawing.Point(18, 19);
|
||||
this.purchaseOrderComboBox.Name = "purchaseOrderComboBox";
|
||||
this.purchaseOrderComboBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.purchaseOrderComboBox.TabIndex = 0;
|
||||
//
|
||||
// queryResultsListBox
|
||||
//
|
||||
this.queryResultsListBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.queryResultsListBox.FormattingEnabled = true;
|
||||
this.queryResultsListBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.queryResultsListBox.Name = "queryResultsListBox";
|
||||
this.queryResultsListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
|
||||
this.queryResultsListBox.Size = new System.Drawing.Size(604, 400);
|
||||
this.queryResultsListBox.TabIndex = 0;
|
||||
//
|
||||
// configReportButton
|
||||
//
|
||||
this.configReportButton.Location = new System.Drawing.Point(226, 95);
|
||||
this.configReportButton.Name = "configReportButton";
|
||||
this.configReportButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.configReportButton.TabIndex = 5;
|
||||
this.configReportButton.Text = "Configure Report";
|
||||
this.configReportButton.UseVisualStyleBackColor = true;
|
||||
this.configReportButton.Click += new System.EventHandler(this.configReportButton_Click);
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.splitContainer1);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.splitContainer3);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1284, 624);
|
||||
this.splitContainer2.SplitterDistance = 604;
|
||||
this.splitContainer2.TabIndex = 6;
|
||||
//
|
||||
// splitContainer3
|
||||
//
|
||||
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer3.IsSplitterFixed = true;
|
||||
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer3.Name = "splitContainer3";
|
||||
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.makeReportButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.removeFromReportButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.reportFileGroupBox);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.makeAscFileButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.addOracleDataButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.configReportButton);
|
||||
//
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.reportListBox);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(676, 624);
|
||||
this.splitContainer3.SplitterDistance = 220;
|
||||
this.splitContainer3.TabIndex = 6;
|
||||
//
|
||||
// makeReportButton
|
||||
//
|
||||
this.makeReportButton.Location = new System.Drawing.Point(335, 95);
|
||||
this.makeReportButton.Name = "makeReportButton";
|
||||
this.makeReportButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.makeReportButton.TabIndex = 11;
|
||||
this.makeReportButton.Text = "Make Report";
|
||||
this.makeReportButton.UseVisualStyleBackColor = true;
|
||||
this.makeReportButton.Click += new System.EventHandler(this.makeReportButton_Click);
|
||||
//
|
||||
// removeFromReportButton
|
||||
//
|
||||
this.removeFromReportButton.Location = new System.Drawing.Point(58, 162);
|
||||
this.removeFromReportButton.Name = "removeFromReportButton";
|
||||
this.removeFromReportButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.removeFromReportButton.TabIndex = 10;
|
||||
this.removeFromReportButton.Text = "Delete";
|
||||
this.removeFromReportButton.UseVisualStyleBackColor = true;
|
||||
this.removeFromReportButton.Click += new System.EventHandler(this.removeFromReportButton_Click);
|
||||
//
|
||||
// reportFileGroupBox
|
||||
//
|
||||
this.reportFileGroupBox.Controls.Add(this.browseFileButton);
|
||||
this.reportFileGroupBox.Controls.Add(this.reportFileComboBox);
|
||||
this.reportFileGroupBox.Location = new System.Drawing.Point(18, 14);
|
||||
this.reportFileGroupBox.Name = "reportFileGroupBox";
|
||||
this.reportFileGroupBox.Size = new System.Drawing.Size(546, 63);
|
||||
this.reportFileGroupBox.TabIndex = 8;
|
||||
this.reportFileGroupBox.TabStop = false;
|
||||
this.reportFileGroupBox.Text = "Report file name";
|
||||
//
|
||||
// browseFileButton
|
||||
//
|
||||
this.browseFileButton.Location = new System.Drawing.Point(453, 22);
|
||||
this.browseFileButton.Name = "browseFileButton";
|
||||
this.browseFileButton.Size = new System.Drawing.Size(75, 27);
|
||||
this.browseFileButton.TabIndex = 2;
|
||||
this.browseFileButton.Text = "Browse";
|
||||
this.browseFileButton.UseVisualStyleBackColor = true;
|
||||
this.browseFileButton.Click += new System.EventHandler(this.browseFileButton_Click);
|
||||
//
|
||||
// reportFileComboBox
|
||||
//
|
||||
this.reportFileComboBox.FormattingEnabled = true;
|
||||
this.reportFileComboBox.Location = new System.Drawing.Point(20, 25);
|
||||
this.reportFileComboBox.Name = "reportFileComboBox";
|
||||
this.reportFileComboBox.Size = new System.Drawing.Size(414, 21);
|
||||
this.reportFileComboBox.TabIndex = 1;
|
||||
//
|
||||
// makeAscFileButton
|
||||
//
|
||||
this.makeAscFileButton.Location = new System.Drawing.Point(443, 95);
|
||||
this.makeAscFileButton.Name = "makeAscFileButton";
|
||||
this.makeAscFileButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.makeAscFileButton.TabIndex = 7;
|
||||
this.makeAscFileButton.Text = "Make *.asc File";
|
||||
this.makeAscFileButton.UseVisualStyleBackColor = true;
|
||||
this.makeAscFileButton.Click += new System.EventHandler(this.makeAscFileButton_Click);
|
||||
//
|
||||
// addOracleDataButton
|
||||
//
|
||||
this.addOracleDataButton.Location = new System.Drawing.Point(117, 95);
|
||||
this.addOracleDataButton.Name = "addOracleDataButton";
|
||||
this.addOracleDataButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.addOracleDataButton.TabIndex = 6;
|
||||
this.addOracleDataButton.Text = "Add Oracle Data";
|
||||
this.addOracleDataButton.UseVisualStyleBackColor = true;
|
||||
this.addOracleDataButton.Click += new System.EventHandler(this.addOracleDataButton_Click);
|
||||
//
|
||||
// reportListBox
|
||||
//
|
||||
this.reportListBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.reportListBox.FormattingEnabled = true;
|
||||
this.reportListBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.reportListBox.Name = "reportListBox";
|
||||
this.reportListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
|
||||
this.reportListBox.Size = new System.Drawing.Size(676, 400);
|
||||
this.reportListBox.TabIndex = 0;
|
||||
//
|
||||
// MainWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1284, 624);
|
||||
this.Controls.Add(this.splitContainer2);
|
||||
this.Name = "MainWnd";
|
||||
this.Text = "Form1";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWnd_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainWnd_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.batchNrGroupBox.ResumeLayout(false);
|
||||
this.batchNrGroupBox.PerformLayout();
|
||||
this.procedureGroupBox.ResumeLayout(false);
|
||||
this.procedureGroupBox.PerformLayout();
|
||||
this.fromGroupBox.ResumeLayout(false);
|
||||
this.fromGroupBox.PerformLayout();
|
||||
this.purchaseOrderGroupBox.ResumeLayout(false);
|
||||
this.purchaseOrderGroupBox.PerformLayout();
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.ResumeLayout(false);
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
this.reportFileGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.queryBatchesButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.queryWatermetersButton = new System.Windows.Forms.Button();
|
||||
this.batchNrGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.batchNrToTextBox = new System.Windows.Forms.TextBox();
|
||||
this.batchNrFromTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.batchNrCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.removeFromQueryButton = new System.Windows.Forms.Button();
|
||||
this.addToReportButton = new System.Windows.Forms.Button();
|
||||
this.resolveManuallyCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.procedureGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.procedureCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.procedureComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.fromGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.filterDateCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.toDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.fromDateTimePicker = new System.Windows.Forms.DateTimePicker();
|
||||
this.purchaseOrderGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.purchaseOrderCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.purchaseOrderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.queryResultsListBox = new System.Windows.Forms.ListBox();
|
||||
this.configReportButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.configButton = new System.Windows.Forms.Button();
|
||||
this.makeReportButton = new System.Windows.Forms.Button();
|
||||
this.removeFromReportButton = new System.Windows.Forms.Button();
|
||||
this.reportFileGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.browseFileButton = new System.Windows.Forms.Button();
|
||||
this.reportFileComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.makeAscFileButton = new System.Windows.Forms.Button();
|
||||
this.addOracleDataButton = new System.Windows.Forms.Button();
|
||||
this.reportListBox = new System.Windows.Forms.ListBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.batchNrGroupBox.SuspendLayout();
|
||||
this.procedureGroupBox.SuspendLayout();
|
||||
this.fromGroupBox.SuspendLayout();
|
||||
this.purchaseOrderGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
|
||||
this.splitContainer3.Panel1.SuspendLayout();
|
||||
this.splitContainer3.Panel2.SuspendLayout();
|
||||
this.splitContainer3.SuspendLayout();
|
||||
this.reportFileGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// queryBatchesButton
|
||||
//
|
||||
this.queryBatchesButton.Location = new System.Drawing.Point(15, 178);
|
||||
this.queryBatchesButton.Name = "queryBatchesButton";
|
||||
this.queryBatchesButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.queryBatchesButton.TabIndex = 3;
|
||||
this.queryBatchesButton.Text = "Query batches";
|
||||
this.queryBatchesButton.UseVisualStyleBackColor = true;
|
||||
this.queryBatchesButton.Click += new System.EventHandler(this.queryBatchesButton_Click);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryWatermetersButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.batchNrGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.removeFromQueryButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.addToReportButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.resolveManuallyCheckBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.procedureGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.fromGroupBox);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.queryBatchesButton);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.purchaseOrderGroupBox);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.queryResultsListBox);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(604, 624);
|
||||
this.splitContainer1.SplitterDistance = 220;
|
||||
this.splitContainer1.TabIndex = 5;
|
||||
//
|
||||
// queryWatermetersButton
|
||||
//
|
||||
this.queryWatermetersButton.Location = new System.Drawing.Point(129, 178);
|
||||
this.queryWatermetersButton.Name = "queryWatermetersButton";
|
||||
this.queryWatermetersButton.Size = new System.Drawing.Size(108, 29);
|
||||
this.queryWatermetersButton.TabIndex = 12;
|
||||
this.queryWatermetersButton.Text = "Query water meters";
|
||||
this.queryWatermetersButton.UseVisualStyleBackColor = true;
|
||||
this.queryWatermetersButton.Click += new System.EventHandler(this.queryWatermetersButton_Click);
|
||||
//
|
||||
// batchNrGroupBox
|
||||
//
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrToTextBox);
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrFromTextBox);
|
||||
this.batchNrGroupBox.Controls.Add(this.label4);
|
||||
this.batchNrGroupBox.Controls.Add(this.label3);
|
||||
this.batchNrGroupBox.Controls.Add(this.batchNrCheckBox);
|
||||
this.batchNrGroupBox.Location = new System.Drawing.Point(15, 122);
|
||||
this.batchNrGroupBox.Name = "batchNrGroupBox";
|
||||
this.batchNrGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.batchNrGroupBox.TabIndex = 11;
|
||||
this.batchNrGroupBox.TabStop = false;
|
||||
this.batchNrGroupBox.Visible = false;
|
||||
//
|
||||
// batchNrToTextBox
|
||||
//
|
||||
this.batchNrToTextBox.Location = new System.Drawing.Point(157, 21);
|
||||
this.batchNrToTextBox.Name = "batchNrToTextBox";
|
||||
this.batchNrToTextBox.Size = new System.Drawing.Size(62, 20);
|
||||
this.batchNrToTextBox.TabIndex = 5;
|
||||
//
|
||||
// batchNrFromTextBox
|
||||
//
|
||||
this.batchNrFromTextBox.Location = new System.Drawing.Point(56, 21);
|
||||
this.batchNrFromTextBox.Name = "batchNrFromTextBox";
|
||||
this.batchNrFromTextBox.Size = new System.Drawing.Size(62, 20);
|
||||
this.batchNrFromTextBox.TabIndex = 4;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(131, 24);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(20, 13);
|
||||
this.label4.TabIndex = 3;
|
||||
this.label4.Text = "To";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(19, 24);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(30, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "From";
|
||||
//
|
||||
// batchNrCheckBox
|
||||
//
|
||||
this.batchNrCheckBox.AutoSize = true;
|
||||
this.batchNrCheckBox.Location = new System.Drawing.Point(19, 0);
|
||||
this.batchNrCheckBox.Name = "batchNrCheckBox";
|
||||
this.batchNrCheckBox.Size = new System.Drawing.Size(116, 17);
|
||||
this.batchNrCheckBox.TabIndex = 1;
|
||||
this.batchNrCheckBox.Text = "Filter batch number";
|
||||
this.batchNrCheckBox.UseVisualStyleBackColor = true;
|
||||
this.batchNrCheckBox.Visible = false;
|
||||
//
|
||||
// removeFromQueryButton
|
||||
//
|
||||
this.removeFromQueryButton.Location = new System.Drawing.Point(326, 178);
|
||||
this.removeFromQueryButton.Name = "removeFromQueryButton";
|
||||
this.removeFromQueryButton.Size = new System.Drawing.Size(114, 29);
|
||||
this.removeFromQueryButton.TabIndex = 9;
|
||||
this.removeFromQueryButton.Text = "Remove selected";
|
||||
this.removeFromQueryButton.UseVisualStyleBackColor = true;
|
||||
this.removeFromQueryButton.Click += new System.EventHandler(this.removeFromQueryButton_Click);
|
||||
//
|
||||
// addToReportButton
|
||||
//
|
||||
this.addToReportButton.Location = new System.Drawing.Point(558, 162);
|
||||
this.addToReportButton.Name = "addToReportButton";
|
||||
this.addToReportButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.addToReportButton.TabIndex = 8;
|
||||
this.addToReportButton.Text = ">>>";
|
||||
this.addToReportButton.UseVisualStyleBackColor = true;
|
||||
this.addToReportButton.Click += new System.EventHandler(this.addToReportButton_Click);
|
||||
//
|
||||
// resolveManuallyCheckBox
|
||||
//
|
||||
this.resolveManuallyCheckBox.AutoSize = true;
|
||||
this.resolveManuallyCheckBox.Location = new System.Drawing.Point(282, 143);
|
||||
this.resolveManuallyCheckBox.Name = "resolveManuallyCheckBox";
|
||||
this.resolveManuallyCheckBox.Size = new System.Drawing.Size(158, 17);
|
||||
this.resolveManuallyCheckBox.TabIndex = 7;
|
||||
this.resolveManuallyCheckBox.Text = "Resolve duplicities manually";
|
||||
this.resolveManuallyCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// procedureGroupBox
|
||||
//
|
||||
this.procedureGroupBox.Controls.Add(this.procedureCheckBox);
|
||||
this.procedureGroupBox.Controls.Add(this.procedureComboBox);
|
||||
this.procedureGroupBox.Location = new System.Drawing.Point(15, 68);
|
||||
this.procedureGroupBox.Name = "procedureGroupBox";
|
||||
this.procedureGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.procedureGroupBox.TabIndex = 6;
|
||||
this.procedureGroupBox.TabStop = false;
|
||||
//
|
||||
// procedureCheckBox
|
||||
//
|
||||
this.procedureCheckBox.AutoSize = true;
|
||||
this.procedureCheckBox.Location = new System.Drawing.Point(19, 0);
|
||||
this.procedureCheckBox.Name = "procedureCheckBox";
|
||||
this.procedureCheckBox.Size = new System.Drawing.Size(99, 17);
|
||||
this.procedureCheckBox.TabIndex = 1;
|
||||
this.procedureCheckBox.Text = "Filter procedure";
|
||||
this.procedureCheckBox.UseVisualStyleBackColor = true;
|
||||
this.procedureCheckBox.CheckedChanged += new System.EventHandler(this.procedureCheckBox_CheckedChanged);
|
||||
//
|
||||
// procedureComboBox
|
||||
//
|
||||
this.procedureComboBox.FormattingEnabled = true;
|
||||
this.procedureComboBox.Location = new System.Drawing.Point(18, 19);
|
||||
this.procedureComboBox.Name = "procedureComboBox";
|
||||
this.procedureComboBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.procedureComboBox.TabIndex = 0;
|
||||
//
|
||||
// fromGroupBox
|
||||
//
|
||||
this.fromGroupBox.Controls.Add(this.label2);
|
||||
this.fromGroupBox.Controls.Add(this.label1);
|
||||
this.fromGroupBox.Controls.Add(this.filterDateCheckBox);
|
||||
this.fromGroupBox.Controls.Add(this.toDateTimePicker);
|
||||
this.fromGroupBox.Controls.Add(this.fromDateTimePicker);
|
||||
this.fromGroupBox.Location = new System.Drawing.Point(263, 14);
|
||||
this.fromGroupBox.Name = "fromGroupBox";
|
||||
this.fromGroupBox.Size = new System.Drawing.Size(242, 104);
|
||||
this.fromGroupBox.TabIndex = 3;
|
||||
this.fromGroupBox.TabStop = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(16, 68);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(20, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "To";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(16, 36);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(30, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "From";
|
||||
//
|
||||
// filterDateCheckBox
|
||||
//
|
||||
this.filterDateCheckBox.AutoSize = true;
|
||||
this.filterDateCheckBox.Location = new System.Drawing.Point(19, -1);
|
||||
this.filterDateCheckBox.Name = "filterDateCheckBox";
|
||||
this.filterDateCheckBox.Size = new System.Drawing.Size(72, 17);
|
||||
this.filterDateCheckBox.TabIndex = 1;
|
||||
this.filterDateCheckBox.Text = "Filter date";
|
||||
this.filterDateCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// toDateTimePicker
|
||||
//
|
||||
this.toDateTimePicker.Location = new System.Drawing.Point(68, 65);
|
||||
this.toDateTimePicker.Name = "toDateTimePicker";
|
||||
this.toDateTimePicker.Size = new System.Drawing.Size(151, 20);
|
||||
this.toDateTimePicker.TabIndex = 0;
|
||||
//
|
||||
// fromDateTimePicker
|
||||
//
|
||||
this.fromDateTimePicker.Location = new System.Drawing.Point(68, 32);
|
||||
this.fromDateTimePicker.Name = "fromDateTimePicker";
|
||||
this.fromDateTimePicker.Size = new System.Drawing.Size(151, 20);
|
||||
this.fromDateTimePicker.TabIndex = 0;
|
||||
//
|
||||
// purchaseOrderGroupBox
|
||||
//
|
||||
this.purchaseOrderGroupBox.Controls.Add(this.purchaseOrderCheckBox);
|
||||
this.purchaseOrderGroupBox.Controls.Add(this.purchaseOrderComboBox);
|
||||
this.purchaseOrderGroupBox.Location = new System.Drawing.Point(15, 14);
|
||||
this.purchaseOrderGroupBox.Name = "purchaseOrderGroupBox";
|
||||
this.purchaseOrderGroupBox.Size = new System.Drawing.Size(242, 50);
|
||||
this.purchaseOrderGroupBox.TabIndex = 2;
|
||||
this.purchaseOrderGroupBox.TabStop = false;
|
||||
//
|
||||
// purchaseOrderCheckBox
|
||||
//
|
||||
this.purchaseOrderCheckBox.AutoSize = true;
|
||||
this.purchaseOrderCheckBox.Location = new System.Drawing.Point(19, 0);
|
||||
this.purchaseOrderCheckBox.Name = "purchaseOrderCheckBox";
|
||||
this.purchaseOrderCheckBox.Size = new System.Drawing.Size(122, 17);
|
||||
this.purchaseOrderCheckBox.TabIndex = 1;
|
||||
this.purchaseOrderCheckBox.Text = "Filter purchase order";
|
||||
this.purchaseOrderCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// purchaseOrderComboBox
|
||||
//
|
||||
this.purchaseOrderComboBox.FormattingEnabled = true;
|
||||
this.purchaseOrderComboBox.Location = new System.Drawing.Point(18, 19);
|
||||
this.purchaseOrderComboBox.Name = "purchaseOrderComboBox";
|
||||
this.purchaseOrderComboBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.purchaseOrderComboBox.TabIndex = 0;
|
||||
//
|
||||
// queryResultsListBox
|
||||
//
|
||||
this.queryResultsListBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.queryResultsListBox.FormattingEnabled = true;
|
||||
this.queryResultsListBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.queryResultsListBox.Name = "queryResultsListBox";
|
||||
this.queryResultsListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
|
||||
this.queryResultsListBox.Size = new System.Drawing.Size(604, 400);
|
||||
this.queryResultsListBox.TabIndex = 0;
|
||||
//
|
||||
// configReportButton
|
||||
//
|
||||
this.configReportButton.Location = new System.Drawing.Point(226, 95);
|
||||
this.configReportButton.Name = "configReportButton";
|
||||
this.configReportButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.configReportButton.TabIndex = 5;
|
||||
this.configReportButton.Text = "Configure Report";
|
||||
this.configReportButton.UseVisualStyleBackColor = true;
|
||||
this.configReportButton.Click += new System.EventHandler(this.configReportButton_Click);
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.splitContainer1);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.splitContainer3);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(1284, 624);
|
||||
this.splitContainer2.SplitterDistance = 604;
|
||||
this.splitContainer2.TabIndex = 6;
|
||||
//
|
||||
// splitContainer3
|
||||
//
|
||||
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer3.IsSplitterFixed = true;
|
||||
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer3.Name = "splitContainer3";
|
||||
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.configButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.makeReportButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.removeFromReportButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.reportFileGroupBox);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.makeAscFileButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.addOracleDataButton);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.configReportButton);
|
||||
//
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.reportListBox);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(676, 624);
|
||||
this.splitContainer3.SplitterDistance = 220;
|
||||
this.splitContainer3.TabIndex = 6;
|
||||
//
|
||||
// configButton
|
||||
//
|
||||
this.configButton.Location = new System.Drawing.Point(589, 14);
|
||||
this.configButton.Name = "configButton";
|
||||
this.configButton.Size = new System.Drawing.Size(75, 71);
|
||||
this.configButton.TabIndex = 12;
|
||||
this.configButton.Text = "Configure";
|
||||
this.configButton.UseVisualStyleBackColor = true;
|
||||
this.configButton.Click += new System.EventHandler(this.configButton_Click);
|
||||
//
|
||||
// makeReportButton
|
||||
//
|
||||
this.makeReportButton.Location = new System.Drawing.Point(335, 95);
|
||||
this.makeReportButton.Name = "makeReportButton";
|
||||
this.makeReportButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.makeReportButton.TabIndex = 11;
|
||||
this.makeReportButton.Text = "Make Report";
|
||||
this.makeReportButton.UseVisualStyleBackColor = true;
|
||||
this.makeReportButton.Click += new System.EventHandler(this.makeReportButton_Click);
|
||||
//
|
||||
// removeFromReportButton
|
||||
//
|
||||
this.removeFromReportButton.Location = new System.Drawing.Point(58, 162);
|
||||
this.removeFromReportButton.Name = "removeFromReportButton";
|
||||
this.removeFromReportButton.Size = new System.Drawing.Size(46, 40);
|
||||
this.removeFromReportButton.TabIndex = 10;
|
||||
this.removeFromReportButton.Text = "Delete";
|
||||
this.removeFromReportButton.UseVisualStyleBackColor = true;
|
||||
this.removeFromReportButton.Click += new System.EventHandler(this.removeFromReportButton_Click);
|
||||
//
|
||||
// reportFileGroupBox
|
||||
//
|
||||
this.reportFileGroupBox.Controls.Add(this.browseFileButton);
|
||||
this.reportFileGroupBox.Controls.Add(this.reportFileComboBox);
|
||||
this.reportFileGroupBox.Location = new System.Drawing.Point(18, 14);
|
||||
this.reportFileGroupBox.Name = "reportFileGroupBox";
|
||||
this.reportFileGroupBox.Size = new System.Drawing.Size(546, 63);
|
||||
this.reportFileGroupBox.TabIndex = 8;
|
||||
this.reportFileGroupBox.TabStop = false;
|
||||
this.reportFileGroupBox.Text = "Report file name";
|
||||
//
|
||||
// browseFileButton
|
||||
//
|
||||
this.browseFileButton.Location = new System.Drawing.Point(453, 22);
|
||||
this.browseFileButton.Name = "browseFileButton";
|
||||
this.browseFileButton.Size = new System.Drawing.Size(75, 27);
|
||||
this.browseFileButton.TabIndex = 2;
|
||||
this.browseFileButton.Text = "Browse";
|
||||
this.browseFileButton.UseVisualStyleBackColor = true;
|
||||
this.browseFileButton.Click += new System.EventHandler(this.browseFileButton_Click);
|
||||
//
|
||||
// reportFileComboBox
|
||||
//
|
||||
this.reportFileComboBox.FormattingEnabled = true;
|
||||
this.reportFileComboBox.Location = new System.Drawing.Point(20, 25);
|
||||
this.reportFileComboBox.Name = "reportFileComboBox";
|
||||
this.reportFileComboBox.Size = new System.Drawing.Size(414, 21);
|
||||
this.reportFileComboBox.TabIndex = 1;
|
||||
//
|
||||
// makeAscFileButton
|
||||
//
|
||||
this.makeAscFileButton.Location = new System.Drawing.Point(443, 95);
|
||||
this.makeAscFileButton.Name = "makeAscFileButton";
|
||||
this.makeAscFileButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.makeAscFileButton.TabIndex = 7;
|
||||
this.makeAscFileButton.Text = "Make *.asc File";
|
||||
this.makeAscFileButton.UseVisualStyleBackColor = true;
|
||||
this.makeAscFileButton.Click += new System.EventHandler(this.makeAscFileButton_Click);
|
||||
//
|
||||
// addOracleDataButton
|
||||
//
|
||||
this.addOracleDataButton.Location = new System.Drawing.Point(117, 95);
|
||||
this.addOracleDataButton.Name = "addOracleDataButton";
|
||||
this.addOracleDataButton.Size = new System.Drawing.Size(103, 47);
|
||||
this.addOracleDataButton.TabIndex = 6;
|
||||
this.addOracleDataButton.Text = "Add Oracle Data";
|
||||
this.addOracleDataButton.UseVisualStyleBackColor = true;
|
||||
this.addOracleDataButton.Click += new System.EventHandler(this.addOracleDataButton_Click);
|
||||
//
|
||||
// reportListBox
|
||||
//
|
||||
this.reportListBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.reportListBox.FormattingEnabled = true;
|
||||
this.reportListBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.reportListBox.Name = "reportListBox";
|
||||
this.reportListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
|
||||
this.reportListBox.Size = new System.Drawing.Size(676, 400);
|
||||
this.reportListBox.TabIndex = 0;
|
||||
//
|
||||
// MainWnd
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1284, 624);
|
||||
this.Controls.Add(this.splitContainer2);
|
||||
this.Name = "MainWnd";
|
||||
this.Text = "Form1";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWnd_FormClosing);
|
||||
this.Load += new System.EventHandler(this.MainWnd_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.batchNrGroupBox.ResumeLayout(false);
|
||||
this.batchNrGroupBox.PerformLayout();
|
||||
this.procedureGroupBox.ResumeLayout(false);
|
||||
this.procedureGroupBox.PerformLayout();
|
||||
this.fromGroupBox.ResumeLayout(false);
|
||||
this.fromGroupBox.PerformLayout();
|
||||
this.purchaseOrderGroupBox.ResumeLayout(false);
|
||||
this.purchaseOrderGroupBox.PerformLayout();
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.splitContainer3.Panel1.ResumeLayout(false);
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
this.reportFileGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button queryButton;
|
||||
private System.Windows.Forms.Button queryBatchesButton;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.GroupBox fromGroupBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
@ -517,8 +531,7 @@
|
||||
private System.Windows.Forms.DateTimePicker fromDateTimePicker;
|
||||
private System.Windows.Forms.GroupBox purchaseOrderGroupBox;
|
||||
private System.Windows.Forms.CheckBox purchaseOrderCheckBox;
|
||||
private System.Windows.Forms.ComboBox purchaseOrderComboBox;
|
||||
private System.Windows.Forms.Button clearButton;
|
||||
private System.Windows.Forms.ComboBox purchaseOrderComboBox;
|
||||
private System.Windows.Forms.Button configReportButton;
|
||||
private System.Windows.Forms.CheckBox resolveManuallyCheckBox;
|
||||
private System.Windows.Forms.GroupBox procedureGroupBox;
|
||||
@ -543,6 +556,8 @@
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.CheckBox batchNrCheckBox;
|
||||
private System.Windows.Forms.Button makeReportButton;
|
||||
private System.Windows.Forms.Button configButton;
|
||||
private System.Windows.Forms.Button queryWatermetersButton;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,8 +10,7 @@ using log4net;
|
||||
using NHibernate;
|
||||
using Oracle.DataAccess.Client; // ODP.NET Oracle managed provider
|
||||
using Oracle.DataAccess.Types;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
|
||||
namespace ResultsBrowser
|
||||
{
|
||||
@ -19,13 +18,27 @@ namespace ResultsBrowser
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(MainWnd));
|
||||
|
||||
public IList<ResultItemSpec> ReportItems_Single;
|
||||
public IList<ResultItemSpec> ReportItems_Compound;
|
||||
bool batchesQueried;
|
||||
|
||||
public static IList<Batch> QueryBatches;
|
||||
public static IList<WaterMeter> QueryWaterMeters;
|
||||
|
||||
public static IList<Batch> ReportBatches;
|
||||
public static IList<WaterMeter> ReportWaterMeters;
|
||||
|
||||
public IList<Results.ItemSpec> ReportItems_Single;
|
||||
public IList<Results.ItemSpec> ReportItems_Compound;
|
||||
|
||||
|
||||
public MainWnd()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
QueryBatches = new List<Batch>();
|
||||
QueryWaterMeters = new List<WaterMeter>();
|
||||
|
||||
ReportBatches = new List<Batch>();
|
||||
ReportWaterMeters = new List<WaterMeter>();
|
||||
}
|
||||
|
||||
private void MainWnd_Load(object sender, EventArgs e)
|
||||
@ -34,8 +47,8 @@ namespace ResultsBrowser
|
||||
PrepareComboBoxHistory(Program.LocalSettings.ProcedureHistory, procedureComboBox);
|
||||
PrepareComboBoxHistory(Program.LocalSettings.ReportFileNameHistory, reportFileComboBox);
|
||||
|
||||
ReportItems_Single = ResultItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Single);
|
||||
ReportItems_Compound = ResultItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Compound);
|
||||
ReportItems_Single = Results.ItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Single);
|
||||
ReportItems_Compound = Results.ItemSpec.FromStrArray(Program.LocalSettings.ReportItems_Compound);
|
||||
|
||||
purchaseOrderCheckBox.Checked = Program.LocalSettings.FilterPurchaseOrder;
|
||||
procedureCheckBox.Checked = Program.LocalSettings.FilterProcedure;
|
||||
@ -46,6 +59,8 @@ namespace ResultsBrowser
|
||||
|
||||
batchNrFromTextBox.Text = Program.LocalSettings.BatchFrom;
|
||||
batchNrToTextBox.Text = Program.LocalSettings.BatchTo;
|
||||
|
||||
Results.DB.ConnectionString = Program.LocalSettings.ConnectionString_WR10;
|
||||
}
|
||||
|
||||
private void MainWnd_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@ -54,8 +69,8 @@ namespace ResultsBrowser
|
||||
Program.LocalSettings.UpdateHistory(procedureComboBox.Text, ref Program.LocalSettings.PurchaseOrderHistory);
|
||||
Program.LocalSettings.UpdateHistory(reportFileComboBox.Text, ref Program.LocalSettings.ReportFileNameHistory);
|
||||
|
||||
Program.LocalSettings.ReportItems_Single = ResultItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = ResultItemSpec.ToStrArray(ReportItems_Compound);
|
||||
Program.LocalSettings.ReportItems_Single = Results.ItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = Results.ItemSpec.ToStrArray(ReportItems_Compound);
|
||||
|
||||
Program.LocalSettings.FilterPurchaseOrder = purchaseOrderCheckBox.Checked;
|
||||
Program.LocalSettings.FilterProcedure = procedureCheckBox.Checked;
|
||||
@ -73,10 +88,10 @@ namespace ResultsBrowser
|
||||
void RedrawLists()
|
||||
{
|
||||
queryResultsListBox.Items.Clear();
|
||||
foreach (var wmr in DataDeposit.QueryWaterMeterResults) queryResultsListBox.Items.Add(wmr);
|
||||
foreach (var wmr in QueryWaterMeters) queryResultsListBox.Items.Add(wmr);
|
||||
|
||||
reportListBox.Items.Clear();
|
||||
foreach (var wmr in DataDeposit.ReportWaterMeterResults) reportListBox.Items.Add(wmr);
|
||||
foreach (var wmr in ReportWaterMeters) reportListBox.Items.Add(wmr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -106,140 +121,14 @@ namespace ResultsBrowser
|
||||
procedureComboBox.Enabled = procedureCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void queryButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked &&
|
||||
!procedureCheckBox.Checked &&
|
||||
!filterDateCheckBox.Checked &&
|
||||
!batchNrCheckBox.Checked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = FluentCommon.CreateSession(DBKind.Config);
|
||||
|
||||
IList<TestResult> testResults;
|
||||
IList<TestResult> partialTestResults;
|
||||
|
||||
if (batchNrCheckBox.Checked)
|
||||
{
|
||||
int from, to;
|
||||
if (!int.TryParse(batchNrFromTextBox.Text, out from) || !int.TryParse(batchNrToTextBox.Text, out to) || from > to)
|
||||
{
|
||||
MessageBox.Show("Please check 'From' and 'To' values", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = new List<TestResult>();
|
||||
for (int batch = from; batch <= to; batch++)
|
||||
{
|
||||
IQueryOver<TestResult> qo = session.QueryOver<TestResult>().Where(x => (x.BatchNr == batch));
|
||||
//if (procedureCheckBox.Checked) qo = qo.Where(x => (x.ProcedureName == "IPRT02AB - MI120 - Q2s"));
|
||||
partialTestResults = qo.List<TestResult>();
|
||||
|
||||
foreach (var tr in partialTestResults) testResults.Add(tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (procedureCheckBox.Checked)
|
||||
{
|
||||
if (filterDateCheckBox.Checked)
|
||||
{
|
||||
if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.Where(x => (x.ProcedureName == procedureComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else if (!filterDateCheckBox.Checked)
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
else
|
||||
{
|
||||
testResults = session.QueryOver<TestResult>()
|
||||
.WhereRestrictionOn(x => x.TimeStart)
|
||||
.IsBetween(fromDateTimePicker.Value)
|
||||
.And(toDateTimePicker.Value)
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderComboBox.Text))
|
||||
.OrderBy(x => x.BatchNr).Desc
|
||||
.List<TestResult>();
|
||||
}
|
||||
}
|
||||
|
||||
DataDeposit.ProcessQueryTestResults(testResults, resolveManuallyCheckBox.Checked);
|
||||
|
||||
int cnt = 1;
|
||||
foreach (var wm in DataDeposit.QueryWaterMeterResults)
|
||||
{
|
||||
queryResultsListBox.Items.Add(cnt.ToString() + " " + wm.ToString());
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataDeposit.QueryWaterMeterResults.Clear();
|
||||
QueryWaterMeters.Clear();
|
||||
queryResultsListBox.Items.Clear();
|
||||
}
|
||||
|
||||
|
||||
private void configReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Forms.ResultsConfig dlg = new Forms.ResultsConfig(false);
|
||||
@ -252,36 +141,53 @@ namespace ResultsBrowser
|
||||
ReportItems_Single = dlg.ReportItems_Single;
|
||||
ReportItems_Compound = dlg.ReportItems_Compound;
|
||||
|
||||
Program.LocalSettings.ReportItems_Single = ResultItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = ResultItemSpec.ToStrArray(ReportItems_Compound);
|
||||
Program.LocalSettings.ReportItems_Single = Results.ItemSpec.ToStrArray(ReportItems_Single);
|
||||
Program.LocalSettings.ReportItems_Compound = Results.ItemSpec.ToStrArray(ReportItems_Compound);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void removeFromQueryButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Remove from the list (the last selected item first so that the indexes are not affected)
|
||||
for (int i = queryResultsListBox.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
{
|
||||
DataDeposit.QueryWaterMeterResults.RemoveAt(queryResultsListBox.SelectedIndices[i]);
|
||||
QueryWaterMeters.RemoveAt(queryResultsListBox.SelectedIndices[i]);
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
}
|
||||
|
||||
|
||||
private void removeFromReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
/// Remove from the list (the last selected item first so that the indexes are not affected)
|
||||
for (int i = reportListBox.SelectedIndices.Count - 1; i >= 0; i--)
|
||||
{
|
||||
DataDeposit.ReportWaterMeterResults.RemoveAt(reportListBox.SelectedIndices[i]);
|
||||
ReportWaterMeters.RemoveAt(reportListBox.SelectedIndices[i]);
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
}
|
||||
|
||||
|
||||
private void addToReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataDeposit.AddQueryToReport();
|
||||
if (batchesQueried)
|
||||
{
|
||||
foreach (var b in QueryBatches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) ReportWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wm in QueryWaterMeters)
|
||||
{
|
||||
if (!ReportWaterMeters.Contains(wm)) ReportWaterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
|
||||
RedrawLists();
|
||||
}
|
||||
|
||||
@ -296,13 +202,14 @@ namespace ResultsBrowser
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void addOracleDataButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
#if IPERLST
|
||||
if (DataDeposit.ReportWaterMeterResults.Count == 0) return;
|
||||
if (ReportWaterMeters.Count == 0) return;
|
||||
|
||||
const int Step = 100;
|
||||
for (int i = 0; i < DataDeposit.ReportWaterMeterResults.Count; i += Step)
|
||||
for (int i = 0; i < ReportWaterMeters.Count; i += Step)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -310,9 +217,9 @@ namespace ResultsBrowser
|
||||
OracleConnection conn = new OracleConnection("Data Source=STARA01.WORLD;User Id=deltachef;Password=deltachef;");
|
||||
conn.Open();
|
||||
|
||||
for (int j = i; j < Math.Min(j + Step, DataDeposit.ReportWaterMeterResults.Count); j++)
|
||||
for (int j = i; j < Math.Min(j + Step, ReportWaterMeters.Count); j++)
|
||||
{
|
||||
Results.Entities.WaterMeter wm = DataDeposit.ReportWaterMeterResults[j];
|
||||
Results.Entities.WaterMeter wm = ReportWaterMeters[j];
|
||||
|
||||
IList<int> serialNrExes = new List<int>();
|
||||
{
|
||||
@ -347,6 +254,12 @@ namespace ResultsBrowser
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create ASC file in R.Uhlik format
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void makeAscFileButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reportFileComboBox.Text))
|
||||
@ -360,22 +273,10 @@ namespace ResultsBrowser
|
||||
MessageBox.Show("Please, configure the report first", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
Forms.AdditionalDataDlg dlg = new Forms.AdditionalDataDlg();
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
foreach (var wm in DataDeposit.ReportWaterMeterResults)
|
||||
{
|
||||
/// TODO: Rewrite
|
||||
//wm.Type = dlg.Type;
|
||||
//wm.ApprovalInfo() = dlg.TypeApproval;
|
||||
//wm.MetrologicalClass = dlg.MetrologicalClass;
|
||||
}
|
||||
}
|
||||
|
||||
using (TextWriter report = new StreamWriter(reportFileComboBox.Text, true))
|
||||
{
|
||||
foreach (var wm in DataDeposit.ReportWaterMeterResults)
|
||||
foreach (var wm in ReportWaterMeters)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -390,15 +291,15 @@ namespace ResultsBrowser
|
||||
sb.Append(';'); sb.Append(wm.ApprovalInfo());
|
||||
sb.Append(';'); sb.Append(wm.MetrologicalClass());
|
||||
sb.Append(';'); sb.Append("0");
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("q1") != null ? wm.GetTestRslt("q1").Qfrom() : 0)).ToString("F0")); /// Q1 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("q2") != null ? wm.GetTestRslt("q2").Qfrom() : 0)).ToString("F0")); /// Q2 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("q3") != null ? wm.GetTestRslt("q3").Qto() : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q1") != null ? wm.GetTestRslt("Q1").Qfrom() : 0)).ToString("F0")); /// Q1 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q2") != null ? wm.GetTestRslt("Q2").Qfrom() : 0)).ToString("F0")); /// Q2 nominal
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("Q3") != null ? wm.GetTestRslt("Q3").Qto() : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append("0"); /// Q4 nominal
|
||||
sb.Append(';'); sb.Append("6"); /// Worker code
|
||||
sb.Append(';'); sb.Append(ToShortStr(wm.EndTime()));
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q1") != null ? wm.GetMeterTestRslt("q1").Error : 99).ToString("F1")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q2") != null ? wm.GetMeterTestRslt("q2").Error : 99).ToString("F1")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q3") != null ? wm.GetMeterTestRslt("q3").Error : 99).ToString("F1")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q1") != null ? wm.GetMeterTestRslt("Q1").Error : 99).ToString("F1")); /// Q1 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q2") != null ? wm.GetMeterTestRslt("Q2").Error : 99).ToString("F1")); /// Q2 Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("Q3") != null ? wm.GetMeterTestRslt("Q3").Error : 99).ToString("F1")); /// Q3 Error [%]
|
||||
sb.Append(';'); sb.Append("0"); /// Q4 Error [%]
|
||||
sb.Append(';'); sb.Append(wm.BenchId().ToString()); ///
|
||||
sb.Append(';'); sb.Append(wm.PurchaseOrder);
|
||||
@ -419,11 +320,13 @@ namespace ResultsBrowser
|
||||
MessageBox.Show("Report saved", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
|
||||
static string ToShortStr(DateTime date)
|
||||
{
|
||||
return (((date.Year % 100) * 100 + date.Month) * 100 + date.Day).ToString();
|
||||
}
|
||||
|
||||
|
||||
private void makeReportButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reportFileComboBox.Text))
|
||||
@ -440,7 +343,7 @@ namespace ResultsBrowser
|
||||
|
||||
using (TextWriter report = new StreamWriter(reportFileComboBox.Text, true))
|
||||
{
|
||||
foreach (var wm in DataDeposit.ReportWaterMeterResults)
|
||||
foreach (var wm in ReportWaterMeters)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -451,8 +354,8 @@ namespace ResultsBrowser
|
||||
#else
|
||||
sb.Append(wm.SerialNr);
|
||||
#endif
|
||||
sb.Append(";\""); sb.Append(wm.SerialNr); sb.Append('"'); /// PCB number
|
||||
sb.Append(";\""); sb.Append(wm.ProcedureName()); sb.Append('"'); /// Procedure name
|
||||
sb.Append(";\""); sb.Append(wm.SerialNr); sb.Append('"'); /// PCB number
|
||||
sb.Append(";\""); sb.Append(wm.ProcedureName()); sb.Append('"'); /// Procedure name
|
||||
sb.Append(';'); sb.Append((1000 * (wm.GetTestRslt("q3") != null ? wm.GetTestRslt("q3").Qto() : 0)).ToString("F0")); /// Q3 nominal
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("adjustment") != null ? wm.GetMeterTestRslt("adjustment").Error : 99).ToString("F2"));/// Adjustment Error [%]
|
||||
sb.Append(';'); sb.Append((wm.GetMeterTestRslt("q3") != null ? wm.GetMeterTestRslt("q1").Error : 99).ToString("F2")); /// Q1 Error [%]
|
||||
@ -472,5 +375,180 @@ namespace ResultsBrowser
|
||||
|
||||
MessageBox.Show("Report saved", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
|
||||
private void configButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if ((new Forms.DatabaseSettings()).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Results.DB.ConnectionString = Program.LocalSettings.ConnectionString_WR10;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void queryBatchesButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked && !procedureCheckBox.Checked &&
|
||||
!filterDateCheckBox.Checked && !batchNrCheckBox.Checked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
queryResultsListBox.Items.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
ISession session = Results.DB.CreateSession();
|
||||
|
||||
IList<Batch> batches;
|
||||
|
||||
if (filterDateCheckBox.Checked)
|
||||
{
|
||||
batches = session.QueryOver<Batch>()
|
||||
.WhereRestrictionOn(x => x.EndTime)
|
||||
.IsBetween(fromDateTimePicker.Value.Date)
|
||||
.And(toDateTimePicker.Value.Date.AddDays(1).AddTicks(-1))
|
||||
//.OrderBy(x => x.BatchNr).Asc
|
||||
.List<Batch>();
|
||||
}
|
||||
else
|
||||
{
|
||||
batches = session.QueryOver<Batch>()
|
||||
.List<Batch>();
|
||||
}
|
||||
|
||||
if (procedureCheckBox.Checked)
|
||||
{
|
||||
IList<Batch> batches2 = new List<Batch>();
|
||||
foreach (var b in batches)
|
||||
{
|
||||
if (b.ProcedureName.Equals(procedureCheckBox.Text)) batches2.Add(b);
|
||||
}
|
||||
batches = batches2;
|
||||
}
|
||||
|
||||
if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
IList<Batch> batches3 = new List<Batch>();
|
||||
foreach (var b in batches)
|
||||
{
|
||||
if (b.WaterMeters[0].PurchaseOrder.Equals(purchaseOrderCheckBox.Text)) batches3.Add(b);
|
||||
}
|
||||
batches = batches3;
|
||||
}
|
||||
|
||||
QueryBatches = batches;
|
||||
///
|
||||
queryResultsListBox.Items.Clear();
|
||||
bool anyItem = false;
|
||||
foreach (var b in QueryBatches)
|
||||
{
|
||||
queryResultsListBox.Items.Add(b.ToString());
|
||||
anyItem = true;
|
||||
}
|
||||
if (!anyItem) queryResultsListBox.Items.Add("<empty>");
|
||||
///
|
||||
batchesQueried = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void queryWatermetersButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!purchaseOrderCheckBox.Checked && !procedureCheckBox.Checked &&
|
||||
!filterDateCheckBox.Checked && !batchNrCheckBox.Checked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
queryResultsListBox.Items.Clear();
|
||||
|
||||
try
|
||||
{
|
||||
bool purchaseOrderFiltered = false;
|
||||
bool procedureFiltered = false;
|
||||
|
||||
ISession session = Results.DB.CreateSession();
|
||||
|
||||
IList<WaterMeter> waterMeters;
|
||||
|
||||
if (filterDateCheckBox.Checked)
|
||||
{
|
||||
IList<Batch> batches = session.QueryOver<Batch>()
|
||||
.WhereRestrictionOn(x => x.EndTime)
|
||||
.IsBetween(fromDateTimePicker.Value.Date)
|
||||
.And(toDateTimePicker.Value.Date.AddDays(1).AddTicks(-1))
|
||||
//.OrderBy(x => x.BatchNr).Asc
|
||||
.List<Batch>();
|
||||
|
||||
waterMeters = new List<WaterMeter>();
|
||||
foreach (var b in batches)
|
||||
{
|
||||
foreach (var wm in b.WaterMeters) waterMeters.Add(wm);
|
||||
}
|
||||
}
|
||||
else if (purchaseOrderCheckBox.Checked)
|
||||
{
|
||||
waterMeters = session.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.PurchaseOrder == purchaseOrderCheckBox.Text))
|
||||
.List<WaterMeter>();
|
||||
purchaseOrderFiltered = true;
|
||||
}
|
||||
else if (procedureCheckBox.Checked && !procedureFiltered)
|
||||
{
|
||||
waterMeters = session.QueryOver<WaterMeter>()
|
||||
.Where(x => (x.Batch.ProcedureName == procedureComboBox.Text))
|
||||
.List<WaterMeter>();
|
||||
procedureFiltered = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
waterMeters = session.QueryOver<WaterMeter>().List<WaterMeter>();
|
||||
}
|
||||
|
||||
|
||||
if (purchaseOrderCheckBox.Checked && !purchaseOrderFiltered)
|
||||
{
|
||||
IList<WaterMeter> waterMeters3 = new List<WaterMeter>();
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.PurchaseOrder.Equals(purchaseOrderCheckBox.Text)) waterMeters3.Add(wm);
|
||||
}
|
||||
waterMeters = waterMeters3;
|
||||
purchaseOrderFiltered = true;
|
||||
}
|
||||
|
||||
if (procedureCheckBox.Checked && !procedureFiltered)
|
||||
{
|
||||
IList<WaterMeter> waterMeters2 = new List<WaterMeter>();
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
if (wm.Batch.ProcedureName.Equals(procedureCheckBox.Text)) waterMeters2.Add(wm);
|
||||
}
|
||||
waterMeters = waterMeters2;
|
||||
procedureFiltered = true;
|
||||
}
|
||||
|
||||
QueryWaterMeters = waterMeters;
|
||||
///
|
||||
bool anyItem = false;
|
||||
foreach (var wm in QueryWaterMeters)
|
||||
{
|
||||
queryResultsListBox.Items.Add(wm.ToString());
|
||||
anyItem = true;
|
||||
}
|
||||
if (!anyItem) queryResultsListBox.Items.Add("<empty>");
|
||||
///
|
||||
batchesQueried = false;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,11 +83,11 @@ namespace ResultsBrowser
|
||||
/// Load the local settings
|
||||
///
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (LocalSettings == null || LocalSettings.TestBenches == null)
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
/// Loading local seetings from regular config file failed. Use the backup
|
||||
LocalSettings = LocalSettings.Load(Program.LocalSettingsBackupName);
|
||||
if (LocalSettings == null || LocalSettings.TestBenches == null)
|
||||
if (LocalSettings == null)
|
||||
{
|
||||
if (MessageBox.Show("No program settings found. Do you want to use default settings?",
|
||||
"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||
@ -126,131 +126,12 @@ namespace ResultsBrowser
|
||||
//AltCulture = null;
|
||||
AltCulture = new System.Globalization.CultureInfo("SK");
|
||||
|
||||
|
||||
/// This belongs to Application.Run(new MainWnd()) ...
|
||||
/// and should be executed before opening 'loginDlg'
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
/// Ensure that there is at least one bench in the configuration
|
||||
while (Program.LocalSettings.BenchesCount == 0)
|
||||
{
|
||||
log.Warn("No test benches in the local configuration -> display an appropriate dialog.");
|
||||
|
||||
/// Ask what to do, ask for the password, open 'DatabaseSetingsDlg' and continue on OK
|
||||
if ((new Forms.NoBenchOrDatabaseDlg { Message = "No test bench in the program configuration." }.ShowDialog() != DialogResult.OK) ||
|
||||
(new LoginDlg(true).ShowDialog() == DialogResult.Cancel) ||
|
||||
(new BenchesDlg().ShowDialog() == DialogResult.Cancel))
|
||||
{
|
||||
return; /// Exit program
|
||||
}
|
||||
|
||||
log.Warn("Loading the local settings again.");
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (Program.LocalSettings == null) return; /// Fatal error
|
||||
}
|
||||
|
||||
/// User login
|
||||
bool retryLogin = true; /// true = stay in a login loop
|
||||
do
|
||||
{
|
||||
LoginDlgWithBenchSelection loginDlgBench;
|
||||
if (LocalSettings.LastBenchName != null)
|
||||
{
|
||||
loginDlgBench = new LoginDlgWithBenchSelection(LocalSettings.LastBenchName);
|
||||
}
|
||||
else
|
||||
{
|
||||
loginDlgBench = new LoginDlgWithBenchSelection();
|
||||
}
|
||||
DialogResult dr = loginDlgBench.ShowDialog();
|
||||
|
||||
if (dr == DialogResult.Cancel)
|
||||
{
|
||||
return; /// Login canceled --> Exit application
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < LocalSettings.BenchesCount; i++)
|
||||
{
|
||||
if (LocalSettings.TestBenches[i].BenchName == loginDlgBench.BenchName)
|
||||
{
|
||||
User loadedUser = null;
|
||||
try
|
||||
{
|
||||
bool authorized = false;
|
||||
|
||||
if (User.IsPowerUser(loginDlgBench.User, loginDlgBench.Password))
|
||||
{
|
||||
loadedUser = new User(loginDlgBench.User);
|
||||
authorized = loadedUser.Authorize(loginDlgBench.User, loginDlgBench.Password);
|
||||
}
|
||||
|
||||
if (!authorized)
|
||||
{
|
||||
/// Load user from the UsersAndGroupsDB database
|
||||
loadedUser = User.LoadUserByName(loginDlgBench.User,
|
||||
LocalSettings.TestBenches[i].ProceduresDBSettings);
|
||||
if (loadedUser != null)
|
||||
{
|
||||
authorized = loadedUser.Authorize(loginDlgBench.User, loginDlgBench.Password);
|
||||
}
|
||||
}
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
log.InfoFormat("Password accepted, bench '{0}' parameters loaded.", LocalSettings.TestBenches[i].BenchName);
|
||||
|
||||
/// Copy the selected bench settings to CurrentBench.
|
||||
/// Clone() guarantees that current bench settings wont be modified
|
||||
/// when user modifies the database settings in DatabaseSettingsDlg.
|
||||
Config.Data.CurrentBench = (Config.DatabaseSettings)LocalSettings.TestBenches[i].Clone();
|
||||
|
||||
/// Save the selection to local settings
|
||||
LocalSettings.LastBenchName = Config.Data.CurrentBench.BenchName;
|
||||
LocalSettings.Save();
|
||||
|
||||
Results.DB.DbType = Config.Data.CurrentBench.WaterMetersDBSettings.DbType;
|
||||
Results.DB.ConnectionString = Config.Data.CurrentBench.WaterMetersDBSettings.ConnectionString;
|
||||
|
||||
retryLogin = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (retryLogin)
|
||||
{
|
||||
/// Close Fluent NHibernate
|
||||
MessageBox.Show("Invalid user, password, or bench", "Error", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
/// Database connect failed, ask what to do
|
||||
switch ((new Forms.NoBenchOrDatabaseDlg { Message = "Cannot connect to the database.", ShowRetry = true }).ShowDialog())
|
||||
{
|
||||
case DialogResult.Abort:
|
||||
return; /// Exit program
|
||||
///
|
||||
case DialogResult.Retry:
|
||||
break; /// Retry the loop
|
||||
///
|
||||
default:
|
||||
/// Open 'DatabaseSetingsDlg' and retry DB connect on OK
|
||||
if (new LoginDlg(true).ShowDialog() == DialogResult.Cancel ||
|
||||
new BenchesDlg().ShowDialog() == DialogResult.Cancel)
|
||||
{
|
||||
return; /// Exit program
|
||||
}
|
||||
Program.LocalSettings = LocalSettings.Load(Program.LocalSettingsFileName);
|
||||
if (Program.LocalSettings == null) return; /// Fatal error
|
||||
break; /// Retry the loop
|
||||
}
|
||||
}
|
||||
} // if benchname is OK
|
||||
} // for all benches in local settings loop
|
||||
} // not Canceled
|
||||
} //do
|
||||
while (retryLogin);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -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.1.182.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.182.0")]
|
||||
[assembly: AssemblyVersion("2.1.186.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.186.0")]
|
||||
|
||||
@ -73,36 +73,11 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BenchesDlg.cs">
|
||||
<Compile Include="Forms\DatabaseSettings.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BenchesDlg.designer.cs">
|
||||
<DependentUpon>BenchesDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataDeposit.cs" />
|
||||
<Compile Include="Forms\AdditionalDataDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AdditionalDataDlg.Designer.cs">
|
||||
<DependentUpon>AdditionalDataDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\DatabaseSettingsDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\DatabaseSettingsDlg.designer.cs">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlg.designer.cs">
|
||||
<DependentUpon>LoginDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlgWithBenchSelection.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlgWithBenchSelection.designer.cs">
|
||||
<DependentUpon>LoginDlgWithBenchSelection.cs</DependentUpon>
|
||||
<Compile Include="Forms\DatabaseSettings.Designer.cs">
|
||||
<DependentUpon>DatabaseSettings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NoBenchOrDatabaseDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
@ -126,20 +101,8 @@
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs" />
|
||||
<EmbeddedResource Include="BenchesDlg.resx">
|
||||
<DependentUpon>BenchesDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\AdditionalDataDlg.resx">
|
||||
<DependentUpon>AdditionalDataDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\DatabaseSettingsDlg.resx">
|
||||
<DependentUpon>DatabaseSettingsDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\LoginDlg.resx">
|
||||
<DependentUpon>LoginDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\LoginDlgWithBenchSelection.resx">
|
||||
<DependentUpon>LoginDlgWithBenchSelection.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Forms\DatabaseSettings.resx">
|
||||
<DependentUpon>DatabaseSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\NoBenchOrDatabaseDlg.resx">
|
||||
<DependentUpon>NoBenchOrDatabaseDlg.cs</DependentUpon>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user