Создание интефейса

This commit is contained in:
Dizel 2025-04-01 13:00:30 +03:00
parent 5591bb0a46
commit b44e103c4c
41 changed files with 1229 additions and 640 deletions

Binary file not shown.

View File

@ -1,12 +1,53 @@
{ {
"Version": 1, "Version": 1,
"WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\", "WorkspaceRootPath": "C:\\Projects\\Simulator\\DroneClient\\",
"Documents": [], "Documents": [
{
"AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|C:\\Projects\\Simulator\\DroneClient\\formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|solutionrelative:formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
},
{
"AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|c:\\projects\\simulator\\droneclient\\formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|solutionrelative:formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [ "DocumentGroupContainers": [
{ {
"Orientation": 0, "Orientation": 0,
"VerticalTabListWidth": 256, "VerticalTabListWidth": 256,
"DocumentGroups": [] "DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]",
"DocumentMoniker": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs",
"RelativeDocumentMoniker": "FormMain.cs",
"ToolTip": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]*",
"RelativeToolTip": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]*",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-04-01T08:13:27.111Z",
"EditorCaption": " [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "FormMain.cs",
"DocumentMoniker": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs",
"RelativeDocumentMoniker": "FormMain.cs",
"ToolTip": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs*",
"RelativeToolTip": "FormMain.cs*",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAGsAAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-27T13:11:11.045Z",
"EditorCaption": ""
}
]
}
]
} }
] ]
} }

View File

@ -1,14 +1,14 @@
{ {
"Version": 1, "Version": 1,
"WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\", "WorkspaceRootPath": "C:\\Projects\\Simulator\\DroneClient\\",
"Documents": [ "Documents": [
{ {
"AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|d:\\cpl\\simulator\\droneclient\\droneclient\\formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|C:\\Projects\\Simulator\\DroneClient\\formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
"RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|solutionrelative:formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" "RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|solutionrelative:formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
}, },
{ {
"AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|d:\\cpl\\simulator\\droneclient\\droneclient\\formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form", "AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|c:\\projects\\simulator\\droneclient\\formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|solutionrelative:formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form" "RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|solutionrelative:formmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
} }
], ],
"DocumentGroupContainers": [ "DocumentGroupContainers": [
@ -23,27 +23,27 @@
{ {
"$type": "Document", "$type": "Document",
"DocumentIndex": 0, "DocumentIndex": 0,
"Title": "FormMain.cs", "Title": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]",
"DocumentMoniker": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs", "DocumentMoniker": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs",
"RelativeDocumentMoniker": "FormMain.cs", "RelativeDocumentMoniker": "FormMain.cs",
"ToolTip": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs", "ToolTip": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]",
"RelativeToolTip": "FormMain.cs", "RelativeToolTip": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]",
"ViewState": "AgIAACEAAAAAAAAAAAAYwCYAAAAOAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-27T13:11:11.045Z", "WhenOpened": "2025-04-01T08:13:27.111Z",
"EditorCaption": "" "EditorCaption": " [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]"
}, },
{ {
"$type": "Document", "$type": "Document",
"DocumentIndex": 1, "DocumentIndex": 1,
"Title": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]", "Title": "FormMain.cs",
"DocumentMoniker": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs", "DocumentMoniker": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs",
"RelativeDocumentMoniker": "FormMain.cs", "RelativeDocumentMoniker": "FormMain.cs",
"ToolTip": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]", "ToolTip": "C:\\Projects\\Simulator\\DroneClient\\FormMain.cs",
"RelativeToolTip": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]", "RelativeToolTip": "FormMain.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAGsAAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-27T13:11:01.471Z", "WhenOpened": "2025-03-27T13:11:11.045Z",
"EditorCaption": " [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]" "EditorCaption": ""
} }
] ]
} }

View File

