This commit is contained in:
VictoriaPresnyakova 2023-05-06 11:07:27 +04:00
parent 75a6b87680
commit 495dcae781
3 changed files with 38 additions and 162 deletions

View File

@ -38,155 +38,111 @@
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.numericUpDownInsert = new System.Windows.Forms.NumericUpDown(); this.numericUpDownInsert = new System.Windows.Forms.NumericUpDown();
this.numericUpDownRead = 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.numericUpDownInsert)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownJoin)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// buttonInsertTest // 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.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.TabIndex = 0;
this.buttonInsertTest.Text = "Тест вставки сообщений"; this.buttonInsertTest.Text = "Тест вставки";
this.buttonInsertTest.UseVisualStyleBackColor = true; this.buttonInsertTest.UseVisualStyleBackColor = true;
this.buttonInsertTest.Click += new System.EventHandler(this.buttonInsertTest_Click); this.buttonInsertTest.Click += new System.EventHandler(this.buttonInsertTest_Click);
// //
// label1 // label1
// //
this.label1.AutoSize = true; 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.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.TabIndex = 1;
this.label1.Text = "Введите кол-во элементов:"; this.label1.Text = "Введите кол-во элементов:";
// //
// label2 // label2
// //
this.label2.AutoSize = true; 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.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.TabIndex = 3;
this.label2.Text = "Итоговое время запроса:"; this.label2.Text = "Итоговое время запроса:";
// //
// textBoxInsertTime // 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.Name = "textBoxInsertTime";
this.textBoxInsertTime.ReadOnly = true; 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; this.textBoxInsertTime.TabIndex = 4;
// //
// buttonReadTest // 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.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.TabIndex = 5;
this.buttonReadTest.Text = "Тест чтения сообщений"; this.buttonReadTest.Text = "Тест чтения";
this.buttonReadTest.UseVisualStyleBackColor = true; this.buttonReadTest.UseVisualStyleBackColor = true;
this.buttonReadTest.Click += new System.EventHandler(this.buttonReadTest_Click); this.buttonReadTest.Click += new System.EventHandler(this.buttonReadTest_Click);
// //
// textBoxReadTime // 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.Name = "textBoxReadTime";
this.textBoxReadTime.ReadOnly = true; 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; this.textBoxReadTime.TabIndex = 9;
// //
// label3 // label3
// //
this.label3.AutoSize = true; 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.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.TabIndex = 8;
this.label3.Text = "Итоговое время запроса:"; this.label3.Text = "Итоговое время запроса:";
// //
// label4 // label4
// //
this.label4.AutoSize = true; 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.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.TabIndex = 6;
this.label4.Text = "Введите кол-во элементов:"; this.label4.Text = "Введите кол-во элементов:";
// //
// numericUpDownInsert // 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.Name = "numericUpDownInsert";
this.numericUpDownInsert.Size = new System.Drawing.Size(100, 23); this.numericUpDownInsert.Size = new System.Drawing.Size(143, 31);
this.numericUpDownInsert.TabIndex = 10; this.numericUpDownInsert.TabIndex = 10;
// //
// numericUpDownRead // 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.Name = "numericUpDownRead";
this.numericUpDownRead.Size = new System.Drawing.Size(100, 23); this.numericUpDownRead.Size = new System.Drawing.Size(143, 31);
this.numericUpDownRead.TabIndex = 11; 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 // 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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(383, 286); this.ClientSize = new System.Drawing.Size(547, 304);
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.Controls.Add(this.numericUpDownRead); this.Controls.Add(this.numericUpDownRead);
this.Controls.Add(this.numericUpDownInsert); this.Controls.Add(this.numericUpDownInsert);
this.Controls.Add(this.textBoxReadTime); this.Controls.Add(this.textBoxReadTime);
@ -197,11 +153,11 @@
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.buttonInsertTest); this.Controls.Add(this.buttonInsertTest);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "FormTests"; this.Name = "FormTests";
this.Text = "Тесты запросов к бд"; this.Text = "Тесты запросов к бд";
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInsert)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInsert)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRead)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownJoin)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -219,10 +175,5 @@
private Label label4; private Label label4;
private NumericUpDown numericUpDownInsert; private NumericUpDown numericUpDownInsert;
private NumericUpDown numericUpDownRead; private NumericUpDown numericUpDownRead;
private Button buttonJoinQuery;
private NumericUpDown numericUpDownJoin;
private TextBox textBoxJoin;
private Label label5;
private Label label6;
} }
} }

View File

@ -14,9 +14,7 @@ namespace TransportGuide
public partial class FormTests : Form public partial class FormTests : Form
{ {
private readonly IRouteLogic _routeLogic; private readonly IRouteLogic _routeLogic;
//private readonly IUserLogic _userLogic; public FormTests(IRouteLogic routeLogic)
//private readonly ITopicLogic _topicLogic;
public FormTests(IRouteLogic routeLogic)//IUserLogic userLogic, ITopicLogic topicLogic, IMessageLogic messageLogic)
{ {
InitializeComponent(); InitializeComponent();
_routeLogic= routeLogic; _routeLogic= routeLogic;
@ -24,8 +22,6 @@ namespace TransportGuide
numericUpDownInsert.Maximum = 1000000; numericUpDownInsert.Maximum = 1000000;
numericUpDownRead.Minimum = 1; numericUpDownRead.Minimum = 1;
numericUpDownRead.Maximum = 1000000; numericUpDownRead.Maximum = 1000000;
numericUpDownJoin.Minimum = 1;
numericUpDownJoin.Maximum = 1000000;
} }
private void buttonInsertTest_Click(object sender, EventArgs e) 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);
//}
}
} }
} }

View File

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">