From b97b795c936ec75b8c5d7d70e64f9f2c5866aa02 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 19 Jan 2021 13:52:24 +0100 Subject: [PATCH] ResultsBrowser supports 9 test benches, ver. 2.26.1577 --- .../Forms/DatabaseSettingsDlg.Designer.cs | 88 +++++-- ResultsBrowser/Forms/DatabaseSettingsDlg.cs | 12 + ResultsBrowser/LocalSettings.cs | 29 ++- ResultsBrowser/Properties/AssemblyInfo.cs | 4 +- ResultsBrowser/ResultsBrowserWnd.Designer.cs | 235 +++++++++++------- ResultsBrowser/ResultsBrowserWnd.cs | 106 ++++---- 6 files changed, 313 insertions(+), 161 deletions(-) diff --git a/ResultsBrowser/Forms/DatabaseSettingsDlg.Designer.cs b/ResultsBrowser/Forms/DatabaseSettingsDlg.Designer.cs index 01533910b..649a1d897 100644 --- a/ResultsBrowser/Forms/DatabaseSettingsDlg.Designer.cs +++ b/ResultsBrowser/Forms/DatabaseSettingsDlg.Designer.cs @@ -48,13 +48,19 @@ this.connectionStringTextBox4 = new System.Windows.Forms.TextBox(); this.benchNameTextBox6 = new System.Windows.Forms.TextBox(); this.connectionStringTextBox6 = new System.Windows.Forms.TextBox(); + this.benchNameTextBox9 = new System.Windows.Forms.TextBox(); + this.connectionStringTextBox9 = new System.Windows.Forms.TextBox(); + this.benchNameTextBox8 = new System.Windows.Forms.TextBox(); + this.benchNameTextBox7 = new System.Windows.Forms.TextBox(); + this.connectionStringTextBox8 = new System.Windows.Forms.TextBox(); + this.connectionStringTextBox7 = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // connectionStringTextBox1 // this.connectionStringTextBox1.Location = new System.Drawing.Point(157, 45); this.connectionStringTextBox1.Name = "connectionStringTextBox1"; - this.connectionStringTextBox1.Size = new System.Drawing.Size(555, 20); + this.connectionStringTextBox1.Size = new System.Drawing.Size(713, 20); this.connectionStringTextBox1.TabIndex = 3; // // benchNameLabel @@ -79,20 +85,20 @@ // this.connectionStringTextBox2.Location = new System.Drawing.Point(157, 69); this.connectionStringTextBox2.Name = "connectionStringTextBox2"; - this.connectionStringTextBox2.Size = new System.Drawing.Size(555, 20); + this.connectionStringTextBox2.Size = new System.Drawing.Size(713, 20); this.connectionStringTextBox2.TabIndex = 5; // // connectionStringTextBox3 // this.connectionStringTextBox3.Location = new System.Drawing.Point(157, 93); this.connectionStringTextBox3.Name = "connectionStringTextBox3"; - this.connectionStringTextBox3.Size = new System.Drawing.Size(555, 20); + this.connectionStringTextBox3.Size = new System.Drawing.Size(713, 20); this.connectionStringTextBox3.TabIndex = 7; // // okButton // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.okButton.Location = new System.Drawing.Point(506, 250); + this.okButton.Location = new System.Drawing.Point(664, 326); this.okButton.Name = "okButton"; this.okButton.Size = new System.Drawing.Size(95, 38); this.okButton.TabIndex = 18; @@ -104,7 +110,7 @@ // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(617, 250); + this.cancelButton.Location = new System.Drawing.Point(775, 326); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(95, 38); this.cancelButton.TabIndex = 19; @@ -137,7 +143,7 @@ // this.languageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.languageLabel.AutoSize = true; - this.languageLabel.Location = new System.Drawing.Point(26, 245); + this.languageLabel.Location = new System.Drawing.Point(26, 317); this.languageLabel.Name = "languageLabel"; this.languageLabel.Size = new System.Drawing.Size(55, 13); this.languageLabel.TabIndex = 14; @@ -146,7 +152,7 @@ // languageTextBox // this.languageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.languageTextBox.Location = new System.Drawing.Point(29, 263); + this.languageTextBox.Location = new System.Drawing.Point(29, 335); this.languageTextBox.Name = "languageTextBox"; this.languageTextBox.Size = new System.Drawing.Size(100, 20); this.languageTextBox.TabIndex = 15; @@ -155,7 +161,7 @@ // this.formatLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.formatLabel.AutoSize = true; - this.formatLabel.Location = new System.Drawing.Point(26, 196); + this.formatLabel.Location = new System.Drawing.Point(26, 268); this.formatLabel.Name = "formatLabel"; this.formatLabel.Size = new System.Drawing.Size(94, 13); this.formatLabel.TabIndex = 12; @@ -164,9 +170,9 @@ // timePeriodFormatTextBox // this.timePeriodFormatTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 215); + this.timePeriodFormatTextBox.Location = new System.Drawing.Point(29, 287); this.timePeriodFormatTextBox.Name = "timePeriodFormatTextBox"; - this.timePeriodFormatTextBox.Size = new System.Drawing.Size(683, 20); + this.timePeriodFormatTextBox.Size = new System.Drawing.Size(841, 20); this.timePeriodFormatTextBox.TabIndex = 13; // // benchNameTextBox5 @@ -187,14 +193,14 @@ // this.connectionStringTextBox5.Location = new System.Drawing.Point(157, 141); this.connectionStringTextBox5.Name = "connectionStringTextBox5"; - this.connectionStringTextBox5.Size = new System.Drawing.Size(555, 20); + this.connectionStringTextBox5.Size = new System.Drawing.Size(713, 20); this.connectionStringTextBox5.TabIndex = 11; // // connectionStringTextBox4 // this.connectionStringTextBox4.Location = new System.Drawing.Point(157, 117); this.connectionStringTextBox4.Name = "connectionStringTextBox4"; - this.connectionStringTextBox4.Size = new System.Drawing.Size(555, 20); + this.connectionStringTextBox4.Size = new System.Drawing.Size(713, 20); this.connectionStringTextBox4.TabIndex = 9; // // benchNameTextBox6 @@ -208,16 +214,64 @@ // this.connectionStringTextBox6.Location = new System.Drawing.Point(157, 165); this.connectionStringTextBox6.Name = "connectionStringTextBox6"; - this.connectionStringTextBox6.Size = new System.Drawing.Size(555, 20); + this.connectionStringTextBox6.Size = new System.Drawing.Size(713, 20); this.connectionStringTextBox6.TabIndex = 21; // + // benchNameTextBox9 + // + this.benchNameTextBox9.Location = new System.Drawing.Point(29, 237); + this.benchNameTextBox9.Name = "benchNameTextBox9"; + this.benchNameTextBox9.Size = new System.Drawing.Size(100, 20); + this.benchNameTextBox9.TabIndex = 26; + // + // connectionStringTextBox9 + // + this.connectionStringTextBox9.Location = new System.Drawing.Point(157, 237); + this.connectionStringTextBox9.Name = "connectionStringTextBox9"; + this.connectionStringTextBox9.Size = new System.Drawing.Size(713, 20); + this.connectionStringTextBox9.TabIndex = 27; + // + // benchNameTextBox8 + // + this.benchNameTextBox8.Location = new System.Drawing.Point(29, 213); + this.benchNameTextBox8.Name = "benchNameTextBox8"; + this.benchNameTextBox8.Size = new System.Drawing.Size(100, 20); + this.benchNameTextBox8.TabIndex = 24; + // + // benchNameTextBox7 + // + this.benchNameTextBox7.Location = new System.Drawing.Point(29, 189); + this.benchNameTextBox7.Name = "benchNameTextBox7"; + this.benchNameTextBox7.Size = new System.Drawing.Size(100, 20); + this.benchNameTextBox7.TabIndex = 22; + // + // connectionStringTextBox8 + // + this.connectionStringTextBox8.Location = new System.Drawing.Point(157, 213); + this.connectionStringTextBox8.Name = "connectionStringTextBox8"; + this.connectionStringTextBox8.Size = new System.Drawing.Size(713, 20); + this.connectionStringTextBox8.TabIndex = 25; + // + // connectionStringTextBox7 + // + this.connectionStringTextBox7.Location = new System.Drawing.Point(157, 189); + this.connectionStringTextBox7.Name = "connectionStringTextBox7"; + this.connectionStringTextBox7.Size = new System.Drawing.Size(713, 20); + this.connectionStringTextBox7.TabIndex = 23; + // // DatabaseSettingsDlg // 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(743, 310); + this.ClientSize = new System.Drawing.Size(901, 382); + this.Controls.Add(this.benchNameTextBox9); + this.Controls.Add(this.connectionStringTextBox9); + this.Controls.Add(this.benchNameTextBox8); + this.Controls.Add(this.benchNameTextBox7); + this.Controls.Add(this.connectionStringTextBox8); + this.Controls.Add(this.connectionStringTextBox7); this.Controls.Add(this.benchNameTextBox6); this.Controls.Add(this.connectionStringTextBox6); this.Controls.Add(this.benchNameTextBox5); @@ -269,5 +323,11 @@ private System.Windows.Forms.TextBox connectionStringTextBox4; private System.Windows.Forms.TextBox benchNameTextBox6; private System.Windows.Forms.TextBox connectionStringTextBox6; + private System.Windows.Forms.TextBox benchNameTextBox9; + private System.Windows.Forms.TextBox connectionStringTextBox9; + private System.Windows.Forms.TextBox benchNameTextBox8; + private System.Windows.Forms.TextBox benchNameTextBox7; + private System.Windows.Forms.TextBox connectionStringTextBox8; + private System.Windows.Forms.TextBox connectionStringTextBox7; } } \ No newline at end of file diff --git a/ResultsBrowser/Forms/DatabaseSettingsDlg.cs b/ResultsBrowser/Forms/DatabaseSettingsDlg.cs index f5def967a..bbabfacc4 100644 --- a/ResultsBrowser/Forms/DatabaseSettingsDlg.cs +++ b/ResultsBrowser/Forms/DatabaseSettingsDlg.cs @@ -21,6 +21,9 @@ namespace ResultsBrowser.Forms benchNameTextBox4.Text = Program.LocalSettings.Bench4; benchNameTextBox5.Text = Program.LocalSettings.Bench5; benchNameTextBox6.Text = Program.LocalSettings.Bench6; + benchNameTextBox7.Text = Program.LocalSettings.Bench7; + benchNameTextBox8.Text = Program.LocalSettings.Bench8; + benchNameTextBox9.Text = Program.LocalSettings.Bench9; connectionStringTextBox1.Text = Program.LocalSettings.ConnectionString1; connectionStringTextBox2.Text = Program.LocalSettings.ConnectionString2; @@ -28,6 +31,9 @@ namespace ResultsBrowser.Forms connectionStringTextBox4.Text = Program.LocalSettings.ConnectionString4; connectionStringTextBox5.Text = Program.LocalSettings.ConnectionString5; connectionStringTextBox6.Text = Program.LocalSettings.ConnectionString6; + connectionStringTextBox7.Text = Program.LocalSettings.ConnectionString7; + connectionStringTextBox8.Text = Program.LocalSettings.ConnectionString8; + connectionStringTextBox9.Text = Program.LocalSettings.ConnectionString9; timePeriodFormatTextBox.Text = Program.LocalSettings.TimePeriodFormat; @@ -53,6 +59,9 @@ namespace ResultsBrowser.Forms Program.LocalSettings.Bench4 = benchNameTextBox4.Text; Program.LocalSettings.Bench5 = benchNameTextBox5.Text; Program.LocalSettings.Bench6 = benchNameTextBox6.Text; + Program.LocalSettings.Bench7 = benchNameTextBox7.Text; + Program.LocalSettings.Bench8 = benchNameTextBox8.Text; + Program.LocalSettings.Bench9 = benchNameTextBox9.Text; Program.LocalSettings.ConnectionString1 = connectionStringTextBox1.Text; Program.LocalSettings.ConnectionString2 = connectionStringTextBox2.Text; @@ -60,6 +69,9 @@ namespace ResultsBrowser.Forms Program.LocalSettings.ConnectionString4 = connectionStringTextBox4.Text; Program.LocalSettings.ConnectionString5 = connectionStringTextBox5.Text; Program.LocalSettings.ConnectionString6 = connectionStringTextBox6.Text; + Program.LocalSettings.ConnectionString7 = connectionStringTextBox7.Text; + Program.LocalSettings.ConnectionString8 = connectionStringTextBox8.Text; + Program.LocalSettings.ConnectionString9 = connectionStringTextBox9.Text; Program.LocalSettings.TimePeriodFormat = timePeriodFormatTextBox.Text; diff --git a/ResultsBrowser/LocalSettings.cs b/ResultsBrowser/LocalSettings.cs index bbe657959..5cb358c03 100644 --- a/ResultsBrowser/LocalSettings.cs +++ b/ResultsBrowser/LocalSettings.cs @@ -30,6 +30,9 @@ namespace ResultsBrowser public string Bench4; public string Bench5; public string Bench6; + public string Bench7; + public string Bench8; + public string Bench9; /// Database settings of servers. public string ConnectionString1; @@ -38,6 +41,9 @@ namespace ResultsBrowser public string ConnectionString4; public string ConnectionString5; public string ConnectionString6; + public string ConnectionString7; + public string ConnectionString8; + public string ConnectionString9; public bool Bench1Selected; public bool Bench2Selected; @@ -45,6 +51,9 @@ namespace ResultsBrowser public bool Bench4Selected; public bool Bench5Selected; public bool Bench6Selected; + public bool Bench7Selected; + public bool Bench8Selected; + public bool Bench9Selected; public string TimePeriodFormat; @@ -115,13 +124,19 @@ namespace ResultsBrowser Bench3 = "WR13"; Bench4 = "WR14"; Bench5 = "WR15"; - Bench6 = "PT7"; - ConnectionString1 = "SERVER=10.42.130.69; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;"; - ConnectionString2 = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;"; - ConnectionString3 = "SERVER=10.42.128.61; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;"; - ConnectionString4 = "SERVER=10.42.130.72; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;"; - ConnectionString5 = "SERVER=10.42.130.71; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;"; - ConnectionString6 = "SERVER=10.42.129.26; DATABASE=iperlspecial-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CHARSET=utf8;"; + Bench6 = "WR18"; + Bench7 = "WR19"; + Bench8 = "WR20"; + Bench9 = "WR21"; + ConnectionString1 = "SERVER=10.42.129.253; DATABASE=st-wr10-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString2 = "SERVER=10.42.129.27; DATABASE=st-wr11-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString3 = "SERVER=10.42.128.138; DATABASE=st-wr13-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString4 = "SERVER=10.42.128.146; DATABASE=st-wr14-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString5 = "SERVER=10.42.130.97; DATABASE=st-wr15-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString6 = "SERVER=10.42.130.165; DATABASE=st-wr18-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString7 = "SERVER=10.42.128.159; DATABASE=st-wr19-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString8 = "SERVER=10.42.130.76; DATABASE=st-wr20-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; + ConnectionString9 = "SERVER=10.42.128.150; DATABASE=st-wr21-r; UID=vysledky; PASSWORD=GAqx76QUB6NbnpZP; CharSet=utf8;"; Language = "SK"; #endif } diff --git a/ResultsBrowser/Properties/AssemblyInfo.cs b/ResultsBrowser/Properties/AssemblyInfo.cs index 61ff237f5..886b609cd 100644 --- a/ResultsBrowser/Properties/AssemblyInfo.cs +++ b/ResultsBrowser/Properties/AssemblyInfo.cs @@ -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.26.1498.0")] -[assembly: AssemblyFileVersion("2.26.1498.0")] +[assembly: AssemblyVersion("2.26.1577.0")] +[assembly: AssemblyFileVersion("2.26.1577.0")] diff --git a/ResultsBrowser/ResultsBrowserWnd.Designer.cs b/ResultsBrowser/ResultsBrowserWnd.Designer.cs index 3fa1ae54c..b45051059 100644 --- a/ResultsBrowser/ResultsBrowserWnd.Designer.cs +++ b/ResultsBrowser/ResultsBrowserWnd.Designer.cs @@ -51,12 +51,15 @@ this.executeQueryBtn = new System.Windows.Forms.Button(); this.addFilterBtn = new System.Windows.Forms.Button(); this.testBenchesGroupBox = new System.Windows.Forms.GroupBox(); - this.checkBox6 = new System.Windows.Forms.RadioButton(); - this.checkBox5 = new System.Windows.Forms.RadioButton(); - this.checkBox4 = new System.Windows.Forms.RadioButton(); - this.checkBox3 = new System.Windows.Forms.RadioButton(); - this.checkBox2 = new System.Windows.Forms.RadioButton(); - this.checkBox1 = new System.Windows.Forms.RadioButton(); + this.radioButton9 = new System.Windows.Forms.RadioButton(); + this.radioButton8 = new System.Windows.Forms.RadioButton(); + this.radioButton7 = new System.Windows.Forms.RadioButton(); + this.radioButton6 = new System.Windows.Forms.RadioButton(); + this.radioButton5 = new System.Windows.Forms.RadioButton(); + this.radioButton4 = new System.Windows.Forms.RadioButton(); + this.radioButton3 = new System.Windows.Forms.RadioButton(); + this.radioButton2 = 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(); @@ -175,7 +178,7 @@ // // customQueryButton // - this.customQueryButton.Location = new System.Drawing.Point(31, 437); + this.customQueryButton.Location = new System.Drawing.Point(31, 443); this.customQueryButton.Name = "customQueryButton"; this.customQueryButton.Size = new System.Drawing.Size(85, 23); this.customQueryButton.TabIndex = 14; @@ -247,9 +250,9 @@ // // printerConfigBtn // - this.printerConfigBtn.Location = new System.Drawing.Point(8, 316); + this.printerConfigBtn.Location = new System.Drawing.Point(8, 331); this.printerConfigBtn.Name = "printerConfigBtn"; - this.printerConfigBtn.Size = new System.Drawing.Size(125, 35); + this.printerConfigBtn.Size = new System.Drawing.Size(125, 32); this.printerConfigBtn.TabIndex = 11; this.printerConfigBtn.Text = "Configure printer"; this.printerConfigBtn.UseVisualStyleBackColor = true; @@ -257,9 +260,9 @@ // // formatOfResultsBtn // - this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 276); + this.formatOfResultsBtn.Location = new System.Drawing.Point(8, 294); this.formatOfResultsBtn.Name = "formatOfResultsBtn"; - this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 35); + this.formatOfResultsBtn.Size = new System.Drawing.Size(125, 32); this.formatOfResultsBtn.TabIndex = 7; this.formatOfResultsBtn.Text = "Configure output"; this.formatOfResultsBtn.UseVisualStyleBackColor = true; @@ -267,9 +270,9 @@ // // clearFiltersBtn // - this.clearFiltersBtn.Location = new System.Drawing.Point(8, 196); + this.clearFiltersBtn.Location = new System.Drawing.Point(8, 220); this.clearFiltersBtn.Name = "clearFiltersBtn"; - this.clearFiltersBtn.Size = new System.Drawing.Size(125, 35); + this.clearFiltersBtn.Size = new System.Drawing.Size(125, 32); this.clearFiltersBtn.TabIndex = 2; this.clearFiltersBtn.Text = "Clear filters"; this.clearFiltersBtn.UseVisualStyleBackColor = true; @@ -287,9 +290,9 @@ // // saveConfigBtn // - this.saveConfigBtn.Location = new System.Drawing.Point(8, 356); + this.saveConfigBtn.Location = new System.Drawing.Point(8, 368); this.saveConfigBtn.Name = "saveConfigBtn"; - this.saveConfigBtn.Size = new System.Drawing.Size(125, 35); + this.saveConfigBtn.Size = new System.Drawing.Size(125, 32); this.saveConfigBtn.TabIndex = 5; this.saveConfigBtn.Text = "Save configuration"; this.saveConfigBtn.UseVisualStyleBackColor = true; @@ -297,9 +300,9 @@ // // loadConfigBtn // - this.loadConfigBtn.Location = new System.Drawing.Point(8, 396); + this.loadConfigBtn.Location = new System.Drawing.Point(8, 405); this.loadConfigBtn.Name = "loadConfigBtn"; - this.loadConfigBtn.Size = new System.Drawing.Size(125, 35); + this.loadConfigBtn.Size = new System.Drawing.Size(125, 32); this.loadConfigBtn.TabIndex = 4; this.loadConfigBtn.Text = "Load configuration"; this.loadConfigBtn.UseVisualStyleBackColor = true; @@ -307,9 +310,9 @@ // // executeQueryBtn // - this.executeQueryBtn.Location = new System.Drawing.Point(8, 468); + this.executeQueryBtn.Location = new System.Drawing.Point(8, 471); this.executeQueryBtn.Name = "executeQueryBtn"; - this.executeQueryBtn.Size = new System.Drawing.Size(125, 35); + this.executeQueryBtn.Size = new System.Drawing.Size(125, 32); this.executeQueryBtn.TabIndex = 6; this.executeQueryBtn.Text = "Execute query"; this.executeQueryBtn.UseVisualStyleBackColor = true; @@ -317,9 +320,9 @@ // // addFilterBtn // - this.addFilterBtn.Location = new System.Drawing.Point(8, 236); + this.addFilterBtn.Location = new System.Drawing.Point(8, 257); this.addFilterBtn.Name = "addFilterBtn"; - this.addFilterBtn.Size = new System.Drawing.Size(125, 35); + this.addFilterBtn.Size = new System.Drawing.Size(125, 32); this.addFilterBtn.TabIndex = 3; this.addFilterBtn.Text = "Add filter"; this.addFilterBtn.UseVisualStyleBackColor = true; @@ -327,90 +330,129 @@ // // testBenchesGroupBox // - this.testBenchesGroupBox.Controls.Add(this.checkBox6); - this.testBenchesGroupBox.Controls.Add(this.checkBox5); - this.testBenchesGroupBox.Controls.Add(this.checkBox4); - this.testBenchesGroupBox.Controls.Add(this.checkBox3); - this.testBenchesGroupBox.Controls.Add(this.checkBox2); - this.testBenchesGroupBox.Controls.Add(this.checkBox1); - this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 54); + this.testBenchesGroupBox.Controls.Add(this.radioButton9); + this.testBenchesGroupBox.Controls.Add(this.radioButton8); + this.testBenchesGroupBox.Controls.Add(this.radioButton7); + this.testBenchesGroupBox.Controls.Add(this.radioButton6); + this.testBenchesGroupBox.Controls.Add(this.radioButton5); + this.testBenchesGroupBox.Controls.Add(this.radioButton4); + this.testBenchesGroupBox.Controls.Add(this.radioButton3); + this.testBenchesGroupBox.Controls.Add(this.radioButton2); + this.testBenchesGroupBox.Controls.Add(this.radioButton1); + this.testBenchesGroupBox.Location = new System.Drawing.Point(8, 51); this.testBenchesGroupBox.Name = "testBenchesGroupBox"; - this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 135); + this.testBenchesGroupBox.Size = new System.Drawing.Size(125, 163); this.testBenchesGroupBox.TabIndex = 1; this.testBenchesGroupBox.TabStop = false; this.testBenchesGroupBox.Text = "Test benches"; // - // checkBox6 + // radioButton9 // - this.checkBox6.AutoSize = true; - this.checkBox6.Location = new System.Drawing.Point(23, 110); - this.checkBox6.Name = "checkBox6"; - this.checkBox6.Size = new System.Drawing.Size(85, 17); - this.checkBox6.TabIndex = 5; - this.checkBox6.TabStop = true; - this.checkBox6.Text = "radioButton6"; - this.checkBox6.UseVisualStyleBackColor = true; - this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged); + this.radioButton9.AutoSize = true; + this.radioButton9.Location = new System.Drawing.Point(25, 143); + this.radioButton9.Name = "radioButton9"; + this.radioButton9.Size = new System.Drawing.Size(85, 17); + this.radioButton9.TabIndex = 8; + this.radioButton9.TabStop = true; + this.radioButton9.Text = "radioButton9"; + this.radioButton9.UseVisualStyleBackColor = true; + this.radioButton9.CheckedChanged += new System.EventHandler(this.radioButton9_CheckedChanged); // - // checkBox5 + // radioButton8 // - this.checkBox5.AutoSize = true; - this.checkBox5.Location = new System.Drawing.Point(23, 92); - this.checkBox5.Name = "checkBox5"; - this.checkBox5.Size = new System.Drawing.Size(85, 17); - this.checkBox5.TabIndex = 4; - this.checkBox5.TabStop = true; - this.checkBox5.Text = "radioButton5"; - this.checkBox5.UseVisualStyleBackColor = true; - this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged); + this.radioButton8.AutoSize = true; + this.radioButton8.Location = new System.Drawing.Point(25, 127); + this.radioButton8.Name = "radioButton8"; + this.radioButton8.Size = new System.Drawing.Size(85, 17); + this.radioButton8.TabIndex = 7; + this.radioButton8.TabStop = true; + this.radioButton8.Text = "radioButton8"; + this.radioButton8.UseVisualStyleBackColor = true; + this.radioButton8.CheckedChanged += new System.EventHandler(this.radioButton8_CheckedChanged); // - // checkBox4 + // radioButton7 // - this.checkBox4.AutoSize = true; - this.checkBox4.Location = new System.Drawing.Point(23, 74); - this.checkBox4.Name = "checkBox4"; - this.checkBox4.Size = new System.Drawing.Size(85, 17); - this.checkBox4.TabIndex = 3; - this.checkBox4.TabStop = true; - this.checkBox4.Text = "radioButton4"; - this.checkBox4.UseVisualStyleBackColor = true; - this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged); + this.radioButton7.AutoSize = true; + this.radioButton7.Location = new System.Drawing.Point(25, 111); + this.radioButton7.Name = "radioButton7"; + this.radioButton7.Size = new System.Drawing.Size(85, 17); + this.radioButton7.TabIndex = 6; + this.radioButton7.TabStop = true; + this.radioButton7.Text = "radioButton7"; + this.radioButton7.UseVisualStyleBackColor = true; + this.radioButton7.CheckedChanged += new System.EventHandler(this.radioButton7_CheckedChanged); // - // checkBox3 + // radioButton6 // - this.checkBox3.AutoSize = true; - this.checkBox3.Location = new System.Drawing.Point(23, 55); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(85, 17); - this.checkBox3.TabIndex = 2; - this.checkBox3.TabStop = true; - this.checkBox3.Text = "radioButton3"; - this.checkBox3.UseVisualStyleBackColor = true; - this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); + this.radioButton6.AutoSize = true; + this.radioButton6.Location = new System.Drawing.Point(25, 95); + this.radioButton6.Name = "radioButton6"; + this.radioButton6.Size = new System.Drawing.Size(85, 17); + this.radioButton6.TabIndex = 5; + this.radioButton6.TabStop = true; + this.radioButton6.Text = "radioButton6"; + this.radioButton6.UseVisualStyleBackColor = true; + this.radioButton6.CheckedChanged += new System.EventHandler(this.radioButton6_CheckedChanged); // - // checkBox2 + // radioButton5 // - this.checkBox2.AutoSize = true; - this.checkBox2.Location = new System.Drawing.Point(23, 36); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(85, 17); - this.checkBox2.TabIndex = 1; - this.checkBox2.TabStop = true; - this.checkBox2.Text = "radioButton2"; - this.checkBox2.UseVisualStyleBackColor = true; - this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); + this.radioButton5.AutoSize = true; + this.radioButton5.Location = new System.Drawing.Point(25, 79); + this.radioButton5.Name = "radioButton5"; + this.radioButton5.Size = new System.Drawing.Size(85, 17); + this.radioButton5.TabIndex = 4; + this.radioButton5.TabStop = true; + this.radioButton5.Text = "radioButton5"; + this.radioButton5.UseVisualStyleBackColor = true; + this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged); // - // checkBox1 + // radioButton4 // - this.checkBox1.AutoSize = true; - this.checkBox1.Location = new System.Drawing.Point(23, 17); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(85, 17); - this.checkBox1.TabIndex = 0; - this.checkBox1.TabStop = true; - this.checkBox1.Text = "radioButton1"; - this.checkBox1.UseVisualStyleBackColor = true; - this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + this.radioButton4.AutoSize = true; + this.radioButton4.Location = new System.Drawing.Point(25, 63); + this.radioButton4.Name = "radioButton4"; + this.radioButton4.Size = new System.Drawing.Size(85, 17); + this.radioButton4.TabIndex = 3; + this.radioButton4.TabStop = true; + this.radioButton4.Text = "radioButton4"; + this.radioButton4.UseVisualStyleBackColor = true; + this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged); + // + // radioButton3 + // + this.radioButton3.AutoSize = true; + this.radioButton3.Location = new System.Drawing.Point(25, 47); + 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); + // + // radioButton2 + // + this.radioButton2.AutoSize = true; + this.radioButton2.Location = new System.Drawing.Point(25, 31); + 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); + // + // radioButton1 + // + this.radioButton1.AutoSize = true; + this.radioButton1.Location = new System.Drawing.Point(25, 15); + 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 // @@ -453,23 +495,26 @@ private System.Windows.Forms.Button settingsBtn; private System.Windows.Forms.GroupBox filtersGroupBox; private System.Windows.Forms.GroupBox resultsGroupBox; - private System.Windows.Forms.RadioButton checkBox3; - private System.Windows.Forms.RadioButton checkBox2; - private System.Windows.Forms.RadioButton checkBox1; + private System.Windows.Forms.RadioButton radioButton3; + private System.Windows.Forms.RadioButton radioButton2; + private System.Windows.Forms.RadioButton radioButton1; private System.Windows.Forms.Button clearFiltersBtn; private System.Windows.Forms.Button exportQueryResultsBtn; private System.Windows.Forms.Button formatOfResultsBtn; private System.Windows.Forms.Button printQueryResultsBtn; private System.Windows.Forms.Button statisticsBtn; private System.Windows.Forms.ListView resultsListView; - private System.Windows.Forms.RadioButton checkBox5; - private System.Windows.Forms.RadioButton checkBox4; + private System.Windows.Forms.RadioButton radioButton5; + private System.Windows.Forms.RadioButton radioButton4; private System.Windows.Forms.Button printerConfigBtn; - private System.Windows.Forms.RadioButton checkBox6; + private System.Windows.Forms.RadioButton radioButton6; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox outputGroupBox; private System.Windows.Forms.Button histogramBtn; private System.Windows.Forms.Button customQueryButton; private System.Windows.Forms.TextBox consoleTextBox; + private System.Windows.Forms.RadioButton radioButton7; + private System.Windows.Forms.RadioButton radioButton9; + private System.Windows.Forms.RadioButton radioButton8; } } \ No newline at end of file diff --git a/ResultsBrowser/ResultsBrowserWnd.cs b/ResultsBrowser/ResultsBrowserWnd.cs index 91bf72ed1..a40ecf733 100644 --- a/ResultsBrowser/ResultsBrowserWnd.cs +++ b/ResultsBrowser/ResultsBrowserWnd.cs @@ -64,12 +64,15 @@ namespace ResultsBrowser RedrawTestBenches(); - checkBox1.Checked = Program.LocalSettings.Bench1Selected; - checkBox2.Checked = Program.LocalSettings.Bench2Selected; - checkBox3.Checked = Program.LocalSettings.Bench3Selected; - checkBox4.Checked = Program.LocalSettings.Bench4Selected; - checkBox5.Checked = Program.LocalSettings.Bench5Selected; - checkBox6.Checked = Program.LocalSettings.Bench6Selected; + radioButton1.Checked = Program.LocalSettings.Bench1Selected; + radioButton2.Checked = Program.LocalSettings.Bench2Selected; + radioButton3.Checked = Program.LocalSettings.Bench3Selected; + radioButton4.Checked = Program.LocalSettings.Bench4Selected; + radioButton5.Checked = Program.LocalSettings.Bench5Selected; + radioButton6.Checked = Program.LocalSettings.Bench6Selected; + radioButton7.Checked = Program.LocalSettings.Bench7Selected; + radioButton8.Checked = Program.LocalSettings.Bench8Selected; + radioButton9.Checked = Program.LocalSettings.Bench9Selected; if (args.Length == 1 && args[0].IndexOf(".qry") == args[0].Length - 4) { @@ -87,29 +90,38 @@ namespace ResultsBrowser void RedrawTestBenches() { - checkBox1.Text = Program.LocalSettings.Bench1; - checkBox2.Text = Program.LocalSettings.Bench2; - checkBox3.Text = Program.LocalSettings.Bench3; - checkBox4.Text = Program.LocalSettings.Bench4; - checkBox5.Text = Program.LocalSettings.Bench5; - checkBox6.Text = Program.LocalSettings.Bench6; + radioButton1.Text = Program.LocalSettings.Bench1; + radioButton2.Text = Program.LocalSettings.Bench2; + radioButton3.Text = Program.LocalSettings.Bench3; + radioButton4.Text = Program.LocalSettings.Bench4; + radioButton5.Text = Program.LocalSettings.Bench5; + radioButton6.Text = Program.LocalSettings.Bench6; + radioButton7.Text = Program.LocalSettings.Bench7; + radioButton8.Text = Program.LocalSettings.Bench8; + radioButton9.Text = Program.LocalSettings.Bench9; - checkBox1.Visible = !string.IsNullOrEmpty(checkBox1.Text); - checkBox2.Visible = !string.IsNullOrEmpty(checkBox2.Text); - checkBox3.Visible = !string.IsNullOrEmpty(checkBox3.Text); - checkBox4.Visible = !string.IsNullOrEmpty(checkBox4.Text); - checkBox5.Visible = !string.IsNullOrEmpty(checkBox5.Text); - checkBox6.Visible = !string.IsNullOrEmpty(checkBox6.Text); + radioButton1.Visible = !string.IsNullOrEmpty(radioButton1.Text); + radioButton2.Visible = !string.IsNullOrEmpty(radioButton2.Text); + radioButton3.Visible = !string.IsNullOrEmpty(radioButton3.Text); + radioButton4.Visible = !string.IsNullOrEmpty(radioButton4.Text); + radioButton5.Visible = !string.IsNullOrEmpty(radioButton5.Text); + radioButton6.Visible = !string.IsNullOrEmpty(radioButton6.Text); + radioButton7.Visible = !string.IsNullOrEmpty(radioButton7.Text); + radioButton8.Visible = !string.IsNullOrEmpty(radioButton8.Text); + radioButton9.Visible = !string.IsNullOrEmpty(radioButton9.Text); } string BenchName() { - return checkBox1.Checked ? Program.LocalSettings.Bench1 - : checkBox2.Checked ? Program.LocalSettings.Bench2 - : checkBox3.Checked ? Program.LocalSettings.Bench3 - : checkBox4.Checked ? Program.LocalSettings.Bench4 - : checkBox5.Checked ? Program.LocalSettings.Bench5 - : Program.LocalSettings.Bench6; + return radioButton1.Checked ? Program.LocalSettings.Bench1 + : radioButton2.Checked ? Program.LocalSettings.Bench2 + : radioButton3.Checked ? Program.LocalSettings.Bench3 + : radioButton4.Checked ? Program.LocalSettings.Bench4 + : radioButton5.Checked ? Program.LocalSettings.Bench5 + : radioButton6.Checked ? Program.LocalSettings.Bench6 + : radioButton7.Checked ? Program.LocalSettings.Bench7 + : radioButton8.Checked ? Program.LocalSettings.Bench8 + : Program.LocalSettings.Bench9; } void Localize() @@ -141,21 +153,27 @@ namespace ResultsBrowser } } - private void checkBox1_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } - private void checkBox2_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } - private void checkBox3_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } - private void checkBox4_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } - private void checkBox5_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } - private void checkBox6_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton1_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton2_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton3_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton4_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton5_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton6_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton7_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton8_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } + private void radioButton9_CheckedChanged(object sender, EventArgs e) { SaveCheckBoxes(); } void SaveCheckBoxes() { - Program.LocalSettings.Bench1Selected = checkBox1.Checked; - Program.LocalSettings.Bench2Selected = checkBox2.Checked; - Program.LocalSettings.Bench3Selected = checkBox3.Checked; - Program.LocalSettings.Bench4Selected = checkBox4.Checked; - Program.LocalSettings.Bench5Selected = checkBox5.Checked; - Program.LocalSettings.Bench6Selected = checkBox6.Checked; + Program.LocalSettings.Bench1Selected = radioButton1.Checked; + Program.LocalSettings.Bench2Selected = radioButton2.Checked; + Program.LocalSettings.Bench3Selected = radioButton3.Checked; + Program.LocalSettings.Bench4Selected = radioButton4.Checked; + Program.LocalSettings.Bench5Selected = radioButton5.Checked; + Program.LocalSettings.Bench6Selected = radioButton6.Checked; + Program.LocalSettings.Bench7Selected = radioButton7.Checked; + Program.LocalSettings.Bench8Selected = radioButton8.Checked; + Program.LocalSettings.Bench9Selected = radioButton9.Checked; Program.LocalSettings.Save(); } @@ -279,13 +297,15 @@ namespace ResultsBrowser waterMeters = null; IList waterMeters2; - Results.DB.ConnectionString = checkBox1.Checked ? Program.LocalSettings.ConnectionString1 : - (checkBox2.Checked ? Program.LocalSettings.ConnectionString2 : - (checkBox3.Checked ? Program.LocalSettings.ConnectionString3 : - (checkBox4.Checked ? Program.LocalSettings.ConnectionString4 : - (checkBox5.Checked ? Program.LocalSettings.ConnectionString5 : - (checkBox6.Checked ? Program.LocalSettings.ConnectionString6 : - Program.LocalSettings.ConnectionString1))))); + Results.DB.ConnectionString = radioButton1.Checked ? Program.LocalSettings.ConnectionString1 : + (radioButton2.Checked ? Program.LocalSettings.ConnectionString2 : + (radioButton3.Checked ? Program.LocalSettings.ConnectionString3 : + (radioButton4.Checked ? Program.LocalSettings.ConnectionString4 : + (radioButton5.Checked ? Program.LocalSettings.ConnectionString5 : + (radioButton6.Checked ? Program.LocalSettings.ConnectionString6 : + (radioButton7.Checked ? Program.LocalSettings.ConnectionString7 : + (radioButton8.Checked ? Program.LocalSettings.ConnectionString8 : + Program.LocalSettings.ConnectionString9))))))); ISession[] sessions = new ISession[] { Results.DB.CreateSession() };