@ -20,460 +20,503 @@
base.Dispose(disposing); base.Dispose(disposing);
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
components = new System.ComponentModel.Container(); components = new System.ComponentModel.Container();
timer_Test = new System.Windows.Forms.Timer(components); timer_Test = new System.Windows.Forms.Timer(components);
groupBox1 = new GroupBox(); groupBox1 = new GroupBox();
textBox_Server_Addr = new TextBox(); textBox_Server_Addr = new TextBox();
label2 = new Label(); label2 = new Label();
button_Connect = new Button(); button_Connect = new Button();
numericUpDown_Server_Port = new NumericUpDown(); numericUpDown_Server_Port = new NumericUpDown();
label3 = new Label(); label3 = new Label();
label1 = new Label(); label1 = new Label();
groupBox2 = new GroupBox(); groupBox2 = new GroupBox();
label_Acc_Z = new Label(); label_Acc_Z = new Label();
label7 = new Label(); label7 = new Label();
label_Acc_Y = new Label(); label_Acc_Y = new Label();
label5 = new Label(); label5 = new Label();
label_Acc_X = new Label(); label_Acc_X = new Label();
groupBox3 = new GroupBox(); groupBox3 = new GroupBox();
label_Gyr_Z = new Label(); label_Gyr_Z = new Label();
label9 = new Label(); label9 = new Label();
label_Gyr_Y = new Label(); label_Gyr_Y = new Label();
label11 = new Label(); label11 = new Label();
label_Gyr_X = new Label(); label_Gyr_X = new Label();
label13 = new Label(); label13 = new Label();
groupBox4 = new GroupBox(); groupBox4 = new GroupBox();
label_Pos_L = new Label(); label_Pos_L = new Label();
label6 = new Label(); label6 = new Label();
label_Pos_Y = new Label(); label_Pos_Y = new Label();
label10 = new Label(); label10 = new Label();
label_Pos_X = new Label(); label_Pos_X = new Label();
label14 = new Label(); label14 = new Label();
trackBar_Power = new TrackBar(); trackBar_Power = new TrackBar();
button_LL = new Button(); button_LL = new Button();
button_UU = new Button(); button_UU = new Button();
button_DD = new Button(); button_DD = new Button();
button_RR = new Button(); button_RR = new Button();
label_Pow = new Label(); label_Pow = new Label();
button_ML = new Button(); button_ML = new Button();
button_MR = new Button(); button_MR = new Button();
groupBox1.SuspendLayout(); groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)numericUpDown_Server_Port).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericUpDown_Server_Port).BeginInit();
groupBox2.SuspendLayout(); groupBox2.SuspendLayout();
groupBox3.SuspendLayout(); groupBox3.SuspendLayout();
groupBox4.SuspendLayout(); groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)trackBar_Power).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackBar_Power).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// timer_Test // timer_Test
// //
timer_Test.Enabled = true; timer_Test.Enabled = true;
timer_Test.Interval = 10; timer_Test.Interval = 10;
timer_Test.Tick += timer_Test_Tick; timer_Test.Tick += timer_Test_Tick;
// //
// groupBox1 // groupBox1
// //
groupBox1.Controls.Add(textBox_Server_Addr); groupBox1.Controls.Add(textBox_Server_Addr);
groupBox1.Controls.Add(label2); groupBox1.Controls.Add(label2);
groupBox1.Controls.Add(button_Connect); groupBox1.Controls.Add(button_Connect);
groupBox1.Controls.Add(numericUpDown_Server_Port); groupBox1.Controls.Add(numericUpDown_Server_Port);
groupBox1.Controls.Add(label3); groupBox1.Controls.Add(label3);
groupBox1.Dock = DockStyle.Top; groupBox1.Dock = DockStyle.Top;
groupBox1.Location = new Point(0, 0); groupBox1.Location = new Point(0, 0);
groupBox1.Name = "groupBox1"; groupBox1.Margin = new Padding(6, 6, 6, 6);
groupBox1.Size = new Size(275, 80); groupBox1.Name = "groupBox1";
groupBox1.TabIndex = 3; groupBox1.Padding = new Padding(6, 6, 6, 6);
groupBox1.TabStop = false; groupBox1.Size = new Size(511, 171);
groupBox1.Tag = ""; groupBox1.TabIndex = 3;
groupBox1.Text = "Server"; groupBox1.TabStop = false;
// groupBox1.Tag = "";
// textBox_Server_Addr groupBox1.Text = "Server";
// groupBox1.Enter += groupBox1_Enter;
textBox_Server_Addr.Location = new Point(48, 16); //
textBox_Server_Addr.Name = "textBox_Server_Addr"; // textBox_Server_Addr
textBox_Server_Addr.Size = new Size(125, 23); //
textBox_Server_Addr.TabIndex = 4; textBox_Server_Addr.Location = new Point(89, 34);
textBox_Server_Addr.Text = "127.0.0.1"; textBox_Server_Addr.Margin = new Padding(6, 6, 6, 6);
// textBox_Server_Addr.Name = "textBox_Server_Addr";
// label2 textBox_Server_Addr.Size = new Size(229, 39);
// textBox_Server_Addr.TabIndex = 4;
label2.AutoSize = true; textBox_Server_Addr.Text = "127.0.0.1";
label2.Location = new Point(6, 19); textBox_Server_Addr.TextChanged += textBox_Server_Addr_TextChanged;
label2.Name = "label2"; //
label2.Size = new Size(36, 15); // label2
label2.TabIndex = 3; //
label2.Tag = ""; label2.AutoSize = true;
label2.Text = "Addr:"; label2.Location = new Point(11, 41);
// label2.Margin = new Padding(6, 0, 6, 0);
// button_Connect label2.Name = "label2";
// label2.Size = new Size(70, 32);
button_Connect.BackColor = Color.Transparent; label2.TabIndex = 3;
button_Connect.Location = new Point(112, 46); label2.Tag = "";
button_Connect.Name = "button_Connect"; label2.Text = "Addr:";
button_Connect.Size = new Size(61, 23); //
button_Connect.TabIndex = 2; // button_Connect
button_Connect.Tag = ""; //
button_Connect.Text = "Connect"; button_Connect.BackColor = Color.Transparent;
button_Connect.UseVisualStyleBackColor = false; button_Connect.Location = new Point(208, 98);
button_Connect.Click += button_Connect_Click; button_Connect.Margin = new Padding(6, 6, 6, 6);
// button_Connect.Name = "button_Connect";
// numericUpDown_Server_Port button_Connect.Size = new Size(113, 49);
// button_Connect.TabIndex = 2;
numericUpDown_Server_Port.Location = new Point(44, 48); button_Connect.Tag = "";
numericUpDown_Server_Port.Maximum = new decimal(new int[] { 65000, 0, 0, 0 }); button_Connect.Text = "Connect";
numericUpDown_Server_Port.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); button_Connect.UseVisualStyleBackColor = false;
numericUpDown_Server_Port.Name = "numericUpDown_Server_Port"; button_Connect.Click += button_Connect_Click;
numericUpDown_Server_Port.Size = new Size(62, 23); //
numericUpDown_Server_Port.TabIndex = 1; // numericUpDown_Server_Port
numericUpDown_Server_Port.Value = new decimal(new int[] { 1001, 0, 0, 0 }); //
// numericUpDown_Server_Port.Location = new Point(82, 102);
// label3 numericUpDown_Server_Port.Margin = new Padding(6, 6, 6, 6);
// numericUpDown_Server_Port.Maximum = new decimal(new int[] { 65000, 0, 0, 0 });
label3.AutoSize = true; numericUpDown_Server_Port.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
label3.Location = new Point(6, 50); numericUpDown_Server_Port.Name = "numericUpDown_Server_Port";
label3.Name = "label3"; numericUpDown_Server_Port.Size = new Size(115, 39);
label3.Size = new Size(32, 15); numericUpDown_Server_Port.TabIndex = 1;
label3.TabIndex = 0; numericUpDown_Server_Port.Value = new decimal(new int[] { 1001, 0, 0, 0 });
label3.Tag = "#clients_port"; //
label3.Text = "Port:"; // label3
// //
// label1 label3.AutoSize = true;
// label3.Location = new Point(11, 107);
label1.AutoSize = true; label3.Margin = new Padding(6, 0, 6, 0);
label1.Location = new Point(6, 19); label3.Name = "label3";
label1.Name = "label1"; label3.Size = new Size(61, 32);
label1.Size = new Size(17, 15); label3.TabIndex = 0;
label1.TabIndex = 4; label3.Tag = "#clients_port";
label1.Text = "X:"; label3.Text = "Port:";
// //
// groupBox2 // label1
// //
groupBox2.Controls.Add(label_Acc_Z); label1.AutoSize = true;
groupBox2.Controls.Add(label7); label1.Location = new Point(11, 41);
groupBox2.Controls.Add(label_Acc_Y); label1.Margin = new Padding(6, 0, 6, 0);
groupBox2.Controls.Add(label5); label1.Name = "label1";
groupBox2.Controls.Add(label_Acc_X); label1.Size = new Size(33, 32);
groupBox2.Controls.Add(label1); label1.TabIndex = 4;
groupBox2.Location = new Point(6, 86); label1.Text = "X:";
groupBox2.Name = "groupBox2"; //
groupBox2.Size = new Size(78, 100); // groupBox2
groupBox2.TabIndex = 5; //
groupBox2.TabStop = false; groupBox2.Controls.Add(label_Acc_Z);
groupBox2.Text = "Acc"; groupBox2.Controls.Add(label7);
// groupBox2.Controls.Add(label_Acc_Y);
// label_Acc_Z groupBox2.Controls.Add(label5);
// groupBox2.Controls.Add(label_Acc_X);
label_Acc_Z.AutoSize = true; groupBox2.Controls.Add(label1);
label_Acc_Z.Location = new Point(19, 70); groupBox2.Location = new Point(11, 183);
label_Acc_Z.Name = "label_Acc_Z"; groupBox2.Margin = new Padding(6, 6, 6, 6);
label_Acc_Z.Size = new Size(13, 15); groupBox2.Name = "groupBox2";
label_Acc_Z.TabIndex = 9; groupBox2.Padding = new Padding(6, 6, 6, 6);
label_Acc_Z.Text = "0"; groupBox2.Size = new Size(145, 213);
// groupBox2.TabIndex = 5;
// label7 groupBox2.TabStop = false;
// groupBox2.Text = "Acc";
label7.AutoSize = true; //
label7.Location = new Point(6, 70); // label_Acc_Z
label7.Name = "label7"; //
label7.Size = new Size(17, 15); label_Acc_Z.AutoSize = true;
label7.TabIndex = 8; label_Acc_Z.Location = new Point(35, 149);
label7.Text = "Z:"; label_Acc_Z.Margin = new Padding(6, 0, 6, 0);
// label_Acc_Z.Name = "label_Acc_Z";
// label_Acc_Y label_Acc_Z.Size = new Size(27, 32);
// label_Acc_Z.TabIndex = 9;
label_Acc_Y.AutoSize = true; label_Acc_Z.Text = "0";
label_Acc_Y.Location = new Point(19, 45); //
label_Acc_Y.Name = "label_Acc_Y"; // label7
label_Acc_Y.Size = new Size(13, 15); //
label_Acc_Y.TabIndex = 7; label7.AutoSize = true;
label_Acc_Y.Text = "0"; label7.Location = new Point(11, 149);
// label7.Margin = new Padding(6, 0, 6, 0);
// label5 label7.Name = "label7";
// label7.Size = new Size(33, 32);
label5.AutoSize = true; label7.TabIndex = 8;
label5.Location = new Point(6, 45); label7.Text = "Z:";
label5.Name = "label5"; //
label5.Size = new Size(17, 15); // label_Acc_Y
label5.TabIndex = 6; //
label5.Text = "Y:"; label_Acc_Y.AutoSize = true;
// label_Acc_Y.Location = new Point(35, 96);
// label_Acc_X label_Acc_Y.Margin = new Padding(6, 0, 6, 0);
// label_Acc_Y.Name = "label_Acc_Y";
label_Acc_X.AutoSize = true; label_Acc_Y.Size = new Size(27, 32);
label_Acc_X.Location = new Point(19, 19); label_Acc_Y.TabIndex = 7;
label_Acc_X.Name = "label_Acc_X"; label_Acc_Y.Text = "0";
label_Acc_X.Size = new Size(13, 15); //
label_Acc_X.TabIndex = 5; // label5
label_Acc_X.Text = "0"; //
// label5.AutoSize = true;
// groupBox3 label5.Location = new Point(11, 96);
// label5.Margin = new Padding(6, 0, 6, 0);
groupBox3.Controls.Add(label_Gyr_Z); label5.Name = "label5";
groupBox3.Controls.Add(label9); label5.Size = new Size(32, 32);
groupBox3.Controls.Add(label_Gyr_Y); label5.TabIndex = 6;
groupBox3.Controls.Add(label11); label5.Text = "Y:";
groupBox3.Controls.Add(label_Gyr_X); //
groupBox3.Controls.Add(label13); // label_Acc_X
groupBox3.Location = new Point(95, 86); //
groupBox3.Name = "groupBox3"; label_Acc_X.AutoSize = true;
groupBox3.Size = new Size(78, 100); label_Acc_X.Location = new Point(35, 41);
groupBox3.TabIndex = 6; label_Acc_X.Margin = new Padding(6, 0, 6, 0);
groupBox3.TabStop = false; label_Acc_X.Name = "label_Acc_X";
groupBox3.Text = "Gyr"; label_Acc_X.Size = new Size(27, 32);
// label_Acc_X.TabIndex = 5;
// label_Gyr_Z label_Acc_X.Text = "0";
// //
label_Gyr_Z.AutoSize = true; // groupBox3
label_Gyr_Z.Location = new Point(19, 70); //
label_Gyr_Z.Name = "label_Gyr_Z"; groupBox3.Controls.Add(label_Gyr_Z);
label_Gyr_Z.Size = new Size(13, 15); groupBox3.Controls.Add(label9);
label_Gyr_Z.TabIndex = 9; groupBox3.Controls.Add(label_Gyr_Y);
label_Gyr_Z.Text = "0"; groupBox3.Controls.Add(label11);
// groupBox3.Controls.Add(label_Gyr_X);
// label9 groupBox3.Controls.Add(label13);
// groupBox3.Location = new Point(176, 183);
label9.AutoSize = true; groupBox3.Margin = new Padding(6, 6, 6, 6);
label9.Location = new Point(6, 70); groupBox3.Name = "groupBox3";
label9.Name = "label9"; groupBox3.Padding = new Padding(6, 6, 6, 6);
label9.Size = new Size(17, 15); groupBox3.Size = new Size(145, 213);
label9.TabIndex = 8; groupBox3.TabIndex = 6;
label9.Text = "Z:"; groupBox3.TabStop = false;
// groupBox3.Text = "Gyr";
// label_Gyr_Y //
// // label_Gyr_Z
label_Gyr_Y.AutoSize = true; //
label_Gyr_Y.Location = new Point(19, 45); label_Gyr_Z.AutoSize = true;
label_Gyr_Y.Name = "label_Gyr_Y"; label_Gyr_Z.Location = new Point(35, 149);
label_Gyr_Y.Size = new Size(13, 15); label_Gyr_Z.Margin = new Padding(6, 0, 6, 0);
label_Gyr_Y.TabIndex = 7; label_Gyr_Z.Name = "label_Gyr_Z";
label_Gyr_Y.Text = "0"; label_Gyr_Z.Size = new Size(27, 32);
// label_Gyr_Z.TabIndex = 9;
// label11 label_Gyr_Z.Text = "0";
// //
label11.AutoSize = true; // label9
label11.Location = new Point(6, 45); //
label11.Name = "label11"; label9.AutoSize = true;
label11.Size = new Size(17, 15); label9.Location = new Point(11, 149);
label11.TabIndex = 6; label9.Margin = new Padding(6, 0, 6, 0);
label11.Text = "Y:"; label9.Name = "label9";
// label9.Size = new Size(33, 32);
// label_Gyr_X label9.TabIndex = 8;
// label9.Text = "Z:";
label_Gyr_X.AutoSize = true; //
label_Gyr_X.Location = new Point(19, 19); // label_Gyr_Y
label_Gyr_X.Name = "label_Gyr_X"; //
label_Gyr_X.Size = new Size(13, 15); label_Gyr_Y.AutoSize = true;
label_Gyr_X.TabIndex = 5; label_Gyr_Y.Location = new Point(35, 96);
label_Gyr_X.Text = "0"; label_Gyr_Y.Margin = new Padding(6, 0, 6, 0);
// label_Gyr_Y.Name = "label_Gyr_Y";
// label13 label_Gyr_Y.Size = new Size(27, 32);
// label_Gyr_Y.TabIndex = 7;
label13.AutoSize = true; label_Gyr_Y.Text = "0";
label13.Location = new Point(6, 19); //
label13.Name = "label13"; // label11
label13.Size = new Size(17, 15); //
label13.TabIndex = 4; label11.AutoSize = true;
label13.Text = "X:"; label11.Location = new Point(11, 96);
// label11.Margin = new Padding(6, 0, 6, 0);
// groupBox4 label11.Name = "label11";
// label11.Size = new Size(32, 32);
groupBox4.Controls.Add(label_Pos_L); label11.TabIndex = 6;
groupBox4.Controls.Add(label6); label11.Text = "Y:";
groupBox4.Controls.Add(label_Pos_Y); //
groupBox4.Controls.Add(label10); // label_Gyr_X
groupBox4.Controls.Add(label_Pos_X); //
groupBox4.Controls.Add(label14); label_Gyr_X.AutoSize = true;
groupBox4.Location = new Point(188, 86); label_Gyr_X.Location = new Point(35, 41);
groupBox4.Name = "groupBox4"; label_Gyr_X.Margin = new Padding(6, 0, 6, 0);
groupBox4.Size = new Size(78, 100); label_Gyr_X.Name = "label_Gyr_X";
groupBox4.TabIndex = 7; label_Gyr_X.Size = new Size(27, 32);
groupBox4.TabStop = false; label_Gyr_X.TabIndex = 5;
groupBox4.Text = "Pos"; label_Gyr_X.Text = "0";
// //
// label_Pos_L // label13
// //
label_Pos_L.AutoSize = true; label13.AutoSize = true;
label_Pos_L.Location = new Point(19, 70); label13.Location = new Point(11, 41);
label_Pos_L.Name = "label_Pos_L"; label13.Margin = new Padding(6, 0, 6, 0);
label_Pos_L.Size = new Size(13, 15); label13.Name = "label13";
label_Pos_L.TabIndex = 9; label13.Size = new Size(33, 32);
label_Pos_L.Text = "0"; label13.TabIndex = 4;
// label13.Text = "X:";
// label6 //
// // groupBox4
label6.AutoSize = true; //
label6.Location = new Point(6, 70); groupBox4.Controls.Add(label_Pos_L);
label6.Name = "label6"; groupBox4.Controls.Add(label6);
label6.Size = new Size(16, 15); groupBox4.Controls.Add(label_Pos_Y);
label6.TabIndex = 8; groupBox4.Controls.Add(label10);
label6.Text = "L:"; groupBox4.Controls.Add(label_Pos_X);
// groupBox4.Controls.Add(label14);
// label_Pos_Y groupBox4.Location = new Point(349, 183);
// groupBox4.Margin = new Padding(6, 6, 6, 6);
label_Pos_Y.AutoSize = true; groupBox4.Name = "groupBox4";
label_Pos_Y.Location = new Point(19, 45); groupBox4.Padding = new Padding(6, 6, 6, 6);
label_Pos_Y.Name = "label_Pos_Y"; groupBox4.Size = new Size(145, 213);
label_Pos_Y.Size = new Size(13, 15); groupBox4.TabIndex = 7;
label_Pos_Y.TabIndex = 7; groupBox4.TabStop = false;
label_Pos_Y.Text = "0"; groupBox4.Text = "Pos";
// //
// label10 // label_Pos_L
// //
label10.AutoSize = true; label_Pos_L.AutoSize = true;
label10.Location = new Point(6, 45); label_Pos_L.Location = new Point(35, 149);
label10.Name = "label10"; label_Pos_L.Margin = new Padding(6, 0, 6, 0);
label10.Size = new Size(17, 15); label_Pos_L.Name = "label_Pos_L";
label10.TabIndex = 6; label_Pos_L.Size = new Size(27, 32);
label10.Text = "Y:"; label_Pos_L.TabIndex = 9;
// label_Pos_L.Text = "0";
// label_Pos_X //
// // label6
label_Pos_X.AutoSize = true; //
label_Pos_X.Location = new Point(19, 19); label6.AutoSize = true;
label_Pos_X.Name = "label_Pos_X"; label6.Location = new Point(11, 149);
label_Pos_X.Size = new Size(13, 15); label6.Margin = new Padding(6, 0, 6, 0);
label_Pos_X.TabIndex = 5; label6.Name = "label6";
label_Pos_X.Text = "0"; label6.Size = new Size(30, 32);
// label6.TabIndex = 8;
// label14 label6.Text = "L:";
// //
label14.AutoSize = true; // label_Pos_Y
label14.Location = new Point(6, 19); //
label14.Name = "label14"; label_Pos_Y.AutoSize = true;
label14.Size = new Size(17, 15); label_Pos_Y.Location = new Point(35, 96);
label14.TabIndex = 4; label_Pos_Y.Margin = new Padding(6, 0, 6, 0);
label14.Text = "X:"; label_Pos_Y.Name = "label_Pos_Y";
// label_Pos_Y.Size = new Size(27, 32);
// trackBar_Power label_Pos_Y.TabIndex = 7;
// label_Pos_Y.Text = "0";
trackBar_Power.Location = new Point(112, 240); //
trackBar_Power.Maximum = 100; // label10
trackBar_Power.Name = "trackBar_Power"; //
trackBar_Power.Orientation = Orientation.Vertical; label10.AutoSize = true;
trackBar_Power.Size = new Size(45, 141); label10.Location = new Point(11, 96);
trackBar_Power.TabIndex = 12; label10.Margin = new Padding(6, 0, 6, 0);
trackBar_Power.Scroll += trackBar_Power_Scroll; label10.Name = "label10";
// label10.Size = new Size(32, 32);
// button_LL label10.TabIndex = 6;
// label10.Text = "Y:";
button_LL.Location = new Point(9, 318); //
button_LL.Name = "button_LL"; // label_Pos_X
button_LL.Size = new Size(75, 23); //
button_LL.TabIndex = 13; label_Pos_X.AutoSize = true;
button_LL.Text = "LL"; label_Pos_X.Location = new Point(35, 41);
button_LL.UseVisualStyleBackColor = true; label_Pos_X.Margin = new Padding(6, 0, 6, 0);
button_LL.MouseDown += button_UU_MouseDown; label_Pos_X.Name = "label_Pos_X";
button_LL.MouseUp += button_UU_MouseUp; label_Pos_X.Size = new Size(27, 32);
// label_Pos_X.TabIndex = 5;
// button_UU label_Pos_X.Text = "0";
// label_Pos_X.Click += label_Pos_X_Click;
button_UU.Location = new Point(98, 211); //
button_UU.Name = "button_UU"; // label14
button_UU.Size = new Size(75, 23); //
button_UU.TabIndex = 14; label14.AutoSize = true;
button_UU.Text = "UU"; label14.Location = new Point(11, 41);
button_UU.UseVisualStyleBackColor = true; label14.Margin = new Padding(6, 0, 6, 0);
button_UU.MouseDown += button_UU_MouseDown; label14.Name = "label14";
button_UU.MouseUp += button_UU_MouseUp; label14.Size = new Size(33, 32);
// label14.TabIndex = 4;
// button_DD label14.Text = "X:";
// //
button_DD.Location = new Point(98, 412); // trackBar_Power
button_DD.Name = "button_DD"; //
button_DD.Size = new Size(75, 23); trackBar_Power.Location = new Point(208, 512);
button_DD.TabIndex = 15; trackBar_Power.Margin = new Padding(6, 6, 6, 6);
button_DD.Text = "DD"; trackBar_Power.Maximum = 100;
button_DD.UseVisualStyleBackColor = true; trackBar_Power.Name = "trackBar_Power";
button_DD.MouseDown += button_UU_MouseDown; trackBar_Power.Orientation = Orientation.Vertical;
button_DD.MouseUp += button_UU_MouseUp; trackBar_Power.Size = new Size(90, 301);
// trackBar_Power.TabIndex = 12;
// button_RR trackBar_Power.Scroll += trackBar_Power_Scroll;
// //
button_RR.Location = new Point(188, 318); // button_LL
button_RR.Name = "button_RR"; //
button_RR.Size = new Size(75, 23); button_LL.Location = new Point(17, 678);
button_RR.TabIndex = 16; button_LL.Margin = new Padding(6, 6, 6, 6);
button_RR.Text = "RR"; button_LL.Name = "button_LL";
button_RR.UseVisualStyleBackColor = true; button_LL.Size = new Size(139, 49);
button_RR.MouseDown += button_UU_MouseDown; button_LL.TabIndex = 13;
button_RR.MouseUp += button_UU_MouseUp; button_LL.Text = "LL";
// button_LL.UseVisualStyleBackColor = true;
// label_Pow button_LL.MouseDown += button_UU_MouseDown;
// button_LL.MouseUp += button_UU_MouseUp;
label_Pow.AutoSize = true; //
label_Pow.Location = new Point(126, 384); // button_UU
label_Pow.Name = "label_Pow"; //
label_Pow.Size = new Size(13, 15); button_UU.Location = new Point(182, 450);
label_Pow.TabIndex = 21; button_UU.Margin = new Padding(6, 6, 6, 6);
label_Pow.Text = "0"; button_UU.Name = "button_UU";
// button_UU.Size = new Size(139, 49);
// button_ML button_UU.TabIndex = 14;
// button_UU.Text = "UU";
button_ML.Location = new Point(9, 211); button_UU.UseVisualStyleBackColor = true;
button_ML.Name = "button_ML"; button_UU.MouseDown += button_UU_MouseDown;
button_ML.Size = new Size(75, 23); button_UU.MouseUp += button_UU_MouseUp;
button_ML.TabIndex = 22; //
button_ML.Text = "<-"; // button_DD
button_ML.UseVisualStyleBackColor = true; //
button_ML.MouseDown += button_UU_MouseDown; button_DD.Location = new Point(182, 879);
button_ML.MouseUp += button_UU_MouseUp; button_DD.Margin = new Padding(6, 6, 6, 6);
// button_DD.Name = "button_DD";
// button_MR button_DD.Size = new Size(139, 49);
// button_DD.TabIndex = 15;
button_MR.Location = new Point(188, 211); button_DD.Text = "DD";
button_MR.Name = "button_MR"; button_DD.UseVisualStyleBackColor = true;
button_MR.Size = new Size(75, 23); button_DD.MouseDown += button_UU_MouseDown;
button_MR.TabIndex = 23; button_DD.MouseUp += button_UU_MouseUp;
button_MR.Text = "->"; //
button_MR.UseVisualStyleBackColor = true; // button_RR
button_MR.MouseDown += button_UU_MouseDown; //
button_MR.MouseUp += button_UU_MouseUp; button_RR.Location = new Point(349, 678);
// button_RR.Margin = new Padding(6, 6, 6, 6);
// Form_Main button_RR.Name = "button_RR";
// button_RR.Size = new Size(139, 49);
AutoScaleDimensions = new SizeF(7F, 15F); button_RR.TabIndex = 16;
AutoScaleMode = AutoScaleMode.Font; button_RR.Text = "RR";
ClientSize = new Size(275, 447); button_RR.UseVisualStyleBackColor = true;
Controls.Add(button_MR); button_RR.MouseDown += button_UU_MouseDown;
Controls.Add(button_ML); button_RR.MouseUp += button_UU_MouseUp;
Controls.Add(label_Pow); //
Controls.Add(button_RR); // label_Pow
Controls.Add(button_DD); //
Controls.Add(button_UU); label_Pow.AutoSize = true;
Controls.Add(button_LL); label_Pow.Location = new Point(234, 819);
Controls.Add(trackBar_Power); label_Pow.Margin = new Padding(6, 0, 6, 0);
Controls.Add(groupBox4); label_Pow.Name = "label_Pow";
Controls.Add(groupBox3); label_Pow.Size = new Size(27, 32);
Controls.Add(groupBox2); label_Pow.TabIndex = 21;
Controls.Add(groupBox1); label_Pow.Text = "0";
MinimumSize = new Size(291, 389); //
Name = "Form_Main"; // button_ML
Text = "Drone Client V1.0"; //
FormClosing += Form_Main_FormClosing; button_ML.Location = new Point(17, 450);
groupBox1.ResumeLayout(false); button_ML.Margin = new Padding(6, 6, 6, 6);
groupBox1.PerformLayout(); button_ML.Name = "button_ML";
((System.ComponentModel.ISupportInitialize)numericUpDown_Server_Port).EndInit(); button_ML.Size = new Size(139, 49);
groupBox2.ResumeLayout(false); button_ML.TabIndex = 22;
groupBox2.PerformLayout(); button_ML.Text = "<-";
groupBox3.ResumeLayout(false); button_ML.UseVisualStyleBackColor = true;
groupBox3.PerformLayout(); button_ML.MouseDown += button_UU_MouseDown;
groupBox4.ResumeLayout(false); button_ML.MouseUp += button_UU_MouseUp;
groupBox4.PerformLayout(); //
((System.ComponentModel.ISupportInitialize)trackBar_Power).EndInit(); // button_MR
ResumeLayout(false); //
PerformLayout(); button_MR.Location = new Point(349, 450);
} button_MR.Margin = new Padding(6, 6, 6, 6);
button_MR.Name = "button_MR";
button_MR.Size = new Size(139, 49);
button_MR.TabIndex = 23;
button_MR.Text = "->";
button_MR.UseVisualStyleBackColor = true;
button_MR.MouseDown += button_UU_MouseDown;
button_MR.MouseUp += button_UU_MouseUp;
//
// Form_Main
//
AutoScaleDimensions = new SizeF(13F, 32F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(511, 954);
Controls.Add(button_MR);
Controls.Add(button_ML);
Controls.Add(label_Pow);
Controls.Add(button_RR);
Controls.Add(button_DD);
Controls.Add(button_UU);
Controls.Add(button_LL);
Controls.Add(trackBar_Power);
Controls.Add(groupBox4);
Controls.Add(groupBox3);
Controls.Add(groupBox2);
Controls.Add(groupBox1);
Margin = new Padding(6, 6, 6, 6);
MinimumSize = new Size(518, 749);
Name = "Form_Main";
Text = "Drone Client V1.0";
FormClosing += Form_Main_FormClosing;
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)numericUpDown_Server_Port).EndInit();
groupBox2.ResumeLayout(false);
groupBox2.PerformLayout();
groupBox3.ResumeLayout(false);
groupBox3.PerformLayout();
groupBox4.ResumeLayout(false);
groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)trackBar_Power).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion #endregion
private System.Windows.Forms.Timer timer_Test; private System.Windows.Forms.Timer timer_Test;
private GroupBox groupBox1; private GroupBox groupBox1;
private TextBox textBox_Server_Addr; private TextBox textBox_Server_Addr;
private Label label2; private Label label2;

