diff --git a/TransportGuide/FormTests.Designer.cs b/TransportGuide/FormTests.Designer.cs index 083800b..1cb4fb2 100644 --- a/TransportGuide/FormTests.Designer.cs +++ b/TransportGuide/FormTests.Designer.cs @@ -38,155 +38,111 @@ this.label4 = new System.Windows.Forms.Label(); this.numericUpDownInsert = new System.Windows.Forms.NumericUpDown(); this.numericUpDownRead = new System.Windows.Forms.NumericUpDown(); - this.buttonJoinQuery = new System.Windows.Forms.Button(); - this.numericUpDownJoin = new System.Windows.Forms.NumericUpDown(); - this.textBoxJoin = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInsert)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownJoin)).BeginInit(); this.SuspendLayout(); // // buttonInsertTest // - this.buttonInsertTest.Location = new System.Drawing.Point(12, 12); + this.buttonInsertTest.Location = new System.Drawing.Point(17, 20); + this.buttonInsertTest.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.buttonInsertTest.Name = "buttonInsertTest"; - this.buttonInsertTest.Size = new System.Drawing.Size(86, 61); + this.buttonInsertTest.Size = new System.Drawing.Size(123, 102); this.buttonInsertTest.TabIndex = 0; - this.buttonInsertTest.Text = "Тест вставки сообщений"; + this.buttonInsertTest.Text = "Тест вставки"; this.buttonInsertTest.UseVisualStyleBackColor = true; this.buttonInsertTest.Click += new System.EventHandler(this.buttonInsertTest_Click); // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(104, 12); + this.label1.Location = new System.Drawing.Point(149, 20); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(156, 15); + this.label1.Size = new System.Drawing.Size(234, 25); this.label1.TabIndex = 1; this.label1.Text = "Введите кол-во элементов:"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(104, 53); + this.label2.Location = new System.Drawing.Point(149, 88); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(146, 15); + this.label2.Size = new System.Drawing.Size(223, 25); this.label2.TabIndex = 3; this.label2.Text = "Итоговое время запроса:"; // // textBoxInsertTime // - this.textBoxInsertTime.Location = new System.Drawing.Point(266, 50); + this.textBoxInsertTime.Location = new System.Drawing.Point(380, 83); + this.textBoxInsertTime.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.textBoxInsertTime.Name = "textBoxInsertTime"; this.textBoxInsertTime.ReadOnly = true; - this.textBoxInsertTime.Size = new System.Drawing.Size(100, 23); + this.textBoxInsertTime.Size = new System.Drawing.Size(141, 31); this.textBoxInsertTime.TabIndex = 4; // // buttonReadTest // - this.buttonReadTest.Location = new System.Drawing.Point(12, 106); + this.buttonReadTest.Location = new System.Drawing.Point(17, 177); + this.buttonReadTest.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.buttonReadTest.Name = "buttonReadTest"; - this.buttonReadTest.Size = new System.Drawing.Size(86, 56); + this.buttonReadTest.Size = new System.Drawing.Size(123, 93); this.buttonReadTest.TabIndex = 5; - this.buttonReadTest.Text = "Тест чтения сообщений"; + this.buttonReadTest.Text = "Тест чтения"; this.buttonReadTest.UseVisualStyleBackColor = true; this.buttonReadTest.Click += new System.EventHandler(this.buttonReadTest_Click); // // textBoxReadTime // - this.textBoxReadTime.Location = new System.Drawing.Point(266, 144); + this.textBoxReadTime.Location = new System.Drawing.Point(380, 240); + this.textBoxReadTime.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.textBoxReadTime.Name = "textBoxReadTime"; this.textBoxReadTime.ReadOnly = true; - this.textBoxReadTime.Size = new System.Drawing.Size(100, 23); + this.textBoxReadTime.Size = new System.Drawing.Size(141, 31); this.textBoxReadTime.TabIndex = 9; // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(104, 147); + this.label3.Location = new System.Drawing.Point(149, 245); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(146, 15); + this.label3.Size = new System.Drawing.Size(223, 25); this.label3.TabIndex = 8; this.label3.Text = "Итоговое время запроса:"; // // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(104, 106); + this.label4.Location = new System.Drawing.Point(149, 177); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(156, 15); + this.label4.Size = new System.Drawing.Size(234, 25); this.label4.TabIndex = 6; this.label4.Text = "Введите кол-во элементов:"; // // numericUpDownInsert // - this.numericUpDownInsert.Location = new System.Drawing.Point(266, 10); + this.numericUpDownInsert.Location = new System.Drawing.Point(380, 17); + this.numericUpDownInsert.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.numericUpDownInsert.Name = "numericUpDownInsert"; - this.numericUpDownInsert.Size = new System.Drawing.Size(100, 23); + this.numericUpDownInsert.Size = new System.Drawing.Size(143, 31); this.numericUpDownInsert.TabIndex = 10; // // numericUpDownRead // - this.numericUpDownRead.Location = new System.Drawing.Point(266, 104); + this.numericUpDownRead.Location = new System.Drawing.Point(380, 173); + this.numericUpDownRead.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.numericUpDownRead.Name = "numericUpDownRead"; - this.numericUpDownRead.Size = new System.Drawing.Size(100, 23); + this.numericUpDownRead.Size = new System.Drawing.Size(143, 31); this.numericUpDownRead.TabIndex = 11; // - // buttonJoinQuery - // - this.buttonJoinQuery.Location = new System.Drawing.Point(12, 197); - this.buttonJoinQuery.Name = "buttonJoinQuery"; - this.buttonJoinQuery.Size = new System.Drawing.Size(86, 74); - this.buttonJoinQuery.TabIndex = 12; - this.buttonJoinQuery.Text = "Тест сложного чтения (Join)"; - this.buttonJoinQuery.UseVisualStyleBackColor = true; - this.buttonJoinQuery.Click += new System.EventHandler(this.buttonJoinQuery_Click); - // - // numericUpDownJoin - // - this.numericUpDownJoin.Location = new System.Drawing.Point(266, 195); - this.numericUpDownJoin.Name = "numericUpDownJoin"; - this.numericUpDownJoin.Size = new System.Drawing.Size(100, 23); - this.numericUpDownJoin.TabIndex = 16; - // - // textBoxJoin - // - this.textBoxJoin.Location = new System.Drawing.Point(266, 235); - this.textBoxJoin.Name = "textBoxJoin"; - this.textBoxJoin.ReadOnly = true; - this.textBoxJoin.Size = new System.Drawing.Size(100, 23); - this.textBoxJoin.TabIndex = 15; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(104, 238); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(146, 15); - this.label5.TabIndex = 14; - this.label5.Text = "Итоговое время запроса:"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(104, 197); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(156, 15); - this.label6.TabIndex = 13; - this.label6.Text = "Введите кол-во элементов:"; - // // FormTests // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(383, 286); - this.Controls.Add(this.numericUpDownJoin); - this.Controls.Add(this.textBoxJoin); - this.Controls.Add(this.label5); - this.Controls.Add(this.label6); - this.Controls.Add(this.buttonJoinQuery); + this.ClientSize = new System.Drawing.Size(547, 304); this.Controls.Add(this.numericUpDownRead); this.Controls.Add(this.numericUpDownInsert); this.Controls.Add(this.textBoxReadTime); @@ -197,11 +153,11 @@ this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.buttonInsertTest); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "FormTests"; this.Text = "Тесты запросов к бд"; ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInsert)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownJoin)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -219,10 +175,5 @@ private Label label4; private NumericUpDown numericUpDownInsert; private NumericUpDown numericUpDownRead; - private Button buttonJoinQuery; - private NumericUpDown numericUpDownJoin; - private TextBox textBoxJoin; - private Label label5; - private Label label6; } } diff --git a/TransportGuide/FormTests.cs b/TransportGuide/FormTests.cs index 7f563ce..efa6847 100644 --- a/TransportGuide/FormTests.cs +++ b/TransportGuide/FormTests.cs @@ -14,9 +14,7 @@ namespace TransportGuide public partial class FormTests : Form { private readonly IRouteLogic _routeLogic; - //private readonly IUserLogic _userLogic; - //private readonly ITopicLogic _topicLogic; - public FormTests(IRouteLogic routeLogic)//IUserLogic userLogic, ITopicLogic topicLogic, IMessageLogic messageLogic) + public FormTests(IRouteLogic routeLogic) { InitializeComponent(); _routeLogic= routeLogic; @@ -24,8 +22,6 @@ namespace TransportGuide numericUpDownInsert.Maximum = 1000000; numericUpDownRead.Minimum = 1; numericUpDownRead.Maximum = 1000000; - numericUpDownJoin.Minimum = 1; - numericUpDownJoin.Maximum = 1000000; } private void buttonInsertTest_Click(object sender, EventArgs e) @@ -55,17 +51,6 @@ namespace TransportGuide } } - private void buttonJoinQuery_Click(object sender, EventArgs e) - { - //try - //{ - // var result = _messageLogic.TestJoinReadList(Convert.ToInt32(numericUpDownJoin.Value)); - // textBoxJoin.Text = result; - //} - //catch (Exception ex) - //{ - // MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); - //} - } + } } diff --git a/TransportGuide/FormTests.resx b/TransportGuide/FormTests.resx index 1af7de1..f298a7b 100644 --- a/TransportGuide/FormTests.resx +++ b/TransportGuide/FormTests.resx @@ -1,64 +1,4 @@ - - - +