ResultsBrowser : Statistics : rows and columns are combinations of two items, ver. 2.12.390
This commit is contained in:
+99
-86
@@ -28,91 +28,103 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.statisticsListView = new System.Windows.Forms.ListView();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
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.statisticsListView);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(572, 409);
|
||||
this.splitContainer1.SplitterDistance = 320;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// statisticsListView
|
||||
//
|
||||
this.statisticsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statisticsListView.GridLines = true;
|
||||
this.statisticsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.statisticsListView.Location = new System.Drawing.Point(0, 0);
|
||||
this.statisticsListView.Name = "statisticsListView";
|
||||
this.statisticsListView.Size = new System.Drawing.Size(572, 320);
|
||||
this.statisticsListView.TabIndex = 0;
|
||||
this.statisticsListView.UseCompatibleStateImageBehavior = false;
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.okButton);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(572, 85);
|
||||
this.splitContainer2.SplitterDistance = 390;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(45, 20);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(108, 41);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// StatisticsDlg
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(572, 409);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "StatisticsDlg";
|
||||
this.Text = "StatisticsDlg";
|
||||
this.Load += new System.EventHandler(this.StatisticsDlg_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.statisticsListView = new System.Windows.Forms.ListView();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.printButton = new System.Windows.Forms.Button();
|
||||
this.closeButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
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.statisticsListView);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(572, 409);
|
||||
this.splitContainer1.SplitterDistance = 320;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// statisticsListView
|
||||
//
|
||||
this.statisticsListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statisticsListView.GridLines = true;
|
||||
this.statisticsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.statisticsListView.Location = new System.Drawing.Point(0, 0);
|
||||
this.statisticsListView.Name = "statisticsListView";
|
||||
this.statisticsListView.Size = new System.Drawing.Size(572, 320);
|
||||
this.statisticsListView.TabIndex = 0;
|
||||
this.statisticsListView.UseCompatibleStateImageBehavior = false;
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.printButton);
|
||||
this.splitContainer2.Panel2.Controls.Add(this.closeButton);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(572, 85);
|
||||
this.splitContainer2.SplitterDistance = 249;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// printButton
|
||||
//
|
||||
this.printButton.Location = new System.Drawing.Point(38, 22);
|
||||
this.printButton.Name = "printButton";
|
||||
this.printButton.Size = new System.Drawing.Size(108, 41);
|
||||
this.printButton.TabIndex = 0;
|
||||
this.printButton.Text = "Print";
|
||||
this.printButton.UseVisualStyleBackColor = true;
|
||||
this.printButton.Click += new System.EventHandler(this.printButton_Click);
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
this.closeButton.Location = new System.Drawing.Point(176, 22);
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.Size = new System.Drawing.Size(108, 41);
|
||||
this.closeButton.TabIndex = 1;
|
||||
this.closeButton.Text = "Close";
|
||||
this.closeButton.UseVisualStyleBackColor = true;
|
||||
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
|
||||
//
|
||||
// StatisticsDlg
|
||||
//
|
||||
this.AcceptButton = this.closeButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(572, 409);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Name = "StatisticsDlg";
|
||||
this.Text = "StatisticsDlg";
|
||||
this.Load += new System.EventHandler(this.StatisticsDlg_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -121,6 +133,7 @@
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ListView statisticsListView;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button closeButton;
|
||||
private System.Windows.Forms.Button printButton;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Results.Entities;
|
||||
using ResultsBrowser.Resources;
|
||||
using ResultsBrowser.Output.Printers.Statistics;
|
||||
|
||||
namespace ResultsBrowser.Forms
|
||||
{
|
||||
@@ -13,28 +14,48 @@ namespace ResultsBrowser.Forms
|
||||
bool twoDim;
|
||||
|
||||
Results.WMeterRsltItemSpec rowItem;
|
||||
Results.WMeterRsltItemSpec columnItem;
|
||||
Results.WMeterRsltItemSpec rowItemExt;
|
||||
Results.WMeterRsltItemSpec columnItem;
|
||||
Results.WMeterRsltItemSpec columnItemExt;
|
||||
|
||||
string rowTestSpec;
|
||||
string rowExtTestSpec;
|
||||
string columnTestSpec;
|
||||
string columnExtTestSpec;
|
||||
|
||||
IList<string> rowValues;
|
||||
IList<string> columnValues;
|
||||
|
||||
public StatisticsDlg(IList<WaterMeter> waterMeters, bool twoDim, Results.WMeterRsltItemSpec rowItem, Results.WMeterRsltItemSpec columnItem, string rowTestSpec, string columnTestSpec)
|
||||
int[,] occurances;
|
||||
|
||||
|
||||
public StatisticsDlg(IList<WaterMeter> waterMeters, bool twoDim,
|
||||
Results.WMeterRsltItemSpec rowItem,
|
||||
Results.WMeterRsltItemSpec rowItemExt,
|
||||
Results.WMeterRsltItemSpec columnItem,
|
||||
Results.WMeterRsltItemSpec columnItemExt,
|
||||
string rowTestSpec,
|
||||
string rowExtTestSpec,
|
||||
string columnTestSpec,
|
||||
string columnExtTestSpec)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Text = Strings.Statistics;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
closeButton.Text = Strings.OkBtnText;
|
||||
|
||||
this.waterMeters = waterMeters;
|
||||
|
||||
this.twoDim = twoDim;
|
||||
|
||||
this.rowItem = rowItem;
|
||||
this.rowItemExt = rowItemExt;
|
||||
this.columnItem = columnItem;
|
||||
this.columnItemExt = columnItemExt;
|
||||
this.rowTestSpec = rowTestSpec;
|
||||
this.columnTestSpec = columnTestSpec;
|
||||
this.rowExtTestSpec = rowExtTestSpec;
|
||||
this.columnTestSpec = columnTestSpec;
|
||||
this.columnExtTestSpec = columnExtTestSpec;
|
||||
}
|
||||
|
||||
private void StatisticsDlg_Load(object sender, EventArgs e)
|
||||
@@ -55,38 +76,46 @@ namespace ResultsBrowser.Forms
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
string value = rowItem.Print(wm);
|
||||
if (rowItemExt != null) value = value + " | " + rowItemExt.Print(wm);
|
||||
if (!rowValues.Contains(value)) rowValues.Add(value);
|
||||
|
||||
if (twoDim)
|
||||
{
|
||||
value = columnItem.Print(wm);
|
||||
if (!columnValues.Contains(value)) columnValues.Add(value);
|
||||
if (columnItemExt != null) value = value + " | " + columnItemExt.Print(wm);
|
||||
if (!columnValues.Contains(value)) columnValues.Add(value);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Calculate occurances
|
||||
///
|
||||
int columns = Math.Max(1, columnValues.Count);
|
||||
int[,] occurances = new int[rowValues.Count, columns];
|
||||
int columnsCount = Math.Max(1, columnValues.Count);
|
||||
occurances = new int[rowValues.Count, columnsCount];
|
||||
|
||||
foreach (var wm in waterMeters)
|
||||
{
|
||||
for (int row = 0; row < rowValues.Count; row++)
|
||||
{
|
||||
string rowValue = rowItem.Print(wm);
|
||||
if (rowItemExt != null) rowValue = rowValue + " | " + rowItemExt.Print(wm);
|
||||
|
||||
if (twoDim)
|
||||
{
|
||||
for (int column = 0; column < columns; column++)
|
||||
for (int column = 0; column < columnsCount; column++)
|
||||
{
|
||||
if (rowItem.Print(wm).Equals(rowValues[row]) && columnItem.Print(wm).Equals(columnValues[column]))
|
||||
{
|
||||
occurances[row, column]++;
|
||||
}
|
||||
string columnValue = columnItem.Print(wm);
|
||||
if (columnItemExt != null) columnValue = columnValue + " | " + columnItemExt.Print(wm);
|
||||
|
||||
if (rowValue == rowValues[row] && columnValue == columnValues[column])
|
||||
{
|
||||
occurances[row, column]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rowItem.Print(wm).Equals(rowValues[row])) occurances[row, 0]++;
|
||||
if (rowValue == rowValues[row]) occurances[row, 0]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +128,7 @@ namespace ResultsBrowser.Forms
|
||||
statisticsListView.FullRowSelect = true;
|
||||
|
||||
statisticsListView.Columns.Add(" ", 200);
|
||||
for (int column = 0; column < columns; column++)
|
||||
for (int column = 0; column < columnsCount; column++)
|
||||
{
|
||||
statisticsListView.Columns.Add((twoDim ? columnValues[column] : Strings.Count), 70);
|
||||
}
|
||||
@@ -107,7 +136,7 @@ namespace ResultsBrowser.Forms
|
||||
for (int row = 0; row < rowValues.Count; row++)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem(rowValues[row]);
|
||||
for (int column = 0; column < columns; column++) lvi.SubItems.Add(occurances[row, column].ToString());
|
||||
for (int column = 0; column < columnsCount; column++) lvi.SubItems.Add(occurances[row, column].ToString());
|
||||
statisticsListView.Items.Add(lvi);
|
||||
}
|
||||
|
||||
@@ -120,10 +149,15 @@ namespace ResultsBrowser.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
private void closeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void printButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
new StatisticsPrintDocument("", rowValues, columnValues, occurances, Config.Entities.PageOrientation.Portrait).Print();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+207
-141
@@ -28,147 +28,207 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.rowsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.rowTestSpecTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.rowsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.columnsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.columnTestSpecTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.columnsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.twoDimCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.rowsGroupBox.SuspendLayout();
|
||||
this.columnsGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(368, 196);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 9;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(257, 196);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 8;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// rowsGroupBox
|
||||
//
|
||||
this.rowsGroupBox.Controls.Add(this.rowTestSpecTextBox);
|
||||
this.rowsGroupBox.Controls.Add(this.label1);
|
||||
this.rowsGroupBox.Controls.Add(this.rowsComboBox);
|
||||
this.rowsGroupBox.Location = new System.Drawing.Point(38, 50);
|
||||
this.rowsGroupBox.Name = "rowsGroupBox";
|
||||
this.rowsGroupBox.Size = new System.Drawing.Size(427, 56);
|
||||
this.rowsGroupBox.TabIndex = 10;
|
||||
this.rowsGroupBox.TabStop = false;
|
||||
this.rowsGroupBox.Text = "Rows";
|
||||
//
|
||||
// rowTestSpecTextBox
|
||||
//
|
||||
this.rowTestSpecTextBox.Location = new System.Drawing.Point(326, 22);
|
||||
this.rowTestSpecTextBox.Name = "rowTestSpecTextBox";
|
||||
this.rowTestSpecTextBox.Size = new System.Drawing.Size(61, 20);
|
||||
this.rowTestSpecTextBox.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(242, 24);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// rowsComboBox
|
||||
//
|
||||
this.rowsComboBox.FormattingEnabled = true;
|
||||
this.rowsComboBox.Location = new System.Drawing.Point(32, 21);
|
||||
this.rowsComboBox.Name = "rowsComboBox";
|
||||
this.rowsComboBox.Size = new System.Drawing.Size(185, 21);
|
||||
this.rowsComboBox.TabIndex = 0;
|
||||
//
|
||||
// columnsGroupBox
|
||||
//
|
||||
this.columnsGroupBox.Controls.Add(this.columnTestSpecTextBox);
|
||||
this.columnsGroupBox.Controls.Add(this.label2);
|
||||
this.columnsGroupBox.Controls.Add(this.columnsComboBox);
|
||||
this.columnsGroupBox.Location = new System.Drawing.Point(38, 112);
|
||||
this.columnsGroupBox.Name = "columnsGroupBox";
|
||||
this.columnsGroupBox.Size = new System.Drawing.Size(427, 56);
|
||||
this.columnsGroupBox.TabIndex = 11;
|
||||
this.columnsGroupBox.TabStop = false;
|
||||
this.columnsGroupBox.Text = "Columns";
|
||||
//
|
||||
// columnTestSpecTextBox
|
||||
//
|
||||
this.columnTestSpecTextBox.Location = new System.Drawing.Point(326, 21);
|
||||
this.columnTestSpecTextBox.Name = "columnTestSpecTextBox";
|
||||
this.columnTestSpecTextBox.Size = new System.Drawing.Size(61, 20);
|
||||
this.columnTestSpecTextBox.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(242, 23);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(35, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "label2";
|
||||
//
|
||||
// columnsComboBox
|
||||
//
|
||||
this.columnsComboBox.FormattingEnabled = true;
|
||||
this.columnsComboBox.Location = new System.Drawing.Point(32, 20);
|
||||
this.columnsComboBox.Name = "columnsComboBox";
|
||||
this.columnsComboBox.Size = new System.Drawing.Size(185, 21);
|
||||
this.columnsComboBox.TabIndex = 1;
|
||||
//
|
||||
// twoDimCheckBox
|
||||
//
|
||||
this.twoDimCheckBox.AutoSize = true;
|
||||
this.twoDimCheckBox.Location = new System.Drawing.Point(39, 21);
|
||||
this.twoDimCheckBox.Name = "twoDimCheckBox";
|
||||
this.twoDimCheckBox.Size = new System.Drawing.Size(40, 17);
|
||||
this.twoDimCheckBox.TabIndex = 12;
|
||||
this.twoDimCheckBox.Text = "2D";
|
||||
this.twoDimCheckBox.UseVisualStyleBackColor = true;
|
||||
this.twoDimCheckBox.CheckedChanged += new System.EventHandler(this.twoDimCheckBox_CheckedChanged);
|
||||
//
|
||||
// StatisticsOptionsDlg
|
||||
//
|
||||
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(503, 262);
|
||||
this.Controls.Add(this.columnsGroupBox);
|
||||
this.Controls.Add(this.twoDimCheckBox);
|
||||
this.Controls.Add(this.rowsGroupBox);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Name = "StatisticsOptionsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "StatisticsOptionsDlg";
|
||||
this.Load += new System.EventHandler(this.StatisticsOptionsDlg_Load);
|
||||
this.rowsGroupBox.ResumeLayout(false);
|
||||
this.rowsGroupBox.PerformLayout();
|
||||
this.columnsGroupBox.ResumeLayout(false);
|
||||
this.columnsGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.rowsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.rowTestSpecTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.rowsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.columnsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.columnTestSpecTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.columnsComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.twoDimCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.columnsExtComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.columnExtTestSpecTextBox = new System.Windows.Forms.TextBox();
|
||||
this.rowExtTestSpecTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.rowsExtComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.rowsGroupBox.SuspendLayout();
|
||||
this.columnsGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(368, 251);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.cancelButton.TabIndex = 9;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(257, 251);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(95, 38);
|
||||
this.okButton.TabIndex = 8;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// rowsGroupBox
|
||||
//
|
||||
this.rowsGroupBox.Controls.Add(this.rowExtTestSpecTextBox);
|
||||
this.rowsGroupBox.Controls.Add(this.label4);
|
||||
this.rowsGroupBox.Controls.Add(this.rowsExtComboBox);
|
||||
this.rowsGroupBox.Controls.Add(this.rowTestSpecTextBox);
|
||||
this.rowsGroupBox.Controls.Add(this.label1);
|
||||
this.rowsGroupBox.Controls.Add(this.rowsComboBox);
|
||||
this.rowsGroupBox.Location = new System.Drawing.Point(38, 50);
|
||||
this.rowsGroupBox.Name = "rowsGroupBox";
|
||||
this.rowsGroupBox.Size = new System.Drawing.Size(427, 84);
|
||||
this.rowsGroupBox.TabIndex = 10;
|
||||
this.rowsGroupBox.TabStop = false;
|
||||
this.rowsGroupBox.Text = "Rows";
|
||||
//
|
||||
// rowTestSpecTextBox
|
||||
//
|
||||
this.rowTestSpecTextBox.Location = new System.Drawing.Point(326, 24);
|
||||
this.rowTestSpecTextBox.Name = "rowTestSpecTextBox";
|
||||
this.rowTestSpecTextBox.Size = new System.Drawing.Size(61, 20);
|
||||
this.rowTestSpecTextBox.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(242, 27);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// rowsComboBox
|
||||
//
|
||||
this.rowsComboBox.FormattingEnabled = true;
|
||||
this.rowsComboBox.Location = new System.Drawing.Point(32, 24);
|
||||
this.rowsComboBox.Name = "rowsComboBox";
|
||||
this.rowsComboBox.Size = new System.Drawing.Size(185, 21);
|
||||
this.rowsComboBox.TabIndex = 0;
|
||||
//
|
||||
// columnsGroupBox
|
||||
//
|
||||
this.columnsGroupBox.Controls.Add(this.columnExtTestSpecTextBox);
|
||||
this.columnsGroupBox.Controls.Add(this.label3);
|
||||
this.columnsGroupBox.Controls.Add(this.columnsExtComboBox);
|
||||
this.columnsGroupBox.Controls.Add(this.columnTestSpecTextBox);
|
||||
this.columnsGroupBox.Controls.Add(this.label2);
|
||||
this.columnsGroupBox.Controls.Add(this.columnsComboBox);
|
||||
this.columnsGroupBox.Location = new System.Drawing.Point(38, 147);
|
||||
this.columnsGroupBox.Name = "columnsGroupBox";
|
||||
this.columnsGroupBox.Size = new System.Drawing.Size(427, 84);
|
||||
this.columnsGroupBox.TabIndex = 11;
|
||||
this.columnsGroupBox.TabStop = false;
|
||||
this.columnsGroupBox.Text = "Columns";
|
||||
//
|
||||
// columnTestSpecTextBox
|
||||
//
|
||||
this.columnTestSpecTextBox.Location = new System.Drawing.Point(326, 23);
|
||||
this.columnTestSpecTextBox.Name = "columnTestSpecTextBox";
|
||||
this.columnTestSpecTextBox.Size = new System.Drawing.Size(61, 20);
|
||||
this.columnTestSpecTextBox.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(242, 26);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(35, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "label2";
|
||||
//
|
||||
// columnsComboBox
|
||||
//
|
||||
this.columnsComboBox.FormattingEnabled = true;
|
||||
this.columnsComboBox.Location = new System.Drawing.Point(32, 23);
|
||||
this.columnsComboBox.Name = "columnsComboBox";
|
||||
this.columnsComboBox.Size = new System.Drawing.Size(185, 21);
|
||||
this.columnsComboBox.TabIndex = 1;
|
||||
//
|
||||
// twoDimCheckBox
|
||||
//
|
||||
this.twoDimCheckBox.AutoSize = true;
|
||||
this.twoDimCheckBox.Location = new System.Drawing.Point(39, 21);
|
||||
this.twoDimCheckBox.Name = "twoDimCheckBox";
|
||||
this.twoDimCheckBox.Size = new System.Drawing.Size(40, 17);
|
||||
this.twoDimCheckBox.TabIndex = 12;
|
||||
this.twoDimCheckBox.Text = "2D";
|
||||
this.twoDimCheckBox.UseVisualStyleBackColor = true;
|
||||
this.twoDimCheckBox.CheckedChanged += new System.EventHandler(this.twoDimCheckBox_CheckedChanged);
|
||||
//
|
||||
// columnsExtComboBox
|
||||
//
|
||||
this.columnsExtComboBox.FormattingEnabled = true;
|
||||
this.columnsExtComboBox.Location = new System.Drawing.Point(32, 51);
|
||||
this.columnsExtComboBox.Name = "columnsExtComboBox";
|
||||
this.columnsExtComboBox.Size = new System.Drawing.Size(185, 21);
|
||||
this.columnsExtComboBox.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(242, 54);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(35, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "label3";
|
||||
//
|
||||
// columnExtTestSpecTextBox
|
||||
//
|
||||
this.columnExtTestSpecTextBox.Location = new System.Drawing.Point(326, 51);
|
||||
this.columnExtTestSpecTextBox.Name = "columnExtTestSpecTextBox";
|
||||
this.columnExtTestSpecTextBox.Size = new System.Drawing.Size(61, 20);
|
||||
this.columnExtTestSpecTextBox.TabIndex = 6;
|
||||
//
|
||||
// rowExtTestSpecTextBox
|
||||
//
|
||||
this.rowExtTestSpecTextBox.Location = new System.Drawing.Point(326, 52);
|
||||
this.rowExtTestSpecTextBox.Name = "rowExtTestSpecTextBox";
|
||||
this.rowExtTestSpecTextBox.Size = new System.Drawing.Size(61, 20);
|
||||
this.rowExtTestSpecTextBox.TabIndex = 5;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(242, 55);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(35, 13);
|
||||
this.label4.TabIndex = 4;
|
||||
this.label4.Text = "label4";
|
||||
//
|
||||
// rowsExtComboBox
|
||||
//
|
||||
this.rowsExtComboBox.FormattingEnabled = true;
|
||||
this.rowsExtComboBox.Location = new System.Drawing.Point(32, 52);
|
||||
this.rowsExtComboBox.Name = "rowsExtComboBox";
|
||||
this.rowsExtComboBox.Size = new System.Drawing.Size(185, 21);
|
||||
this.rowsExtComboBox.TabIndex = 3;
|
||||
//
|
||||
// StatisticsOptionsDlg
|
||||
//
|
||||
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(503, 307);
|
||||
this.Controls.Add(this.columnsGroupBox);
|
||||
this.Controls.Add(this.twoDimCheckBox);
|
||||
this.Controls.Add(this.rowsGroupBox);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Name = "StatisticsOptionsDlg";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "StatisticsOptionsDlg";
|
||||
this.Load += new System.EventHandler(this.StatisticsOptionsDlg_Load);
|
||||
this.rowsGroupBox.ResumeLayout(false);
|
||||
this.rowsGroupBox.PerformLayout();
|
||||
this.columnsGroupBox.ResumeLayout(false);
|
||||
this.columnsGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -185,5 +245,11 @@
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox columnTestSpecTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox columnExtTestSpecTextBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox columnsExtComboBox;
|
||||
private System.Windows.Forms.TextBox rowExtTestSpecTextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.ComboBox rowsExtComboBox;
|
||||
}
|
||||
}
|
||||
@@ -16,9 +16,13 @@ namespace ResultsBrowser.Forms
|
||||
|
||||
public bool TwoDim;
|
||||
public Results.WMeterRsltItemSpec RowItem;
|
||||
public Results.WMeterRsltItemSpec RowItemExt;
|
||||
public Results.WMeterRsltItemSpec ColumnItem;
|
||||
public string RowTestSpecifier;
|
||||
public string ColumnTestSpecifier;
|
||||
public Results.WMeterRsltItemSpec ColumnItemExt;
|
||||
public string RowTestSpecifier;
|
||||
public string RowExtTestSpecifier;
|
||||
public string ColumnTestSpecifier;
|
||||
public string ColumnExtTestSpecifier;
|
||||
|
||||
public StatisticsOptionsDlg(IList<Results.WMeterRsltItemSpec> items)
|
||||
{
|
||||
@@ -34,16 +38,22 @@ namespace ResultsBrowser.Forms
|
||||
columnsComboBox.Enabled = twoDimCheckBox.Checked = TwoDim = Program.LocalSettings.TwoDim;
|
||||
|
||||
rowsComboBox.Text = Program.LocalSettings.RowItemCaption;
|
||||
rowsExtComboBox.Text = Program.LocalSettings.RowExtItemCaption;
|
||||
columnsComboBox.Text = Program.LocalSettings.ColumnItemCaption;
|
||||
columnsExtComboBox.Text = Program.LocalSettings.ColumnExtItemCaption;
|
||||
///
|
||||
foreach (var item in items)
|
||||
{
|
||||
rowsComboBox.Items.Add(item.Caption);
|
||||
columnsComboBox.Items.Add(item.Caption);
|
||||
rowsExtComboBox.Items.Add(item.Caption);
|
||||
columnsComboBox.Items.Add(item.Caption);
|
||||
columnsExtComboBox.Items.Add(item.Caption);
|
||||
}
|
||||
|
||||
rowTestSpecTextBox.Text = RowTestSpecifier = Program.LocalSettings.RowTestSpecifier;
|
||||
rowExtTestSpecTextBox.Text = RowExtTestSpecifier = Program.LocalSettings.RowExtTestSpecifier;
|
||||
columnTestSpecTextBox.Text = ColumnTestSpecifier = Program.LocalSettings.ColumnTestSpecifier;
|
||||
columnExtTestSpecTextBox.Text = ColumnExtTestSpecifier = Program.LocalSettings.ColumnExtTestSpecifier;
|
||||
}
|
||||
|
||||
void Localize()
|
||||
@@ -55,7 +65,9 @@ namespace ResultsBrowser.Forms
|
||||
columnsGroupBox.Text = Strings.Columns;
|
||||
label1.Text = Strings.Test;
|
||||
label2.Text = Strings.Test;
|
||||
}
|
||||
label3.Text = Strings.Test;
|
||||
label4.Text = Strings.Test;
|
||||
}
|
||||
|
||||
private void twoDimCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -66,22 +78,21 @@ namespace ResultsBrowser.Forms
|
||||
{
|
||||
TwoDim = twoDimCheckBox.Checked;
|
||||
RowTestSpecifier = rowTestSpecTextBox.Text;
|
||||
ColumnTestSpecifier = columnTestSpecTextBox.Text;
|
||||
RowExtTestSpecifier = rowExtTestSpecTextBox.Text;
|
||||
ColumnTestSpecifier = columnTestSpecTextBox.Text;
|
||||
ColumnExtTestSpecifier = columnExtTestSpecTextBox.Text;
|
||||
|
||||
RowItem = null;
|
||||
RowItemExt = null;
|
||||
ColumnItem = null;
|
||||
ColumnItemExt = null;
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (rowsComboBox.Text.Equals(item.Caption))
|
||||
{
|
||||
RowItem = item;
|
||||
}
|
||||
|
||||
if (TwoDim && columnsComboBox.Text.Equals(item.Caption))
|
||||
{
|
||||
ColumnItem = item;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rowsComboBox.Text) && rowsComboBox.Text.Equals(item.Caption)) RowItem = item;
|
||||
if (!string.IsNullOrEmpty(rowsExtComboBox.Text) && rowsExtComboBox.Text.Equals(item.Caption)) RowItemExt = item;
|
||||
if (!string.IsNullOrEmpty(columnsComboBox.Text) && TwoDim && columnsComboBox.Text.Equals(item.Caption)) ColumnItem = item;
|
||||
if (!string.IsNullOrEmpty(columnsExtComboBox.Text) && TwoDim && columnsExtComboBox.Text.Equals(item.Caption)) ColumnItemExt = item;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,9 +104,13 @@ namespace ResultsBrowser.Forms
|
||||
|
||||
Program.LocalSettings.TwoDim = TwoDim;
|
||||
Program.LocalSettings.RowItemCaption = RowItem.Caption;
|
||||
Program.LocalSettings.RowExtItemCaption = (RowItemExt != null) ? RowItemExt.Caption : string.Empty;
|
||||
Program.LocalSettings.ColumnItemCaption = (ColumnItem != null) ? ColumnItem.Caption : string.Empty;
|
||||
Program.LocalSettings.ColumnExtItemCaption = (ColumnItemExt != null) ? ColumnItemExt.Caption : string.Empty;
|
||||
Program.LocalSettings.RowTestSpecifier = RowTestSpecifier;
|
||||
Program.LocalSettings.ColumnTestSpecifier = ColumnTestSpecifier;
|
||||
Program.LocalSettings.RowExtTestSpecifier = RowExtTestSpecifier;
|
||||
Program.LocalSettings.ColumnTestSpecifier = ColumnTestSpecifier;
|
||||
Program.LocalSettings.ColumnExtTestSpecifier = ColumnExtTestSpecifier;
|
||||
Program.LocalSettings.Save();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
Reference in New Issue
Block a user