View File

@ -6,149 +6,169 @@ using DroneClient;
namespace DroneSimulator namespace DroneSimulator
{ {
public partial class Form_Main : Form public partial class Form_Main : Form
{
private NetClient netClient = new NetClient();
public Form_Main()
{ {
InitializeComponent(); private NetClient netClient = new NetClient();
}
private void ConnectionCallback(object o) public Form_Main()
{
ConnectData data = (ConnectData)o;
if (!data.Connect)
{
Invoke((MethodInvoker)delegate
{ {
button_Connect.Text = "Connect"; InitializeComponent();
button_Connect.BackColor = Color.Transparent; }
MessageBox.Show("Connection closed");
});
return; private void ConnectionCallback(object o)
} {
ConnectData data = (ConnectData)o;
byte[] send = Drone.getBytes(sendDrone); if (!data.Connect)
{
Invoke((MethodInvoker)delegate
{
button_Connect.Text = "Connect";
button_Connect.BackColor = Color.Transparent;
MessageBox.Show("Connection closed");
});
data.Server.Send(send); return;
}
byte[] send = Drone.getBytes(sendDrone);
data.Server.Send(send);
}
Drone.DataIn sendDrone;
Drone.DataOut recvDrone;
private void ReceiveCallback(object o)
{
ReceiveData data = (ReceiveData)o;
recvDrone = (Drone.DataOut)Drone.fromBytes(data.Buffer, typeof(Drone.DataOut));
byte[] send = Drone.getBytes(sendDrone);
try { data.Server.Send(send); }
catch { }
}
private void button_Connect_Click(object sender, EventArgs e)
{
var done = netClient.Connect(textBox_Server_Addr.Text, (int)numericUpDown_Server_Port.Value, ConnectionCallback, ReceiveCallback);
switch (done)
{
case NetClient.ClientState.Error:
{
MessageBox.Show("Error connecting to server");
break;
}
case NetClient.ClientState.Connected:
{
button_Connect.Text = "Disconnect";
button_Connect.BackColor = Color.LimeGreen;
break;
}
case NetClient.ClientState.Stop:
{
button_Connect.Text = "Connect";
button_Connect.BackColor = Color.Transparent;
break;
}
}
if (done != NetClient.ClientState.Connected) return;
}
private void Form_Main_FormClosing(object sender, FormClosingEventArgs e)
{
netClient?.Close();
netClient = null;
}
private void timer_Test_Tick(object sender, EventArgs e)
{
label_Acc_X.Text = recvDrone.AccX.ToString();
label_Acc_Y.Text = recvDrone.AccY.ToString();
label_Acc_Z.Text = recvDrone.AccZ.ToString();
label_Gyr_X.Text = recvDrone.GyrX.ToString();
label_Gyr_Y.Text = recvDrone.GyrY.ToString();
label_Gyr_Z.Text = recvDrone.GyrZ.ToString();
label_Pos_X.Text = recvDrone.PosX.ToString();
label_Pos_Y.Text = recvDrone.PosY.ToString();
label_Pos_L.Text = recvDrone.LaserRange.ToString();
}
private void trackBar_Power_Scroll(object sender, EventArgs e)
{
float pow = (float)trackBar_Power.Value / 100;
label_Pow.Text = pow.ToString();
sendDrone.MotorUL = sendDrone.MotorUR = sendDrone.MotorDL = sendDrone.MotorDR = pow;
}
private void button_UU_MouseDown(object sender, MouseEventArgs e)
{
if (sender == button_UU)
{
sendDrone.MotorUL -= 0.1f; sendDrone.MotorUR -= 0.1f;
sendDrone.MotorDL += 0.1f; sendDrone.MotorDR += 0.1f;
}
if (sender == button_DD)
{
sendDrone.MotorUL += 0.1f; sendDrone.MotorUR += 0.1f;
sendDrone.MotorDL -= 0.1f; sendDrone.MotorDR -= 0.1f;
}
if (sender == button_LL)
{
sendDrone.MotorUL -= 0.1f; sendDrone.MotorUR += 0.1f;
sendDrone.MotorDL -= 0.1f; sendDrone.MotorDR += 0.1f;
}
if (sender == button_RR)
{
sendDrone.MotorUL += 0.1f; sendDrone.MotorUR -= 0.1f;
sendDrone.MotorDL += 0.1f; sendDrone.MotorDR -= 0.1f;
}
if (sender == button_ML)
{
sendDrone.MotorUL -= 0.1f; sendDrone.MotorUR += 0.1f;
sendDrone.MotorDL += 0.1f; sendDrone.MotorDR -= 0.1f;
}
if (sender == button_MR)
{
sendDrone.MotorUL += 0.1f; sendDrone.MotorUR -= 0.1f;
sendDrone.MotorDL -= 0.1f; sendDrone.MotorDR += 0.1f;
}
}
private void button_UU_MouseUp(object sender, MouseEventArgs e)
{
trackBar_Power_Scroll(null, null);
}
private void groupBox2_Enter(object sender, EventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void textBox_Server_Addr_TextChanged(object sender, EventArgs e)
{
}
private void label_Pos_X_Click(object sender, EventArgs e)
{
}
} }
Drone.DataIn sendDrone;
Drone.DataOut recvDrone;
private void ReceiveCallback(object o)
{
ReceiveData data = (ReceiveData)o;
recvDrone = (Drone.DataOut)Drone.fromBytes(data.Buffer, typeof(Drone.DataOut));
byte[] send = Drone.getBytes(sendDrone);
try { data.Server.Send(send); }
catch { }
}
private void button_Connect_Click(object sender, EventArgs e)
{
var done = netClient.Connect(textBox_Server_Addr.Text, (int)numericUpDown_Server_Port.Value, ConnectionCallback, ReceiveCallback);
switch (done)
{
case NetClient.ClientState.Error:
{
MessageBox.Show("Error connecting to server");
break;
}
case NetClient.ClientState.Connected:
{
button_Connect.Text = "Disconnect";
button_Connect.BackColor = Color.LimeGreen;
break;
}
case NetClient.ClientState.Stop:
{
button_Connect.Text = "Connect";
button_Connect.BackColor = Color.Transparent;
break;
}
}
if (done != NetClient.ClientState.Connected) return;
}
private void Form_Main_FormClosing(object sender, FormClosingEventArgs e)
{
netClient?.Close();
netClient = null;
}
private void timer_Test_Tick(object sender, EventArgs e)
{
label_Acc_X.Text = recvDrone.AccX.ToString();
label_Acc_Y.Text = recvDrone.AccY.ToString();
label_Acc_Z.Text = recvDrone.AccZ.ToString();
label_Gyr_X.Text = recvDrone.GyrX.ToString();
label_Gyr_Y.Text = recvDrone.GyrY.ToString();
label_Gyr_Z.Text = recvDrone.GyrZ.ToString();
label_Pos_X.Text = recvDrone.PosX.ToString();
label_Pos_Y.Text = recvDrone.PosY.ToString();
label_Pos_L.Text = recvDrone.LaserRange.ToString();
}
private void trackBar_Power_Scroll(object sender, EventArgs e)
{
float pow = (float)trackBar_Power.Value / 100;
label_Pow.Text = pow.ToString();
sendDrone.MotorUL = sendDrone.MotorUR = sendDrone.MotorDL = sendDrone.MotorDR = pow;
}
private void button_UU_MouseDown(object sender, MouseEventArgs e)
{
if (sender == button_UU)
{
sendDrone.MotorUL -= 0.1f; sendDrone.MotorUR -= 0.1f;
sendDrone.MotorDL += 0.1f; sendDrone.MotorDR += 0.1f;
}
if (sender == button_DD)
{
sendDrone.MotorUL += 0.1f; sendDrone.MotorUR += 0.1f;
sendDrone.MotorDL -= 0.1f; sendDrone.MotorDR -= 0.1f;
}
if (sender == button_LL)
{
sendDrone.MotorUL -= 0.1f; sendDrone.MotorUR += 0.1f;
sendDrone.MotorDL -= 0.1f; sendDrone.MotorDR += 0.1f;
}
if (sender == button_RR)
{
sendDrone.MotorUL += 0.1f; sendDrone.MotorUR -= 0.1f;
sendDrone.MotorDL += 0.1f; sendDrone.MotorDR -= 0.1f;
}
if (sender == button_ML)
{
sendDrone.MotorUL -= 0.1f; sendDrone.MotorUR += 0.1f;
sendDrone.MotorDL += 0.1f; sendDrone.MotorDR -= 0.1f;
}
if (sender == button_MR)
{
sendDrone.MotorUL += 0.1f; sendDrone.MotorUR -= 0.1f;
sendDrone.MotorDL -= 0.1f; sendDrone.MotorDR += 0.1f;
}
}
private void button_UU_MouseUp(object sender, MouseEventArgs e)
{
trackBar_Power_Scroll(null, null);
}
}
} }

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("DroneClient")] [assembly: System.Reflection.AssemblyCompanyAttribute("DroneClient")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5591bb0a46e83d558505955cf7b5795edb3e95dc")]
[assembly: System.Reflection.AssemblyProductAttribute("DroneClient")] [assembly: System.Reflection.AssemblyProductAttribute("DroneClient")]
[assembly: System.Reflection.AssemblyTitleAttribute("DroneClient")] [assembly: System.Reflection.AssemblyTitleAttribute("DroneClient")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
372de9fd6d36597e50cdb2250f48b9cb0d5e8e1a2d1e568b83e287afe9580301 457638ed7b06907c227ddcc810c7083b9dc1a90bbc1673f7940fba1f754d22bf

View File

@ -14,7 +14,7 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules = build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = DroneClient build_property.RootNamespace = DroneClient
build_property.ProjectDir = D:\CPL\Simulator\DroneClient\DroneClient\ build_property.ProjectDir = C:\Projects\Simulator\DroneClient\
build_property.EnableComHosting = build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop = build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false build_property.CsWinRTUseWindowsUIXamlProjections = false

View File

@ -1 +1 @@
01e86f1c7bc139724ab77bc57845e8da30f3f593b41b11317ce8867d8fb43c28 e448410659ef13e2a3a4fa5ebfa0e5367402d6f31fe64fbb56ddbed87fd02c51

View File

@ -30,3 +30,19 @@ D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\refint\DroneCl
D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.pdb D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.pdb
D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.genruntimeconfig.cache D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.genruntimeconfig.cache
D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\ref\DroneClient.dll D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\ref\DroneClient.dll
C:\Projects\Simulator\DroneClient\bin\Debug\net9.0-windows\DroneClient.exe
C:\Projects\Simulator\DroneClient\bin\Debug\net9.0-windows\DroneClient.deps.json
C:\Projects\Simulator\DroneClient\bin\Debug\net9.0-windows\DroneClient.runtimeconfig.json
C:\Projects\Simulator\DroneClient\bin\Debug\net9.0-windows\DroneClient.dll
C:\Projects\Simulator\DroneClient\bin\Debug\net9.0-windows\DroneClient.pdb
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneSimulator.Form_Main.resources
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.csproj.GenerateResource.cache
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.GeneratedMSBuildEditorConfig.editorconfig
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.AssemblyInfoInputs.cache
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.AssemblyInfo.cs
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.csproj.CoreCompileInputs.cache
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.dll
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\refint\DroneClient.dll
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.pdb
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\DroneClient.genruntimeconfig.cache
C:\Projects\Simulator\DroneClient\obj\Debug\net9.0-windows\ref\DroneClient.dll

View File

@ -12,8 +12,8 @@
} }
], ],
"additionalProbingPaths": [ "additionalProbingPaths": [
"C:\\Users\\Дана\\.dotnet\\store\\|arch|\\|tfm|", "C:\\Users\\vladi\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Дана\\.nuget\\packages", "C:\\Users\\vladi\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
], ],
"configProperties": { "configProperties": {

View File

@ -1 +1 @@
812e26f7e032de5fb2d5301fec24f483552f39e0a38ac0c052cba2ffa3a73bbd 1169c8f1755fd284418bb0f5a0b8ea8019e8852e272598e42988c80424912c03

View File

@ -1,23 +1,23 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj": {} "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj": {}
}, },
"projects": { "projects": {
"D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj": { "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", "projectUniqueName": "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj",
"projectName": "DroneClient", "projectName": "DroneClient",
"projectPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", "projectPath": "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj",
"packagesPath": "C:\\Users\\Дана\\.nuget\\packages\\", "packagesPath": "C:\\Users\\vladi\\.nuget\\packages\\",
"outputPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\obj\\", "outputPath": "C:\\Projects\\Simulator\\DroneClient\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\Дана\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\vladi\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
], ],
@ -44,7 +44,7 @@
"auditLevel": "low", "auditLevel": "low",
"auditMode": "direct" "auditMode": "direct"
}, },
"SdkAnalysisLevel": "9.0.200" "SdkAnalysisLevel": "9.0.100"
}, },
"frameworks": { "frameworks": {
"net9.0-windows7.0": { "net9.0-windows7.0": {
@ -68,7 +68,7 @@
"privateAssets": "none" "privateAssets": "none"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.101/PortableRuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -5,12 +5,12 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Дана\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\vladi\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.2</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Дана\.nuget\packages\" /> <SourceRoot Include="C:\Users\vladi\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -8,23 +8,23 @@
"net9.0-windows7.0": [] "net9.0-windows7.0": []
}, },
"packageFolders": { "packageFolders": {
"C:\\Users\\Дана\\.nuget\\packages\\": {}, "C:\\Users\\vladi\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
}, },
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", "projectUniqueName": "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj",
"projectName": "DroneClient", "projectName": "DroneClient",
"projectPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", "projectPath": "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj",
"packagesPath": "C:\\Users\\Дана\\.nuget\\packages\\", "packagesPath": "C:\\Users\\vladi\\.nuget\\packages\\",
"outputPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\obj\\", "outputPath": "C:\\Projects\\Simulator\\DroneClient\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\Дана\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\vladi\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
], ],
@ -51,7 +51,7 @@
"auditLevel": "low", "auditLevel": "low",
"auditMode": "direct" "auditMode": "direct"
}, },
"SdkAnalysisLevel": "9.0.200" "SdkAnalysisLevel": "9.0.100"
}, },
"frameworks": { "frameworks": {
"net9.0-windows7.0": { "net9.0-windows7.0": {
@ -75,7 +75,7 @@
"privateAssets": "none" "privateAssets": "none"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.101/PortableRuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -1,8 +1,8 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "ddOSNwF62rQ=", "dgSpecHash": "qI+XM2Lr+jE=",
"success": true, "success": true,
"projectFilePath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", "projectFilePath": "C:\\Projects\\Simulator\\DroneClient\\DroneClient.csproj",
"expectedPackageFiles": [], "expectedPackageFiles": [],
"logs": [] "logs": []
} }

View File

@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35527.113 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DroneClientCpp", "DroneClientCpp.vcxproj", "{690C304C-A70B-4B0F-BF61-8C51290BF444}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Debug|x64.ActiveCfg = Debug|x64
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Debug|x64.Build.0 = Debug|x64
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Debug|x86.ActiveCfg = Debug|Win32
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Debug|x86.Build.0 = Debug|Win32
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x64.ActiveCfg = Release|x64
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x64.Build.0 = Release|x64
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x86.ActiveCfg = Release|Win32
{690C304C-A70B-4B0F-BF61-8C51290BF444}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{690C304C-A70B-4B0F-BF61-8C51290BF444}</ProjectGuid>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<Keyword>ManagedCProj</Keyword>
<RootNamespace>DroneClientCpp</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies />
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="FormMain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="FormMain.h">
<FileType>CppForm</FileType>
</ClInclude>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FormMain.resx">
<DependentUpon>FormMain.h</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Исходные файлы">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Файлы заголовков">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Файлы ресурсов">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="FormMain.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="FormMain.h">
<Filter>Файлы заголовков</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,12 @@
#include "FormMain.h"
#include <Windows.h>
using namespace DroneClientCpp;
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew FormMain);
return 0;
}

BIN
DroneClientCpp/FormMain.h Normal file

Binary file not shown.

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

12
DroneClientCpp/MyForm.cpp Normal file
View File

@ -0,0 +1,12 @@
#include "MyForm.h"
#include <Windows.h>
using namespace DroneClientCpp;
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew MyForm);
return 0;
}

BIN
DroneClientCpp/MyForm.h Normal file

Binary file not shown.

120
DroneClientCpp/MyForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

11
DroneClientCpp/Source.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "MyForm.h"
using namespace MyWinFormsApp; // ???????????? ???? ?????? ???????
[STAThread]
int main(array<String^>^ args) {
Application::EnableVisualStyles(); // ???????? ??????????? ????? ????????? ??????????
Application::SetCompatibleTextRenderingDefault(false); // ????????? ?????????? ??????
Application::Run(gcnew MyForm()); // ?????? ?????
return 0;
}