diff --git a/ResultsBrowser/Filters/DateFilter.Designer.cs b/ResultsBrowser/Filters/DateFilter.Designer.cs
new file mode 100644
index 000000000..bcc6d0ec5
--- /dev/null
+++ b/ResultsBrowser/Filters/DateFilter.Designer.cs
@@ -0,0 +1,106 @@
+namespace ResultsBrowser.Filters
+{
+ partial class DateFilter
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.toLabel = new System.Windows.Forms.Label();
+ this.toDateTimePicker = new System.Windows.Forms.DateTimePicker();
+ this.fromLabel = new System.Windows.Forms.Label();
+ this.fromDateTimePicker = new System.Windows.Forms.DateTimePicker();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.toLabel);
+ this.groupBox1.Controls.Add(this.toDateTimePicker);
+ this.groupBox1.Controls.Add(this.fromLabel);
+ this.groupBox1.Controls.Add(this.fromDateTimePicker);
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(0, 0);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(835, 40);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Date";
+ //
+ // toLabel
+ //
+ this.toLabel.AutoSize = true;
+ this.toLabel.Location = new System.Drawing.Point(390, 16);
+ this.toLabel.Name = "toLabel";
+ this.toLabel.Size = new System.Drawing.Size(20, 13);
+ this.toLabel.TabIndex = 6;
+ this.toLabel.Text = "To";
+ //
+ // toDateTimePicker
+ //
+ this.toDateTimePicker.Location = new System.Drawing.Point(430, 13);
+ this.toDateTimePicker.Name = "toDateTimePicker";
+ this.toDateTimePicker.Size = new System.Drawing.Size(151, 20);
+ this.toDateTimePicker.TabIndex = 5;
+ //
+ // fromLabel
+ //
+ this.fromLabel.AutoSize = true;
+ this.fromLabel.Location = new System.Drawing.Point(128, 17);
+ this.fromLabel.Name = "fromLabel";
+ this.fromLabel.Size = new System.Drawing.Size(30, 13);
+ this.fromLabel.TabIndex = 4;
+ this.fromLabel.Text = "From";
+ //
+ // fromDateTimePicker
+ //
+ this.fromDateTimePicker.Location = new System.Drawing.Point(168, 13);
+ this.fromDateTimePicker.Name = "fromDateTimePicker";
+ this.fromDateTimePicker.Size = new System.Drawing.Size(151, 20);
+ this.fromDateTimePicker.TabIndex = 3;
+ //
+ // DateFilter
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox1);
+ this.Name = "DateFilter";
+ this.Size = new System.Drawing.Size(835, 40);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Label fromLabel;
+ private System.Windows.Forms.DateTimePicker fromDateTimePicker;
+ private System.Windows.Forms.Label toLabel;
+ private System.Windows.Forms.DateTimePicker toDateTimePicker;
+ }
+}
diff --git a/ResultsBrowser/Filters/DateFilter.cs b/ResultsBrowser/Filters/DateFilter.cs
new file mode 100644
index 000000000..41f717489
--- /dev/null
+++ b/ResultsBrowser/Filters/DateFilter.cs
@@ -0,0 +1,60 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Xml.Serialization;
+
+namespace ResultsBrowser.Filters
+{
+ public partial class DateFilter : UserControl, IFilter
+ {
+ public static string GetFilterName() { return "Date"; }
+ public string GetThisFilterName() { return "Date"; }
+
+ public DateTime From;
+ public DateTime To;
+
+ public DateFilter()
+ {
+ InitializeComponent();
+ Localize();
+ }
+
+ void Localize()
+ {
+ groupBox1.Text = "Date";
+ fromLabel.Text = "From";
+ toLabel.Text = "To";
+ }
+
+ public void Data2UI()
+ {
+ fromDateTimePicker.Value = From;
+ toDateTimePicker.Value = To;
+ }
+
+ public void UI2Data()
+ {
+ From = fromDateTimePicker.Value;
+ To = toDateTimePicker.Value;
+ }
+
+ ///
+ /// Save public fields of this class to the XML string.
+ ///
+ public void Save(StringBuilder sb)
+ {
+ try
+ {
+ using (TextWriter writer = new StringWriter(sb))
+ {
+ (new XmlSerializer(typeof(DateFilter))).Serialize(writer, this);
+ }
+ }
+ catch (Exception e)
+ {
+ string msg = e.Message;
+ }
+ }
+ }
+}
diff --git a/ResultsBrowser/Filters/DateFilter.resx b/ResultsBrowser/Filters/DateFilter.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/ResultsBrowser/Filters/DateFilter.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ResultsBrowser/Filters/Factory.cs b/ResultsBrowser/Filters/Factory.cs
new file mode 100644
index 000000000..7178dc4cf
--- /dev/null
+++ b/ResultsBrowser/Filters/Factory.cs
@@ -0,0 +1,61 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace ResultsBrowser.Filters
+{
+ static class Factory
+ {
+ public static readonly string[] List;
+ public static readonly int Count;
+
+
+ static Factory()
+ {
+ List = new string[]
+ {
+ DateFilter.GetFilterName(),
+ ProcedureFilter.GetFilterName(),
+ SerialNrFilter.GetFilterName(),
+ };
+
+ Count = List.Length;
+ }
+
+
+ public static IFilter GetFilter(string filterName)
+ {
+ if (filterName == DateFilter.GetFilterName()) return new DateFilter();
+ else if (filterName == ProcedureFilter.GetFilterName()) return new ProcedureFilter();
+ else if (filterName == SerialNrFilter.GetFilterName()) return new SerialNrFilter();
+ else return null;
+ }
+
+
+ public static IFilter LoadFilter(string filterName, string serialized)
+ {
+ Type filterType;
+
+ if (filterName == DateFilter.GetFilterName()) filterType = Type.GetType("DateFilter");
+ else if (filterName == ProcedureFilter.GetFilterName()) filterType = Type.GetType("ProcedureFilter");
+ else if (filterName == SerialNrFilter.GetFilterName()) filterType = Type.GetType("SerialNrFilter");
+ else return null;
+
+ try
+ {
+ using (TextReader reader = new StringReader(serialized))
+ {
+ IFilter filter = (new XmlSerializer(filterType)).Deserialize(reader) as IFilter;
+ filter.Data2UI();
+ return filter;
+ }
+ }
+ catch (Exception e)
+ {
+ string msg = e.Message;
+ return null;
+ }
+ }
+ }
+}
diff --git a/ResultsBrowser/Filters/IFilter.cs b/ResultsBrowser/Filters/IFilter.cs
new file mode 100644
index 000000000..6e99d5a46
--- /dev/null
+++ b/ResultsBrowser/Filters/IFilter.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ResultsBrowser.Filters
+{
+ public interface IFilter
+ {
+ string GetThisFilterName();
+ void Data2UI();
+ void UI2Data(); /// Throws an exception with appropriate message if UI data are invalid
+ void Save(StringBuilder sb);
+ }
+}
diff --git a/ResultsBrowser/Filters/ProcedureFilter.Designer.cs b/ResultsBrowser/Filters/ProcedureFilter.Designer.cs
new file mode 100644
index 000000000..c2f180de4
--- /dev/null
+++ b/ResultsBrowser/Filters/ProcedureFilter.Designer.cs
@@ -0,0 +1,72 @@
+namespace ResultsBrowser.Filters
+{
+ partial class ProcedureFilter
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.procedureTextBox = new System.Windows.Forms.TextBox();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.procedureTextBox);
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(0, 0);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(835, 40);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Procedure";
+ //
+ // procedureTextBox
+ //
+ this.procedureTextBox.Location = new System.Drawing.Point(132, 13);
+ this.procedureTextBox.Name = "procedureTextBox";
+ this.procedureTextBox.Size = new System.Drawing.Size(138, 20);
+ this.procedureTextBox.TabIndex = 0;
+ //
+ // ProcedureFilter
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox1);
+ this.Name = "ProcedureFilter";
+ this.Size = new System.Drawing.Size(835, 40);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox procedureTextBox;
+ }
+}
diff --git a/ResultsBrowser/Filters/ProcedureFilter.cs b/ResultsBrowser/Filters/ProcedureFilter.cs
new file mode 100644
index 000000000..fa7c42e44
--- /dev/null
+++ b/ResultsBrowser/Filters/ProcedureFilter.cs
@@ -0,0 +1,55 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Xml.Serialization;
+
+namespace ResultsBrowser.Filters
+{
+ public partial class ProcedureFilter : UserControl, IFilter
+ {
+ public static string GetFilterName() { return "Procedure"; }
+ public string GetThisFilterName() { return "Procedure"; }
+
+ public string Procedure;
+
+ public ProcedureFilter()
+ {
+ InitializeComponent();
+ Localize();
+ }
+
+ void Localize()
+ {
+ groupBox1.Text = "Procedure";
+ }
+
+ public void Data2UI()
+ {
+ procedureTextBox.Text = (Procedure != null) ? Procedure : string.Empty;
+ }
+
+ public void UI2Data()
+ {
+ Procedure = procedureTextBox.Text;
+ }
+
+ ///
+ /// Save public fields of this class to the XML string.
+ ///
+ public void Save(StringBuilder sb)
+ {
+ try
+ {
+ using (TextWriter writer = new StringWriter(sb))
+ {
+ (new XmlSerializer(typeof(ProcedureFilter))).Serialize(writer, this);
+ }
+ }
+ catch (Exception e)
+ {
+ string msg = e.Message;
+ }
+ }
+ }
+}
diff --git a/ResultsBrowser/Filters/ProcedureFilter.resx b/ResultsBrowser/Filters/ProcedureFilter.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/ResultsBrowser/Filters/ProcedureFilter.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ResultsBrowser/Filters/SerialNrFilter.Designer.cs b/ResultsBrowser/Filters/SerialNrFilter.Designer.cs
new file mode 100644
index 000000000..a8edec376
--- /dev/null
+++ b/ResultsBrowser/Filters/SerialNrFilter.Designer.cs
@@ -0,0 +1,72 @@
+namespace ResultsBrowser.Filters
+{
+ partial class SerialNrFilter
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.serialNrTextBox = new System.Windows.Forms.TextBox();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.serialNrTextBox);
+ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.groupBox1.Location = new System.Drawing.Point(0, 0);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(835, 40);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Serial number";
+ //
+ // serialNrTextBox
+ //
+ this.serialNrTextBox.Location = new System.Drawing.Point(132, 13);
+ this.serialNrTextBox.Name = "serialNrTextBox";
+ this.serialNrTextBox.Size = new System.Drawing.Size(138, 20);
+ this.serialNrTextBox.TabIndex = 0;
+ //
+ // SerialNrFilter
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox1);
+ this.Name = "SerialNrFilter";
+ this.Size = new System.Drawing.Size(835, 40);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox serialNrTextBox;
+ }
+}
diff --git a/ResultsBrowser/Filters/SerialNrFilter.cs b/ResultsBrowser/Filters/SerialNrFilter.cs
new file mode 100644
index 000000000..3282b9cdb
--- /dev/null
+++ b/ResultsBrowser/Filters/SerialNrFilter.cs
@@ -0,0 +1,56 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Xml.Serialization;
+
+namespace ResultsBrowser.Filters
+{
+ public partial class SerialNrFilter : UserControl, IFilter
+ {
+ public static string GetFilterName() { return "SerialNr"; }
+ public string GetThisFilterName() { return "SerialNr"; }
+
+ public string SerialNr;
+
+ public SerialNrFilter()
+ {
+ InitializeComponent();
+ Localize();
+ }
+
+ void Localize()
+ {
+ groupBox1.Text = "Serial number";
+ }
+
+
+ public void Data2UI()
+ {
+ serialNrTextBox.Text = (SerialNr != null) ? SerialNr : string.Empty;
+ }
+
+ public void UI2Data()
+ {
+ SerialNr = serialNrTextBox.Text;
+ }
+
+ ///
+ /// Save public fields of this class to the XML string.
+ ///
+ public void Save(StringBuilder sb)
+ {
+ try
+ {
+ using (TextWriter writer = new StringWriter(sb))
+ {
+ (new XmlSerializer(typeof(SerialNrFilter))).Serialize(writer, this);
+ }
+ }
+ catch (Exception e)
+ {
+ string msg = e.Message;
+ }
+ }
+ }
+}
diff --git a/ResultsBrowser/Filters/SerialNrFilter.resx b/ResultsBrowser/Filters/SerialNrFilter.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/ResultsBrowser/Filters/SerialNrFilter.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ResultsBrowser/Forms/AddFilterDlg.Designer.cs b/ResultsBrowser/Forms/AddFilterDlg.Designer.cs
new file mode 100644
index 000000000..b3d5b89ba
--- /dev/null
+++ b/ResultsBrowser/Forms/AddFilterDlg.Designer.cs
@@ -0,0 +1,102 @@
+namespace ResultsBrowser.Forms
+{
+ partial class AddFilterDlg
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.availFiltersListBox = new System.Windows.Forms.ListBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.cancelButton = new System.Windows.Forms.Button();
+ this.okButton = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // availFiltersListBox
+ //
+ this.availFiltersListBox.FormattingEnabled = true;
+ this.availFiltersListBox.Location = new System.Drawing.Point(12, 31);
+ this.availFiltersListBox.Name = "availFiltersListBox";
+ this.availFiltersListBox.Size = new System.Drawing.Size(288, 264);
+ this.availFiltersListBox.TabIndex = 1;
+ this.availFiltersListBox.DoubleClick += new System.EventHandler(this.availFiltersListBox_DoubleClick);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 9);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(37, 13);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "Filters:";
+ //
+ // cancelButton
+ //
+ this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.cancelButton.Location = new System.Drawing.Point(201, 310);
+ this.cancelButton.Name = "cancelButton";
+ this.cancelButton.Size = new System.Drawing.Size(99, 25);
+ this.cancelButton.TabIndex = 10;
+ this.cancelButton.Text = "&Cancel";
+ this.cancelButton.UseVisualStyleBackColor = true;
+ this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
+ //
+ // okButton
+ //
+ this.okButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.okButton.Location = new System.Drawing.Point(96, 310);
+ this.okButton.Name = "okButton";
+ this.okButton.Size = new System.Drawing.Size(99, 25);
+ this.okButton.TabIndex = 9;
+ this.okButton.Text = "&OK";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // AddFilterDlg
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(314, 350);
+ this.Controls.Add(this.cancelButton);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.availFiltersListBox);
+ this.Name = "AddFilterDlg";
+ this.Text = "Select a filter";
+ this.Load += new System.EventHandler(this.AddFilterDlg_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox availFiltersListBox;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button cancelButton;
+ private System.Windows.Forms.Button okButton;
+ }
+}
\ No newline at end of file
diff --git a/ResultsBrowser/Forms/AddFilterDlg.cs b/ResultsBrowser/Forms/AddFilterDlg.cs
new file mode 100644
index 000000000..5db761de7
--- /dev/null
+++ b/ResultsBrowser/Forms/AddFilterDlg.cs
@@ -0,0 +1,69 @@
+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;
+using ResultsBrowser.Resources;
+
+namespace ResultsBrowser.Forms
+{
+ public partial class AddFilterDlg : Form
+ {
+ public string SelectedFilterName;
+
+ private int selectedIndex = -1;
+
+ public AddFilterDlg()
+ {
+ InitializeComponent();
+
+ foreach (var fName in Filters.Factory.List)
+ {
+ availFiltersListBox.Items.Add(fName);
+ }
+ }
+
+ private void AddFilterDlg_Load(object sender, EventArgs e)
+ {
+ Localize();
+ }
+
+ void Localize()
+ {
+ Text = "Select a Filters";
+ label1.Text = "Filters";
+ okButton.Text = Strings.OkBtnText;
+ cancelButton.Text = Strings.CancelBtnText;
+ }
+
+ private void availFiltersListBox_DoubleClick(object sender, EventArgs e)
+ {
+ okButton_Click(sender, e);
+ }
+
+ private void okButton_Click(object sender, EventArgs e)
+ {
+ int ix = availFiltersListBox.SelectedIndex;
+ if (ix >= 0 && ix < Filters.Factory.Count)
+ {
+ selectedIndex = ix;
+ SelectedFilterName = (string)availFiltersListBox.Items[ix];
+ DialogResult = DialogResult.OK;
+ Close();
+ return;
+ }
+
+ }
+
+ private void cancelButton_Click(object sender, EventArgs e)
+ {
+ SelectedFilterName = null;
+ DialogResult = DialogResult.Cancel;
+ Close();
+ return;
+ }
+ }
+}
diff --git a/ResultsBrowser/Forms/AddFilterDlg.resx b/ResultsBrowser/Forms/AddFilterDlg.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/ResultsBrowser/Forms/AddFilterDlg.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ResultsBrowser/Program.cs b/ResultsBrowser/Program.cs
index a38f0f3af..cabb4f3a2 100644
--- a/ResultsBrowser/Program.cs
+++ b/ResultsBrowser/Program.cs
@@ -32,6 +32,7 @@ namespace ResultsBrowser
///
public static MainWnd MainWnd;
public static RBrowserWnd RBrowserWnd;
+ public static ResultsBrowserWnd ResultsBrowserWnd;
///
@@ -143,9 +144,9 @@ namespace ResultsBrowser
log.Info("Opening the main window");
Application.Run(MainWnd);
#else
- RBrowserWnd = new RBrowserWnd();
+ ResultsBrowserWnd = new ResultsBrowserWnd();
log.Info("Opening the main window");
- Application.Run(RBrowserWnd);
+ Application.Run(ResultsBrowserWnd);
#endif
log.Info("The main window was closed");
}
diff --git a/ResultsBrowser/QueryFilters.cs b/ResultsBrowser/QueryFilters.cs
new file mode 100644
index 000000000..c1fcdffbb
--- /dev/null
+++ b/ResultsBrowser/QueryFilters.cs
@@ -0,0 +1,81 @@
+///
+/// Copyright (c) 2016 Sensus Metering Systems
+///
+using System;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+namespace ResultsBrowser
+{
+ ///
+ /// Class to be serialized to an XML file...
+ /// Public members are filters / parts of a query.
+ ///
+ [XmlRootAttribute("Query")]
+ public class QueryFilters
+ {
+ public string[] FilterNames;
+
+ [XmlIgnore]
+ public int FilterNamesCount { get { return (FilterNames != null) ? FilterNames.Length : 0; } }
+
+ public string[] FilterSettings;
+
+ [XmlIgnore]
+ public int FilterSettingsCount { get { return (FilterSettings != null) ? FilterSettings.Length : 0; } }
+
+
+ public QueryFilters()
+ {
+ }
+
+ public QueryFilters(int count)
+ {
+ if (count > 0)
+ {
+ FilterNames = new string[count];
+ FilterSettings = new string[count];
+ }
+ }
+
+ ///
+ /// Load public fields of this class from the XML file.
+ ///
+ public static QueryFilters Load(string fileName)
+ {
+ try
+ {
+ using (TextReader reader = new StreamReader(fileName))
+ {
+ QueryFilters ls = (new XmlSerializer(typeof(QueryFilters))).Deserialize(reader) as QueryFilters;
+ // Copy the settings just in case De-serialize() completes OK
+ return ls;
+ }
+ }
+ catch (Exception e)
+ {
+ string msg = e.Message;
+ return null;
+ }
+ }
+
+ ///
+ /// Save public fields of this class to the XML file.
+ ///
+ public void Save(string fileName)
+ {
+ try
+ {
+ using (TextWriter writer = new StreamWriter(fileName))
+ {
+ (new XmlSerializer(typeof(QueryFilters))).Serialize(writer, this);
+ }
+ }
+ catch (Exception e)
+ {
+ string msg = e.Message;
+ }
+ }
+ }
+}
diff --git a/ResultsBrowser/Resources/Strings.de.resx b/ResultsBrowser/Resources/Strings.de.resx
new file mode 100644
index 000000000..4fdb1b6af
--- /dev/null
+++ b/ResultsBrowser/Resources/Strings.de.resx
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ResultsBrowser/Resources/Strings.resx b/ResultsBrowser/Resources/Strings.resx
index 7d0d0f851..6670d17c9 100644
--- a/ResultsBrowser/Resources/Strings.resx
+++ b/ResultsBrowser/Resources/Strings.resx
@@ -138,30 +138,12 @@
Invalid user, password, or bench
-
- Password
-
-
- Please, select a test bench
-
-
- You must restart to apply these changes
-
Test bench
-
- User name
-
-
- Warning
-
(max. _X_ alphanumeric characters)
-
- This Username has already been taken. Please choose another one.
-
close
@@ -174,24 +156,6 @@
Name
-
- open
-
-
- Pump
-
-
- P up
-
-
- P down
-
-
- Q from [m3/h]
-
-
- Q to [m3/h]
-
Reference
@@ -201,30 +165,12 @@
Balance
-
- Sensor
-
-
- T div.
-
-
- T in
-
-
- T out
-
-
- Pressure meter
-
Duration [s]
no
-
- yes
-
PBench
@@ -270,9 +216,6 @@
Remove
-
- Unlock
-
OK
@@ -285,18 +228,9 @@
Flow [m3/h]
-
- Pressure [bar]
-
Invalid username or password
-
- Username
-
-
- User Login
-
Copy
@@ -318,9 +252,6 @@
Exit
-
- Retry connection to the database
-
Enter password
@@ -348,9 +279,6 @@
Description
-
- Procedures
-
Procedure
@@ -363,30 +291,12 @@
Measured
-
- Test
-
Test bench is not running, however you can change the settings to resolve the problem.
-
- Volume [l]
-
Emptying
-
- Q-Set Method
-
-
- Repeats nr.
-
-
- Test
-
-
- Zeroing
-
Bench
@@ -405,45 +315,15 @@
Feeding
-
- Output
-
-
- Q from [l/h]
-
-
- Q to [l/h]
-
Red. type
-
- Sensors
-
-
- Toler. red. [%]
-
-
- Test time [s]
-
Error while creating the database. Reason:
Metrology
-
- Please change the following settings:
-
-
- Properties
-
-
- Unhandled error occured in
-
-
- User :
-
(offline)
@@ -462,12 +342,6 @@
Metrologist
-
- Tester
-
-
- Testing Specialist
-
Close emptying valve
@@ -486,45 +360,9 @@
Measure the mass
-
- Please select a procedure
-
-
- Please select a test
-
-
- Purging
-
Ready
-
- Set flow
-
-
- Set route
-
-
- Start the pump
-
-
- Start the test
-
-
- Stopping
-
-
- Stop the pump
-
-
- Stop the test
-
-
- Tarring
-
-
- Test in progress
-
< Back
@@ -537,9 +375,6 @@
Flow Selection
-
- Test name
-
Test method
@@ -549,9 +384,6 @@
Relative Q to
-
- Target Q [m3/h]
-
Combined meters
@@ -561,9 +393,6 @@
Rate of change [%]
-
- Pulses per liter
-
Component
@@ -573,16 +402,6 @@
Test method selection
-
- Sensors
-
-
- Test method
-
-
- Volume and error limit selection
-
-
Clear results
@@ -598,24 +417,12 @@
Horizontally
-
- Tests are columns
-
-
- Tests are rows
-
-
- Vertically
-
Configuration
NOK
-
- OK
-
Clear
@@ -625,36 +432,12 @@
Measuring the weight
-
- Setting the flow
-
-
- Test completed
-
-
- Test preparation
-
-
- Purging ({0}: step {1}/{2})
-
Emptying ({0}: step {1}/{2})
-
- Switching flow detection
-
Activity
-
- Progress
-
-
-
-
-
- Please select a cycle, a test or empty
-
Approval info.
@@ -664,21 +447,12 @@
Producer
-
- Qn
-
-
- Water meters
-
Printer
Version
-
- Test bench number
-
<nothing to configure>
@@ -691,9 +465,6 @@
Question
-
- Yes
-
Bench parameters
@@ -706,87 +477,24 @@
Database type
-
- Test Bench Databases Specification
-
-
- Test bench is controlled by this computer
-
-
- Test bench name
-
-
- Test connection
-
-
- Users and groups
-
-
- Water meter data
-
-
- Water meter types
-
Logging
Mode
-
- Parameters
-
-
- Parent
-
-
- Type
-
-
- Test Bench Components Configuration
-
-
- Transitions
-
New Tab
-
- Remove Tab
-
-
- Rename Tab
-
New transition name
-
- Power [%]
-
-
- ROI Detection in Progress
-
Detection completed
Emergency STOP
-
- Transition - End
-
-
- Transition - Start
-
-
- Starting the cameras
-
-
- Test start ({0}: step {1}/{2})
-
-
- Test stop ({0}: step {1}/{2})
-
&Add >
@@ -799,84 +507,33 @@
<< R&emove all
-
- Selected results:
-
-
- Supress WM trills
-
-
- Fill the test bench with water?
-
Message
-
- Start valve
-
dflt
-
- Stopping flow before the fixed start test
-
-
- Water Meter
-
-
- Water Meter Serial Numbers ans States
-
-
- Water Meter States
-
-
- S/N:
-
-
- State [liter]
-
Detection failed
Camera error
-
- Starting the system
-
remaining time
-
- s
-
-
- T stop - mass msrmt. [s]
-
Less
More
-
- Program restart is required to apply some settings
-
Changes will be lost. Do you want to proceed?
-
- PID
-
Flowmeter
-
- Part
-
-
- Timeout
-
Combined
@@ -886,12 +543,6 @@
Printer
-
- Screen
-
-
- Single
-
Aux Water Meter
@@ -913,75 +564,27 @@
Protocol
-
- Qfall
-
-
- Qrise
-
Serial Number
-
- State
-
-
- Switching Points
-
Aux. WM Serial Nr.
Main WM Serial Nr.
-
- Pump power [%]
-
Adjustment in progress
Error [%]
-
- Starting the pump
-
-
- Setting the water pressure
-
-
- PreasureHi [bar]
-
-
- PressureLo [bar]
-
-
- Pressure Hi [bar]
-
-
- Pressure Lo [bar]
-
-
- Pressure Selection
-
Leak duration [s]
PMax duration [s]
-
- P up end
-
-
- P up start
-
-
- P down end
-
-
- P down start
-
Closing input valve, switching the pump off
@@ -1003,27 +606,9 @@
Date and time:
-
- Procedure:
-
-
- Purchase order:
-
-
- Tester:
-
-
- Page
-
-
- T flow stab. - start [s]
-
End
-
- Start
-
@temperature [degC]
@@ -1036,9 +621,6 @@
Nr. meters in a group:
-
- Show cycle end form
-
End condition
@@ -1051,21 +633,12 @@
Main:
-
- Qmin
-
-
- Qt
-
cold
hot
-
- Water
-
Product name
@@ -1084,36 +657,18 @@
Evaluate
-
- Publish
-
-
- Simultaneous with next step
-
-
- Simultaneous with previous step
-
iPerl Communication in progress
Language
-
- Test bench data
-
Available Components:
-
- Select Component
-
Database Settings
-
- Test Benches:
-
About Test Bench Framework
@@ -1123,34 +678,16 @@
Copyright © 2013 - {0}
-
- Version _VERSION_
-
Edit User
Groups
-
- User Management
-
An unhandled error occured
Ignore
-
- Retry
-
-
- Procedure {0} added.
-
-
- Procedure {0} modified.
-
-
- Revision
-
\ No newline at end of file
diff --git a/ResultsBrowser/ResultsBrowser.csproj b/ResultsBrowser/ResultsBrowser.csproj
index 28eca5517..ef8951c03 100644
--- a/ResultsBrowser/ResultsBrowser.csproj
+++ b/ResultsBrowser/ResultsBrowser.csproj
@@ -73,6 +73,32 @@
+
+ UserControl
+
+
+ DateFilter.cs
+
+
+
+
+ UserControl
+
+
+ ProcedureFilter.cs
+
+
+ UserControl
+
+
+ SerialNrFilter.cs
+
+
+ Form
+
+
+ AddFilterDlg.cs
+
Form
@@ -100,6 +126,7 @@
+
Form
@@ -107,6 +134,24 @@
RBrowserWnd.cs
+
+ Form
+
+
+ ResultsBrowserWnd.cs
+
+
+ DateFilter.cs
+
+
+ ProcedureFilter.cs
+
+
+ SerialNrFilter.cs
+
+
+ AddFilterDlg.cs
+
DatabaseSettings.cs
@@ -132,7 +177,11 @@
RBrowserWnd.cs
+
+
+ ResultsBrowserWnd.cs
+
SettingsSingleFileGenerator
diff --git a/ResultsBrowser/ResultsBrowserWnd.Designer.cs b/ResultsBrowser/ResultsBrowserWnd.Designer.cs
new file mode 100644
index 000000000..b437049a2
--- /dev/null
+++ b/ResultsBrowser/ResultsBrowserWnd.Designer.cs
@@ -0,0 +1,252 @@
+namespace ResultsBrowser
+{
+ partial class ResultsBrowserWnd
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.vSplitContainer = new System.Windows.Forms.SplitContainer();
+ this.hSplitContainer = new System.Windows.Forms.SplitContainer();
+ this.filtersFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.settingsBtn = new System.Windows.Forms.Button();
+ this.saveQueryBtn = new System.Windows.Forms.Button();
+ this.loadQueryBtn = new System.Windows.Forms.Button();
+ this.execQueryBtn = new System.Windows.Forms.Button();
+ this.addFilterBtn = new System.Windows.Forms.Button();
+ this.benchesGroupBox = new System.Windows.Forms.GroupBox();
+ this.radioButton2 = new System.Windows.Forms.RadioButton();
+ this.radioButton3 = new System.Windows.Forms.RadioButton();
+ this.radioButton1 = new System.Windows.Forms.RadioButton();
+ ((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).BeginInit();
+ this.vSplitContainer.Panel1.SuspendLayout();
+ this.vSplitContainer.Panel2.SuspendLayout();
+ this.vSplitContainer.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).BeginInit();
+ this.hSplitContainer.Panel1.SuspendLayout();
+ this.hSplitContainer.Panel2.SuspendLayout();
+ this.hSplitContainer.SuspendLayout();
+ this.benchesGroupBox.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // vSplitContainer
+ //
+ this.vSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.vSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
+ this.vSplitContainer.Location = new System.Drawing.Point(0, 0);
+ this.vSplitContainer.Name = "vSplitContainer";
+ //
+ // vSplitContainer.Panel1
+ //
+ this.vSplitContainer.Panel1.Controls.Add(this.hSplitContainer);
+ this.vSplitContainer.Panel1MinSize = 100;
+ //
+ // vSplitContainer.Panel2
+ //
+ this.vSplitContainer.Panel2.Controls.Add(this.settingsBtn);
+ this.vSplitContainer.Panel2.Controls.Add(this.saveQueryBtn);
+ this.vSplitContainer.Panel2.Controls.Add(this.loadQueryBtn);
+ this.vSplitContainer.Panel2.Controls.Add(this.execQueryBtn);
+ this.vSplitContainer.Panel2.Controls.Add(this.addFilterBtn);
+ this.vSplitContainer.Panel2.Controls.Add(this.benchesGroupBox);
+ this.vSplitContainer.Panel2MinSize = 100;
+ this.vSplitContainer.Size = new System.Drawing.Size(984, 712);
+ this.vSplitContainer.SplitterDistance = 840;
+ this.vSplitContainer.TabIndex = 0;
+ //
+ // hSplitContainer
+ //
+ this.hSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.hSplitContainer.Location = new System.Drawing.Point(0, 0);
+ this.hSplitContainer.Name = "hSplitContainer";
+ this.hSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // hSplitContainer.Panel1
+ //
+ this.hSplitContainer.Panel1.Controls.Add(this.filtersFlowLayoutPanel);
+ //
+ // hSplitContainer.Panel2
+ //
+ this.hSplitContainer.Panel2.Controls.Add(this.listBox1);
+ this.hSplitContainer.Size = new System.Drawing.Size(840, 712);
+ this.hSplitContainer.SplitterDistance = 280;
+ this.hSplitContainer.TabIndex = 0;
+ //
+ // filtersFlowLayoutPanel
+ //
+ this.filtersFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.filtersFlowLayoutPanel.Location = new System.Drawing.Point(0, 0);
+ this.filtersFlowLayoutPanel.Name = "filtersFlowLayoutPanel";
+ this.filtersFlowLayoutPanel.Size = new System.Drawing.Size(840, 280);
+ this.filtersFlowLayoutPanel.TabIndex = 0;
+ //
+ // listBox1
+ //
+ this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.Location = new System.Drawing.Point(0, 0);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(840, 428);
+ this.listBox1.TabIndex = 0;
+ //
+ // settingsBtn
+ //
+ this.settingsBtn.Location = new System.Drawing.Point(8, 12);
+ this.settingsBtn.Name = "settingsBtn";
+ this.settingsBtn.Size = new System.Drawing.Size(125, 33);
+ this.settingsBtn.TabIndex = 0;
+ this.settingsBtn.Text = "Settings";
+ this.settingsBtn.UseVisualStyleBackColor = true;
+ this.settingsBtn.Click += new System.EventHandler(this.settingsBtn_Click);
+ //
+ // saveQueryBtn
+ //
+ this.saveQueryBtn.Location = new System.Drawing.Point(8, 129);
+ this.saveQueryBtn.Name = "saveQueryBtn";
+ this.saveQueryBtn.Size = new System.Drawing.Size(125, 33);
+ this.saveQueryBtn.TabIndex = 3;
+ this.saveQueryBtn.Text = "Save query";
+ this.saveQueryBtn.UseVisualStyleBackColor = true;
+ this.saveQueryBtn.Click += new System.EventHandler(this.saveQueryBtn_Click);
+ //
+ // loadQueryBtn
+ //
+ this.loadQueryBtn.Location = new System.Drawing.Point(8, 90);
+ this.loadQueryBtn.Name = "loadQueryBtn";
+ this.loadQueryBtn.Size = new System.Drawing.Size(125, 33);
+ this.loadQueryBtn.TabIndex = 2;
+ this.loadQueryBtn.Text = "Load query";
+ this.loadQueryBtn.UseVisualStyleBackColor = true;
+ this.loadQueryBtn.Click += new System.EventHandler(this.loadQueryBtn_Click);
+ //
+ // execQueryBtn
+ //
+ this.execQueryBtn.Location = new System.Drawing.Point(8, 280);
+ this.execQueryBtn.Name = "execQueryBtn";
+ this.execQueryBtn.Size = new System.Drawing.Size(125, 33);
+ this.execQueryBtn.TabIndex = 5;
+ this.execQueryBtn.Text = "Execute query";
+ this.execQueryBtn.UseVisualStyleBackColor = true;
+ this.execQueryBtn.Click += new System.EventHandler(this.execQueryBtn_Click);
+ //
+ // addFilterBtn
+ //
+ this.addFilterBtn.Location = new System.Drawing.Point(8, 51);
+ this.addFilterBtn.Name = "addFilterBtn";
+ this.addFilterBtn.Size = new System.Drawing.Size(125, 33);
+ this.addFilterBtn.TabIndex = 1;
+ this.addFilterBtn.Text = "Add filter";
+ this.addFilterBtn.UseVisualStyleBackColor = true;
+ this.addFilterBtn.Click += new System.EventHandler(this.addFilterBtn_Click);
+ //
+ // benchesGroupBox
+ //
+ this.benchesGroupBox.Controls.Add(this.radioButton2);
+ this.benchesGroupBox.Controls.Add(this.radioButton3);
+ this.benchesGroupBox.Controls.Add(this.radioButton1);
+ this.benchesGroupBox.Location = new System.Drawing.Point(8, 173);
+ this.benchesGroupBox.Name = "benchesGroupBox";
+ this.benchesGroupBox.Size = new System.Drawing.Size(125, 99);
+ this.benchesGroupBox.TabIndex = 4;
+ this.benchesGroupBox.TabStop = false;
+ this.benchesGroupBox.Text = "Test benches";
+ //
+ // radioButton2
+ //
+ this.radioButton2.AutoSize = true;
+ this.radioButton2.Location = new System.Drawing.Point(15, 44);
+ this.radioButton2.Name = "radioButton2";
+ this.radioButton2.Size = new System.Drawing.Size(85, 17);
+ this.radioButton2.TabIndex = 1;
+ this.radioButton2.TabStop = true;
+ this.radioButton2.Text = "radioButton2";
+ this.radioButton2.UseVisualStyleBackColor = true;
+ this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
+ //
+ // radioButton3
+ //
+ this.radioButton3.AutoSize = true;
+ this.radioButton3.Location = new System.Drawing.Point(15, 67);
+ this.radioButton3.Name = "radioButton3";
+ this.radioButton3.Size = new System.Drawing.Size(85, 17);
+ this.radioButton3.TabIndex = 2;
+ this.radioButton3.TabStop = true;
+ this.radioButton3.Text = "radioButton3";
+ this.radioButton3.UseVisualStyleBackColor = true;
+ this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
+ //
+ // radioButton1
+ //
+ this.radioButton1.AutoSize = true;
+ this.radioButton1.Location = new System.Drawing.Point(15, 21);
+ this.radioButton1.Name = "radioButton1";
+ this.radioButton1.Size = new System.Drawing.Size(85, 17);
+ this.radioButton1.TabIndex = 0;
+ this.radioButton1.TabStop = true;
+ this.radioButton1.Text = "radioButton1";
+ this.radioButton1.UseVisualStyleBackColor = true;
+ this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
+ //
+ // ResultsBrowserWnd
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(984, 712);
+ this.Controls.Add(this.vSplitContainer);
+ this.Name = "ResultsBrowserWnd";
+ this.Text = "ResultsBrowserWnd";
+ this.Load += new System.EventHandler(this.ResultsBrowserWnd_Load);
+ this.vSplitContainer.Panel1.ResumeLayout(false);
+ this.vSplitContainer.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.vSplitContainer)).EndInit();
+ this.vSplitContainer.ResumeLayout(false);
+ this.hSplitContainer.Panel1.ResumeLayout(false);
+ this.hSplitContainer.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.hSplitContainer)).EndInit();
+ this.hSplitContainer.ResumeLayout(false);
+ this.benchesGroupBox.ResumeLayout(false);
+ this.benchesGroupBox.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.SplitContainer vSplitContainer;
+ private System.Windows.Forms.SplitContainer hSplitContainer;
+ private System.Windows.Forms.FlowLayoutPanel filtersFlowLayoutPanel;
+ private System.Windows.Forms.ListBox listBox1;
+ private System.Windows.Forms.GroupBox benchesGroupBox;
+ private System.Windows.Forms.RadioButton radioButton3;
+ private System.Windows.Forms.RadioButton radioButton2;
+ private System.Windows.Forms.RadioButton radioButton1;
+ private System.Windows.Forms.Button saveQueryBtn;
+ private System.Windows.Forms.Button loadQueryBtn;
+ private System.Windows.Forms.Button execQueryBtn;
+ private System.Windows.Forms.Button addFilterBtn;
+ private System.Windows.Forms.Button settingsBtn;
+ }
+}
\ No newline at end of file
diff --git a/ResultsBrowser/ResultsBrowserWnd.cs b/ResultsBrowser/ResultsBrowserWnd.cs
new file mode 100644
index 000000000..3b2ba5fb9
--- /dev/null
+++ b/ResultsBrowser/ResultsBrowserWnd.cs
@@ -0,0 +1,115 @@
+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;
+using ResultsBrowser.Filters;
+using ResultsBrowser.Resources;
+
+namespace ResultsBrowser
+{
+ public partial class ResultsBrowserWnd : Form
+ {
+ QueryFilters queryFilters;
+
+ public ResultsBrowserWnd()
+ {
+ InitializeComponent();
+ }
+
+ private void ResultsBrowserWnd_Load(object sender, EventArgs e)
+ {
+ Localize();
+ }
+
+ void Localize()
+ {
+ }
+
+ private void settingsBtn_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void addFilterBtn_Click(object sender, EventArgs e)
+ {
+ Forms.AddFilterDlg dlg = new Forms.AddFilterDlg();
+ if (dlg.ShowDialog() == DialogResult.OK && dlg.SelectedFilterName != null)
+ {
+ IFilter filter = Factory.GetFilter(dlg.SelectedFilterName);
+ filtersFlowLayoutPanel.Controls.Add(filter as UserControl);
+ }
+ }
+
+ private void loadQueryBtn_Click(object sender, EventArgs e)
+ {
+ OpenFileDialog dlg = new OpenFileDialog();
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ QueryFilters queryFilters = QueryFilters.Load(dlg.FileName);
+
+ filtersFlowLayoutPanel.Controls.Clear();
+ for (int i = 0; i < queryFilters.FilterNamesCount; i++)
+ {
+ IFilter filter = Factory.LoadFilter(queryFilters.FilterNames[i], queryFilters.FilterSettings[i]);
+ filtersFlowLayoutPanel.Controls.Add(filter as Control);
+ }
+ }
+ }
+
+ private void saveQueryBtn_Click(object sender, EventArgs e)
+ {
+ StringBuilder sb = new StringBuilder();
+
+ int count = filtersFlowLayoutPanel.Controls.Count;
+ QueryFilters queryFilters = new QueryFilters(count);
+
+ try
+ {
+ for (int i = 0; i < count; i++)
+ {
+ IFilter filter = (filtersFlowLayoutPanel.Controls[i] as IFilter);
+ queryFilters.FilterNames[i] = filter.GetThisFilterName();
+ sb.Clear();
+ filter.UI2Data();
+ filter.Save(sb);
+ queryFilters.FilterSettings[i] = sb.ToString();
+ }
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ return;
+ }
+
+ SaveFileDialog dlg = new SaveFileDialog();
+ if (dlg.ShowDialog() == DialogResult.OK)
+ {
+ queryFilters.Save(dlg.FileName);
+ }
+ }
+
+ private void radioButton1_CheckedChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void radioButton2_CheckedChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void radioButton3_CheckedChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void execQueryBtn_Click(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/ResultsBrowser/ResultsBrowserWnd.resx b/ResultsBrowser/ResultsBrowserWnd.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/ResultsBrowser/ResultsBrowserWnd.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/TestBenchFramework/SelectComponentClassDlg.Designer.cs b/TestBenchFramework/SelectComponentClassDlg.Designer.cs
index e9f861020..300e45aef 100644
--- a/TestBenchFramework/SelectComponentClassDlg.Designer.cs
+++ b/TestBenchFramework/SelectComponentClassDlg.Designer.cs
@@ -31,60 +31,60 @@ namespace TBF
///
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SelectComponentClassDlg));
- this.availCmpntsLstBox = new System.Windows.Forms.ListBox();
- this.availableComponentsLabel = new System.Windows.Forms.Label();
- this.cancelButton = new System.Windows.Forms.Button();
- this.okButton = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // availCmpntsLstBox
- //
- resources.ApplyResources(this.availCmpntsLstBox, "availCmpntsLstBox");
- this.availCmpntsLstBox.FormattingEnabled = true;
- this.availCmpntsLstBox.Name = "availCmpntsLstBox";
- this.availCmpntsLstBox.DoubleClick += new System.EventHandler(this.availCmpntsLstBox_DoubleClick);
- //
- // availableComponentsLabel
- //
- resources.ApplyResources(this.availableComponentsLabel, "availableComponentsLabel");
- this.availableComponentsLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
- this.availableComponentsLabel.Name = "availableComponentsLabel";
- //
- // cancelButton
- //
- resources.ApplyResources(this.cancelButton, "cancelButton");
- this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
- 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.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
- this.okButton.Name = "okButton";
- this.okButton.UseVisualStyleBackColor = true;
- this.okButton.Click += new System.EventHandler(this.okButton_Click);
- //
- // SelectComponentClassDlg
- //
- this.AcceptButton = this.okButton;
- resources.ApplyResources(this, "$this");
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.cancelButton;
- this.Controls.Add(this.cancelButton);
- this.Controls.Add(this.okButton);
- this.Controls.Add(this.availableComponentsLabel);
- this.Controls.Add(this.availCmpntsLstBox);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "SelectComponentClassDlg";
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
- this.Load += new System.EventHandler(this.SelectComponentClassDlg_Load);
- this.ResumeLayout(false);
- this.PerformLayout();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SelectComponentClassDlg));
+ this.availCmpntsLstBox = new System.Windows.Forms.ListBox();
+ this.availableComponentsLabel = new System.Windows.Forms.Label();
+ this.cancelButton = new System.Windows.Forms.Button();
+ this.okButton = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // availCmpntsLstBox
+ //
+ this.availCmpntsLstBox.FormattingEnabled = true;
+ resources.ApplyResources(this.availCmpntsLstBox, "availCmpntsLstBox");
+ this.availCmpntsLstBox.Name = "availCmpntsLstBox";
+ this.availCmpntsLstBox.DoubleClick += new System.EventHandler(this.availCmpntsLstBox_DoubleClick);
+ //
+ // availableComponentsLabel
+ //
+ resources.ApplyResources(this.availableComponentsLabel, "availableComponentsLabel");
+ this.availableComponentsLabel.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
+ this.availableComponentsLabel.Name = "availableComponentsLabel";
+ //
+ // cancelButton
+ //
+ this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
+ 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.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
+ resources.ApplyResources(this.okButton, "okButton");
+ this.okButton.Name = "okButton";
+ this.okButton.UseVisualStyleBackColor = true;
+ this.okButton.Click += new System.EventHandler(this.okButton_Click);
+ //
+ // SelectComponentClassDlg
+ //
+ this.AcceptButton = this.okButton;
+ resources.ApplyResources(this, "$this");
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.cancelButton;
+ this.Controls.Add(this.cancelButton);
+ this.Controls.Add(this.okButton);
+ this.Controls.Add(this.availableComponentsLabel);
+ this.Controls.Add(this.availCmpntsLstBox);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "SelectComponentClassDlg";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.Load += new System.EventHandler(this.SelectComponentClassDlg_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
diff --git a/TestBenchFramework/SelectComponentClassDlg.resx b/TestBenchFramework/SelectComponentClassDlg.resx
index e2385c739..a3c7f5829 100644
--- a/TestBenchFramework/SelectComponentClassDlg.resx
+++ b/TestBenchFramework/SelectComponentClassDlg.resx
@@ -117,74 +117,73 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- cancelButton
-
-
- 6, 13
-
-
- 1
-
-
- $this
-
-
- 99, 25
-
-
- Available Components:
-
-
- okButton
-
-
- 115, 13
-
12, 34
-
- System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 2
+
+ 288, 264
-
- 8
+
+ 0
availCmpntsLstBox
-
- 0
-
-
- 200, 310
-
-
- 311, 347
-
System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- CenterParent
+
+ $this
+
+
+ 3
+
+
+ True
9, 9
+
+ 115, 13
+
+
+ 1
+
+
+ Available Components:
+
+
+ availableComponentsLabel
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 2
+
+
+ 200, 310
+
+
+ 99, 25
+
+
+ 8
+
&Cancel
-
- True
+
+ cancelButton
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
$this
@@ -195,46 +194,47 @@
95, 310
-
- $this
-
-
- &OK
-
-
- 288, 264
+
+ 99, 25
7
-
- 99, 25
+
+ &OK
+
+
+ okButton
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
$this
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 3
-
-
+
1
-
- availableComponentsLabel
-
-
- Select Component
-
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- SelectComponentClassDlg
-
True
+
+ 6, 13
+
+
+ 311, 347
+
+
+
+ CenterParent
+
+
+ Select Component
+
+
+ SelectComponentClassDlg
+
+
+ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file