commit c169151aa124756052b8b15fa6fc47f9ca7aa616 Author: Dana Markova Date: Mon Mar 31 10:28:23 2025 +0300 create repository diff --git a/DroneClient/.vs/DroneClient/DesignTimeBuild/.dtbcache.v2 b/DroneClient/.vs/DroneClient/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..4e73ff1 Binary files /dev/null and b/DroneClient/.vs/DroneClient/DesignTimeBuild/.dtbcache.v2 differ diff --git a/DroneClient/.vs/DroneClient/FileContentIndex/4bebe7c4-f6da-4c88-adc5-b3c5f28d11f4.vsidx b/DroneClient/.vs/DroneClient/FileContentIndex/4bebe7c4-f6da-4c88-adc5-b3c5f28d11f4.vsidx new file mode 100644 index 0000000..764d593 Binary files /dev/null and b/DroneClient/.vs/DroneClient/FileContentIndex/4bebe7c4-f6da-4c88-adc5-b3c5f28d11f4.vsidx differ diff --git a/DroneClient/.vs/DroneClient/v17/.futdcache.v2 b/DroneClient/.vs/DroneClient/v17/.futdcache.v2 new file mode 100644 index 0000000..c88ba37 Binary files /dev/null and b/DroneClient/.vs/DroneClient/v17/.futdcache.v2 differ diff --git a/DroneClient/.vs/DroneClient/v17/.suo b/DroneClient/.vs/DroneClient/v17/.suo new file mode 100644 index 0000000..870cbf3 Binary files /dev/null and b/DroneClient/.vs/DroneClient/v17/.suo differ diff --git a/DroneClient/.vs/DroneClient/v17/DocumentLayout.backup.json b/DroneClient/.vs/DroneClient/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..8228d5d --- /dev/null +++ b/DroneClient/.vs/DroneClient/v17/DocumentLayout.backup.json @@ -0,0 +1,12 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\", + "Documents": [], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [] + } + ] +} \ No newline at end of file diff --git a/DroneClient/.vs/DroneClient/v17/DocumentLayout.json b/DroneClient/.vs/DroneClient/v17/DocumentLayout.json new file mode 100644 index 0000000..f629855 --- /dev/null +++ b/DroneClient/.vs/DroneClient/v17/DocumentLayout.json @@ -0,0 +1,53 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|d:\\cpl\\simulator\\droneclient\\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}" + }, + { + "AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneClient.csproj|d:\\cpl\\simulator\\droneclient\\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" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "FormMain.cs", + "DocumentMoniker": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs", + "RelativeDocumentMoniker": "FormMain.cs", + "ToolTip": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs", + "RelativeToolTip": "FormMain.cs", + "ViewState": "AgIAACEAAAAAAAAAAAAYwCYAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-03-27T13:11:11.045Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "FormMain.cs [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]", + "DocumentMoniker": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\FormMain.cs", + "RelativeDocumentMoniker": "FormMain.cs", + "ToolTip": "D:\\CPL\\Simulator\\DroneClient\\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-03-27T13:11:01.471Z", + "EditorCaption": " [\u041A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440]" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/DroneClient/.vs/ProjectEvaluation/droneclient.metadata.v9.bin b/DroneClient/.vs/ProjectEvaluation/droneclient.metadata.v9.bin new file mode 100644 index 0000000..7de7e09 Binary files /dev/null and b/DroneClient/.vs/ProjectEvaluation/droneclient.metadata.v9.bin differ diff --git a/DroneClient/.vs/ProjectEvaluation/droneclient.projects.v9.bin b/DroneClient/.vs/ProjectEvaluation/droneclient.projects.v9.bin new file mode 100644 index 0000000..d77a715 Binary files /dev/null and b/DroneClient/.vs/ProjectEvaluation/droneclient.projects.v9.bin differ diff --git a/DroneClient/.vs/ProjectEvaluation/droneclient.strings.v9.bin b/DroneClient/.vs/ProjectEvaluation/droneclient.strings.v9.bin new file mode 100644 index 0000000..110e35e Binary files /dev/null and b/DroneClient/.vs/ProjectEvaluation/droneclient.strings.v9.bin differ diff --git a/DroneClient/Drone.cs b/DroneClient/Drone.cs new file mode 100644 index 0000000..a7619d3 --- /dev/null +++ b/DroneClient/Drone.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace DroneClient +{ + internal class Drone + { + public struct DataOut + { + public float AccX, AccY, AccZ; + public float GyrX, GyrY, GyrZ; + public float PosX, PosY; + public float LaserRange; + } + + public struct DataIn + { + public float MotorUL, MotorUR, MotorDL, MotorDR; + } + + public static byte[] getBytes(object data) + { + int size = Marshal.SizeOf(data); + byte[] arr = new byte[size]; + + IntPtr ptr = IntPtr.Zero; + try + { + ptr = Marshal.AllocHGlobal(size); + Marshal.StructureToPtr(data, ptr, true); + Marshal.Copy(ptr, arr, 0, size); + } + finally + { + Marshal.FreeHGlobal(ptr); + } + return arr; + } + + public static object fromBytes(byte[] arr, Type type) + { + object mem = new object(); + + int size = Marshal.SizeOf(type); + IntPtr ptr = IntPtr.Zero; + try + { + ptr = Marshal.AllocHGlobal(size); + + Marshal.Copy(arr, 0, ptr, size); + + mem = Marshal.PtrToStructure(ptr, type); + } + finally + { + Marshal.FreeHGlobal(ptr); + } + + return mem; + } + + } +} diff --git a/DroneClient/DroneClient.csproj b/DroneClient/DroneClient.csproj new file mode 100644 index 0000000..c27cd77 --- /dev/null +++ b/DroneClient/DroneClient.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net9.0-windows + enable + true + enable + + + \ No newline at end of file diff --git a/DroneClient/DroneClient.csproj.user b/DroneClient/DroneClient.csproj.user new file mode 100644 index 0000000..cf5c74f --- /dev/null +++ b/DroneClient/DroneClient.csproj.user @@ -0,0 +1,8 @@ + + + + + Form + + + \ No newline at end of file diff --git a/DroneClient/DroneClient.sln b/DroneClient/DroneClient.sln new file mode 100644 index 0000000..2f94a4a --- /dev/null +++ b/DroneClient/DroneClient.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35913.81 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DroneClient", "DroneClient.csproj", "{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F4724E16-C228-4B38-BB06-B90A7A057219} + EndGlobalSection +EndGlobal diff --git a/DroneClient/FormMain.Designer.cs b/DroneClient/FormMain.Designer.cs new file mode 100644 index 0000000..f7eb90a --- /dev/null +++ b/DroneClient/FormMain.Designer.cs @@ -0,0 +1,513 @@ +namespace DroneSimulator +{ + partial class Form_Main + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + timer_Test = new System.Windows.Forms.Timer(components); + groupBox1 = new GroupBox(); + textBox_Server_Addr = new TextBox(); + label2 = new Label(); + button_Connect = new Button(); + numericUpDown_Server_Port = new NumericUpDown(); + label3 = new Label(); + label1 = new Label(); + groupBox2 = new GroupBox(); + label_Acc_Z = new Label(); + label7 = new Label(); + label_Acc_Y = new Label(); + label5 = new Label(); + label_Acc_X = new Label(); + groupBox3 = new GroupBox(); + label_Gyr_Z = new Label(); + label9 = new Label(); + label_Gyr_Y = new Label(); + label11 = new Label(); + label_Gyr_X = new Label(); + label13 = new Label(); + groupBox4 = new GroupBox(); + label_Pos_L = new Label(); + label6 = new Label(); + label_Pos_Y = new Label(); + label10 = new Label(); + label_Pos_X = new Label(); + label14 = new Label(); + trackBar_Power = new TrackBar(); + button_LL = new Button(); + button_UU = new Button(); + button_DD = new Button(); + button_RR = new Button(); + label_Pow = new Label(); + button_ML = new Button(); + button_MR = new Button(); + groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Server_Port).BeginInit(); + groupBox2.SuspendLayout(); + groupBox3.SuspendLayout(); + groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)trackBar_Power).BeginInit(); + SuspendLayout(); + // + // timer_Test + // + timer_Test.Enabled = true; + timer_Test.Interval = 10; + timer_Test.Tick += timer_Test_Tick; + // + // groupBox1 + // + groupBox1.Controls.Add(textBox_Server_Addr); + groupBox1.Controls.Add(label2); + groupBox1.Controls.Add(button_Connect); + groupBox1.Controls.Add(numericUpDown_Server_Port); + groupBox1.Controls.Add(label3); + groupBox1.Dock = DockStyle.Top; + groupBox1.Location = new Point(0, 0); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new Size(275, 80); + groupBox1.TabIndex = 3; + groupBox1.TabStop = false; + groupBox1.Tag = ""; + groupBox1.Text = "Server"; + // + // textBox_Server_Addr + // + textBox_Server_Addr.Location = new Point(48, 16); + textBox_Server_Addr.Name = "textBox_Server_Addr"; + textBox_Server_Addr.Size = new Size(125, 23); + textBox_Server_Addr.TabIndex = 4; + textBox_Server_Addr.Text = "127.0.0.1"; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(6, 19); + label2.Name = "label2"; + label2.Size = new Size(36, 15); + label2.TabIndex = 3; + label2.Tag = ""; + label2.Text = "Addr:"; + // + // button_Connect + // + button_Connect.BackColor = Color.Transparent; + button_Connect.Location = new Point(112, 46); + button_Connect.Name = "button_Connect"; + button_Connect.Size = new Size(61, 23); + button_Connect.TabIndex = 2; + button_Connect.Tag = ""; + button_Connect.Text = "Connect"; + button_Connect.UseVisualStyleBackColor = false; + button_Connect.Click += button_Connect_Click; + // + // numericUpDown_Server_Port + // + numericUpDown_Server_Port.Location = new Point(44, 48); + numericUpDown_Server_Port.Maximum = new decimal(new int[] { 65000, 0, 0, 0 }); + numericUpDown_Server_Port.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + numericUpDown_Server_Port.Name = "numericUpDown_Server_Port"; + numericUpDown_Server_Port.Size = new Size(62, 23); + numericUpDown_Server_Port.TabIndex = 1; + numericUpDown_Server_Port.Value = new decimal(new int[] { 1001, 0, 0, 0 }); + // + // label3 + // + label3.AutoSize = true; + label3.Location = new Point(6, 50); + label3.Name = "label3"; + label3.Size = new Size(32, 15); + label3.TabIndex = 0; + label3.Tag = "#clients_port"; + label3.Text = "Port:"; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(6, 19); + label1.Name = "label1"; + label1.Size = new Size(17, 15); + label1.TabIndex = 4; + label1.Text = "X:"; + // + // groupBox2 + // + groupBox2.Controls.Add(label_Acc_Z); + groupBox2.Controls.Add(label7); + groupBox2.Controls.Add(label_Acc_Y); + groupBox2.Controls.Add(label5); + groupBox2.Controls.Add(label_Acc_X); + groupBox2.Controls.Add(label1); + groupBox2.Location = new Point(6, 86); + groupBox2.Name = "groupBox2"; + groupBox2.Size = new Size(78, 100); + groupBox2.TabIndex = 5; + groupBox2.TabStop = false; + groupBox2.Text = "Acc"; + // + // label_Acc_Z + // + label_Acc_Z.AutoSize = true; + label_Acc_Z.Location = new Point(19, 70); + label_Acc_Z.Name = "label_Acc_Z"; + label_Acc_Z.Size = new Size(13, 15); + label_Acc_Z.TabIndex = 9; + label_Acc_Z.Text = "0"; + // + // label7 + // + label7.AutoSize = true; + label7.Location = new Point(6, 70); + label7.Name = "label7"; + label7.Size = new Size(17, 15); + label7.TabIndex = 8; + label7.Text = "Z:"; + // + // label_Acc_Y + // + label_Acc_Y.AutoSize = true; + label_Acc_Y.Location = new Point(19, 45); + label_Acc_Y.Name = "label_Acc_Y"; + label_Acc_Y.Size = new Size(13, 15); + label_Acc_Y.TabIndex = 7; + label_Acc_Y.Text = "0"; + // + // label5 + // + label5.AutoSize = true; + label5.Location = new Point(6, 45); + label5.Name = "label5"; + label5.Size = new Size(17, 15); + label5.TabIndex = 6; + label5.Text = "Y:"; + // + // label_Acc_X + // + label_Acc_X.AutoSize = true; + label_Acc_X.Location = new Point(19, 19); + label_Acc_X.Name = "label_Acc_X"; + label_Acc_X.Size = new Size(13, 15); + label_Acc_X.TabIndex = 5; + label_Acc_X.Text = "0"; + // + // groupBox3 + // + groupBox3.Controls.Add(label_Gyr_Z); + groupBox3.Controls.Add(label9); + groupBox3.Controls.Add(label_Gyr_Y); + groupBox3.Controls.Add(label11); + groupBox3.Controls.Add(label_Gyr_X); + groupBox3.Controls.Add(label13); + groupBox3.Location = new Point(95, 86); + groupBox3.Name = "groupBox3"; + groupBox3.Size = new Size(78, 100); + groupBox3.TabIndex = 6; + groupBox3.TabStop = false; + groupBox3.Text = "Gyr"; + // + // label_Gyr_Z + // + label_Gyr_Z.AutoSize = true; + label_Gyr_Z.Location = new Point(19, 70); + label_Gyr_Z.Name = "label_Gyr_Z"; + label_Gyr_Z.Size = new Size(13, 15); + label_Gyr_Z.TabIndex = 9; + label_Gyr_Z.Text = "0"; + // + // label9 + // + label9.AutoSize = true; + label9.Location = new Point(6, 70); + label9.Name = "label9"; + label9.Size = new Size(17, 15); + label9.TabIndex = 8; + label9.Text = "Z:"; + // + // label_Gyr_Y + // + label_Gyr_Y.AutoSize = true; + label_Gyr_Y.Location = new Point(19, 45); + label_Gyr_Y.Name = "label_Gyr_Y"; + label_Gyr_Y.Size = new Size(13, 15); + label_Gyr_Y.TabIndex = 7; + label_Gyr_Y.Text = "0"; + // + // label11 + // + label11.AutoSize = true; + label11.Location = new Point(6, 45); + label11.Name = "label11"; + label11.Size = new Size(17, 15); + label11.TabIndex = 6; + label11.Text = "Y:"; + // + // label_Gyr_X + // + label_Gyr_X.AutoSize = true; + label_Gyr_X.Location = new Point(19, 19); + label_Gyr_X.Name = "label_Gyr_X"; + label_Gyr_X.Size = new Size(13, 15); + label_Gyr_X.TabIndex = 5; + label_Gyr_X.Text = "0"; + // + // label13 + // + label13.AutoSize = true; + label13.Location = new Point(6, 19); + label13.Name = "label13"; + label13.Size = new Size(17, 15); + label13.TabIndex = 4; + label13.Text = "X:"; + // + // groupBox4 + // + groupBox4.Controls.Add(label_Pos_L); + groupBox4.Controls.Add(label6); + groupBox4.Controls.Add(label_Pos_Y); + groupBox4.Controls.Add(label10); + groupBox4.Controls.Add(label_Pos_X); + groupBox4.Controls.Add(label14); + groupBox4.Location = new Point(188, 86); + groupBox4.Name = "groupBox4"; + groupBox4.Size = new Size(78, 100); + groupBox4.TabIndex = 7; + groupBox4.TabStop = false; + groupBox4.Text = "Pos"; + // + // label_Pos_L + // + label_Pos_L.AutoSize = true; + label_Pos_L.Location = new Point(19, 70); + label_Pos_L.Name = "label_Pos_L"; + label_Pos_L.Size = new Size(13, 15); + label_Pos_L.TabIndex = 9; + label_Pos_L.Text = "0"; + // + // label6 + // + label6.AutoSize = true; + label6.Location = new Point(6, 70); + label6.Name = "label6"; + label6.Size = new Size(16, 15); + label6.TabIndex = 8; + label6.Text = "L:"; + // + // label_Pos_Y + // + label_Pos_Y.AutoSize = true; + label_Pos_Y.Location = new Point(19, 45); + label_Pos_Y.Name = "label_Pos_Y"; + label_Pos_Y.Size = new Size(13, 15); + label_Pos_Y.TabIndex = 7; + label_Pos_Y.Text = "0"; + // + // label10 + // + label10.AutoSize = true; + label10.Location = new Point(6, 45); + label10.Name = "label10"; + label10.Size = new Size(17, 15); + label10.TabIndex = 6; + label10.Text = "Y:"; + // + // label_Pos_X + // + label_Pos_X.AutoSize = true; + label_Pos_X.Location = new Point(19, 19); + label_Pos_X.Name = "label_Pos_X"; + label_Pos_X.Size = new Size(13, 15); + label_Pos_X.TabIndex = 5; + label_Pos_X.Text = "0"; + // + // label14 + // + label14.AutoSize = true; + label14.Location = new Point(6, 19); + label14.Name = "label14"; + label14.Size = new Size(17, 15); + label14.TabIndex = 4; + label14.Text = "X:"; + // + // trackBar_Power + // + trackBar_Power.Location = new Point(112, 240); + trackBar_Power.Maximum = 100; + trackBar_Power.Name = "trackBar_Power"; + trackBar_Power.Orientation = Orientation.Vertical; + trackBar_Power.Size = new Size(45, 141); + trackBar_Power.TabIndex = 12; + trackBar_Power.Scroll += trackBar_Power_Scroll; + // + // button_LL + // + button_LL.Location = new Point(9, 318); + button_LL.Name = "button_LL"; + button_LL.Size = new Size(75, 23); + button_LL.TabIndex = 13; + button_LL.Text = "LL"; + button_LL.UseVisualStyleBackColor = true; + button_LL.MouseDown += button_UU_MouseDown; + button_LL.MouseUp += button_UU_MouseUp; + // + // button_UU + // + button_UU.Location = new Point(98, 211); + button_UU.Name = "button_UU"; + button_UU.Size = new Size(75, 23); + button_UU.TabIndex = 14; + button_UU.Text = "UU"; + button_UU.UseVisualStyleBackColor = true; + button_UU.MouseDown += button_UU_MouseDown; + button_UU.MouseUp += button_UU_MouseUp; + // + // button_DD + // + button_DD.Location = new Point(98, 412); + button_DD.Name = "button_DD"; + button_DD.Size = new Size(75, 23); + button_DD.TabIndex = 15; + button_DD.Text = "DD"; + button_DD.UseVisualStyleBackColor = true; + button_DD.MouseDown += button_UU_MouseDown; + button_DD.MouseUp += button_UU_MouseUp; + // + // button_RR + // + button_RR.Location = new Point(188, 318); + button_RR.Name = "button_RR"; + button_RR.Size = new Size(75, 23); + button_RR.TabIndex = 16; + button_RR.Text = "RR"; + button_RR.UseVisualStyleBackColor = true; + button_RR.MouseDown += button_UU_MouseDown; + button_RR.MouseUp += button_UU_MouseUp; + // + // label_Pow + // + label_Pow.AutoSize = true; + label_Pow.Location = new Point(126, 384); + label_Pow.Name = "label_Pow"; + label_Pow.Size = new Size(13, 15); + label_Pow.TabIndex = 21; + label_Pow.Text = "0"; + // + // button_ML + // + button_ML.Location = new Point(9, 211); + button_ML.Name = "button_ML"; + button_ML.Size = new Size(75, 23); + button_ML.TabIndex = 22; + button_ML.Text = "<-"; + button_ML.UseVisualStyleBackColor = true; + button_ML.MouseDown += button_UU_MouseDown; + button_ML.MouseUp += button_UU_MouseUp; + // + // button_MR + // + button_MR.Location = new Point(188, 211); + button_MR.Name = "button_MR"; + button_MR.Size = new Size(75, 23); + 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(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(275, 447); + 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); + MinimumSize = new Size(291, 389); + 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 + private System.Windows.Forms.Timer timer_Test; + private GroupBox groupBox1; + private TextBox textBox_Server_Addr; + private Label label2; + private Button button_Connect; + private NumericUpDown numericUpDown_Server_Port; + private Label label3; + private Label label1; + private GroupBox groupBox2; + private Label label_Acc_Y; + private Label label5; + private Label label_Acc_X; + private Label label_Acc_Z; + private Label label7; + private GroupBox groupBox3; + private Label label_Gyr_Z; + private Label label9; + private Label label_Gyr_Y; + private Label label11; + private Label label_Gyr_X; + private Label label13; + private GroupBox groupBox4; + private Label label_Pos_L; + private Label label6; + private Label label_Pos_Y; + private Label label10; + private Label label_Pos_X; + private Label label14; + private TrackBar trackBar_Power; + private Button button_LL; + private Button button_UU; + private Button button_DD; + private Button button_RR; + private Label label_Pow; + private Button button_ML; + private Button button_MR; + } +} diff --git a/DroneClient/FormMain.cs b/DroneClient/FormMain.cs new file mode 100644 index 0000000..d479e1a --- /dev/null +++ b/DroneClient/FormMain.cs @@ -0,0 +1,154 @@ +using System.Text; +using System.Numerics; +using System.Windows.Forms; +using static DroneSimulator.NetClient; +using DroneClient; + +namespace DroneSimulator +{ + public partial class Form_Main : Form + { + private NetClient netClient = new NetClient(); + + public Form_Main() + { + InitializeComponent(); + } + + private void ConnectionCallback(object o) + { + ConnectData data = (ConnectData)o; + + if (!data.Connect) + { + Invoke((MethodInvoker)delegate + { + button_Connect.Text = "Connect"; + button_Connect.BackColor = Color.Transparent; + MessageBox.Show("Connection closed"); + }); + + 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); + } + } +} diff --git a/DroneClient/FormMain.resx b/DroneClient/FormMain.resx new file mode 100644 index 0000000..175e7cf --- /dev/null +++ b/DroneClient/FormMain.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 162, 5 + + + 25 + + \ No newline at end of file diff --git a/DroneClient/NetClient.cs b/DroneClient/NetClient.cs new file mode 100644 index 0000000..603c61f --- /dev/null +++ b/DroneClient/NetClient.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net.Sockets; +using System.Net; + +namespace DroneSimulator +{ + internal class NetClient + { + public class ConnectData + { + public bool Connect; + + public Socket? Server; + } + + public class ReceiveData + { + public byte[]? Buffer; + public int Size; + + public Socket? Server; + } + + private class ServerData + { + public const int size = 1024; + public byte[] buffer = new byte[size]; + } + + private Socket? ServerSocket = null; + private ServerData DataServer = new ServerData(); + + public delegate void ClientCallback(object o); + + private ClientCallback? ConnectionCallback; + private ClientCallback? ReceiveCallback; + + public enum ClientState { Error, Connected, Stop }; + + public ClientState Connect(string Addr, int Port, ClientCallback Connection, ClientCallback Receive) + { + if (ServerSocket != null) + { + ServerSocket.Close(); + ServerSocket = null; + return ClientState.Stop; + } + + ConnectionCallback = Connection; + ReceiveCallback = Receive; + + IPEndPoint ep = new IPEndPoint(IPAddress.Parse(Addr), Port); + ServerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + + try + { + ServerSocket.Connect(ep); + } + catch { ServerSocket.Close(); ServerSocket = null; return ClientState.Error; } + + ConnectionCallback(new ConnectData { Connect = true, Server = ServerSocket }); + + ReceiveData receiveData = new ReceiveData { Buffer = DataServer.buffer, Size = ServerData.size, Server = ServerSocket }; + ServerSocket.BeginReceive(DataServer.buffer, 0, ServerData.size, 0, new AsyncCallback(ReadCallback), receiveData); + + return ClientState.Connected; + } + + public void Close() + { + ServerSocket?.Close(); + ServerSocket = null; + } + + public void ReadCallback(IAsyncResult ar) + { + ReceiveData cd = (ReceiveData)ar.AsyncState; + if (cd == null) return; + + int bytes = 0; + try { bytes = ServerSocket.EndReceive(ar); } + catch { } + + if (bytes == 0) + { + ServerSocket?.Close(); + + if (ServerSocket != null) ConnectionCallback(new ConnectData { Connect = false, Server = null }); + + ServerSocket = null; + + return; + } + + ReceiveCallback(new ReceiveData { Buffer = cd.Buffer, Size = bytes, Server = ServerSocket }); + + ServerSocket?.BeginReceive(cd.Buffer, 0, ServerData.size, 0, new AsyncCallback(ReadCallback), cd); + } + } +} diff --git a/DroneClient/Program.cs b/DroneClient/Program.cs new file mode 100644 index 0000000..efb14d6 --- /dev/null +++ b/DroneClient/Program.cs @@ -0,0 +1,17 @@ +namespace DroneSimulator +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form_Main()); + } + } +} \ No newline at end of file diff --git a/DroneClient/bin/Debug/net9.0-windows/DroneClient.deps.json b/DroneClient/bin/Debug/net9.0-windows/DroneClient.deps.json new file mode 100644 index 0000000..3db7b6c --- /dev/null +++ b/DroneClient/bin/Debug/net9.0-windows/DroneClient.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": { + "DroneClient/1.0.0": { + "runtime": { + "DroneClient.dll": {} + } + } + } + }, + "libraries": { + "DroneClient/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/DroneClient/bin/Debug/net9.0-windows/DroneClient.dll b/DroneClient/bin/Debug/net9.0-windows/DroneClient.dll new file mode 100644 index 0000000..4737dbf Binary files /dev/null and b/DroneClient/bin/Debug/net9.0-windows/DroneClient.dll differ diff --git a/DroneClient/bin/Debug/net9.0-windows/DroneClient.exe b/DroneClient/bin/Debug/net9.0-windows/DroneClient.exe new file mode 100644 index 0000000..92d0918 Binary files /dev/null and b/DroneClient/bin/Debug/net9.0-windows/DroneClient.exe differ diff --git a/DroneClient/bin/Debug/net9.0-windows/DroneClient.pdb b/DroneClient/bin/Debug/net9.0-windows/DroneClient.pdb new file mode 100644 index 0000000..fc70bf0 Binary files /dev/null and b/DroneClient/bin/Debug/net9.0-windows/DroneClient.pdb differ diff --git a/DroneClient/bin/Debug/net9.0-windows/DroneClient.runtimeconfig.json b/DroneClient/bin/Debug/net9.0-windows/DroneClient.runtimeconfig.json new file mode 100644 index 0000000..68ec4b9 --- /dev/null +++ b/DroneClient/bin/Debug/net9.0-windows/DroneClient.runtimeconfig.json @@ -0,0 +1,19 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "9.0.0" + } + ], + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false, + "CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false + } + } +} \ No newline at end of file diff --git a/DroneClient/obj/Debug/net9.0-windows/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs b/DroneClient/obj/Debug/net9.0-windows/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs new file mode 100644 index 0000000..feda5e9 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.AssemblyInfo.cs b/DroneClient/obj/Debug/net9.0-windows/DroneClient.AssemblyInfo.cs new file mode 100644 index 0000000..a3fe7a8 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.AssemblyInfo.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("DroneClient")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("DroneClient")] +[assembly: System.Reflection.AssemblyTitleAttribute("DroneClient")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] +[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")] + +// Создано классом WriteCodeFragment MSBuild. + diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.AssemblyInfoInputs.cache b/DroneClient/obj/Debug/net9.0-windows/DroneClient.AssemblyInfoInputs.cache new file mode 100644 index 0000000..550a2a5 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +372de9fd6d36597e50cdb2250f48b9cb0d5e8e1a2d1e568b83e287afe9580301 diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.GeneratedMSBuildEditorConfig.editorconfig b/DroneClient/obj/Debug/net9.0-windows/DroneClient.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..8652b6b --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,22 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.TargetFramework = net9.0-windows +build_property.TargetPlatformMinVersion = 7.0 +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = DroneClient +build_property.ProjectDir = D:\CPL\Simulator\DroneClient\DroneClient\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.CsWinRTUseWindowsUIXamlProjections = false +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.GlobalUsings.g.cs b/DroneClient/obj/Debug/net9.0-windows/DroneClient.GlobalUsings.g.cs new file mode 100644 index 0000000..84bbb89 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.GlobalUsings.g.cs @@ -0,0 +1,10 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.Drawing; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; +global using global::System.Windows.Forms; diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.assets.cache b/DroneClient/obj/Debug/net9.0-windows/DroneClient.assets.cache new file mode 100644 index 0000000..2d918c1 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneClient.assets.cache differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.BuildWithSkipAnalyzers b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.CoreCompileInputs.cache b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..a1dc96f --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +01e86f1c7bc139724ab77bc57845e8da30f3f593b41b11317ce8867d8fb43c28 diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.FileListAbsolute.txt b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f8d2f18 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.FileListAbsolute.txt @@ -0,0 +1,32 @@ +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneSimulator.Form_Main.resources +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.csproj.GenerateResource.cache +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.GeneratedMSBuildEditorConfig.editorconfig +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.AssemblyInfoInputs.cache +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.AssemblyInfo.cs +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.csproj.CoreCompileInputs.cache +D:\Files\Main\Projects\Fly\DroneClient\bin\Debug\net9.0-windows\DroneClient.exe +D:\Files\Main\Projects\Fly\DroneClient\bin\Debug\net9.0-windows\DroneClient.deps.json +D:\Files\Main\Projects\Fly\DroneClient\bin\Debug\net9.0-windows\DroneClient.runtimeconfig.json +D:\Files\Main\Projects\Fly\DroneClient\bin\Debug\net9.0-windows\DroneClient.dll +D:\Files\Main\Projects\Fly\DroneClient\bin\Debug\net9.0-windows\DroneClient.pdb +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.dll +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\refint\DroneClient.dll +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.pdb +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\DroneClient.genruntimeconfig.cache +D:\Files\Main\Projects\Fly\DroneClient\obj\Debug\net9.0-windows\ref\DroneClient.dll +D:\CPL\Simulator\DroneClient\DroneClient\bin\Debug\net9.0-windows\DroneClient.exe +D:\CPL\Simulator\DroneClient\DroneClient\bin\Debug\net9.0-windows\DroneClient.deps.json +D:\CPL\Simulator\DroneClient\DroneClient\bin\Debug\net9.0-windows\DroneClient.runtimeconfig.json +D:\CPL\Simulator\DroneClient\DroneClient\bin\Debug\net9.0-windows\DroneClient.dll +D:\CPL\Simulator\DroneClient\DroneClient\bin\Debug\net9.0-windows\DroneClient.pdb +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneSimulator.Form_Main.resources +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.csproj.GenerateResource.cache +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.GeneratedMSBuildEditorConfig.editorconfig +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.AssemblyInfoInputs.cache +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.AssemblyInfo.cs +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.csproj.CoreCompileInputs.cache +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\DroneClient.dll +D:\CPL\Simulator\DroneClient\DroneClient\obj\Debug\net9.0-windows\refint\DroneClient.dll +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\ref\DroneClient.dll diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.GenerateResource.cache b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.GenerateResource.cache new file mode 100644 index 0000000..c346dc5 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneClient.csproj.GenerateResource.cache differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.designer.deps.json b/DroneClient/obj/Debug/net9.0-windows/DroneClient.designer.deps.json new file mode 100644 index 0000000..360ddb4 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.designer.deps.json @@ -0,0 +1,11 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": {} + }, + "libraries": {} +} \ No newline at end of file diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.designer.runtimeconfig.json b/DroneClient/obj/Debug/net9.0-windows/DroneClient.designer.runtimeconfig.json new file mode 100644 index 0000000..9657ac9 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.designer.runtimeconfig.json @@ -0,0 +1,25 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "9.0.0" + } + ], + "additionalProbingPaths": [ + "C:\\Users\\Дана\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\Дана\\.nuget\\packages", + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false, + "CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false, + "Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true + } + } +} \ No newline at end of file diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.dll b/DroneClient/obj/Debug/net9.0-windows/DroneClient.dll new file mode 100644 index 0000000..4737dbf Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneClient.dll differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.genruntimeconfig.cache b/DroneClient/obj/Debug/net9.0-windows/DroneClient.genruntimeconfig.cache new file mode 100644 index 0000000..5b1f791 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneClient.genruntimeconfig.cache @@ -0,0 +1 @@ +812e26f7e032de5fb2d5301fec24f483552f39e0a38ac0c052cba2ffa3a73bbd diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneClient.pdb b/DroneClient/obj/Debug/net9.0-windows/DroneClient.pdb new file mode 100644 index 0000000..fc70bf0 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneClient.pdb differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfo.cs b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfo.cs new file mode 100644 index 0000000..bc6c10b --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfo.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("DroneSimulator")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("DroneSimulator")] +[assembly: System.Reflection.AssemblyTitleAttribute("DroneSimulator")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] +[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfoInputs.cache b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfoInputs.cache new file mode 100644 index 0000000..ac31a13 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +7f461f329c2aabe3c068a957f4f02cdcdb168c359c556cd0c46598798ec3c65d diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.Form_Main.resources b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.Form_Main.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.Form_Main.resources differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..3009e19 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,22 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.TargetFramework = net9.0-windows +build_property.TargetPlatformMinVersion = 7.0 +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = DroneSimulator +build_property.ProjectDir = D:\Files\Main\Projects\Fly\DroneClient\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.CsWinRTUseWindowsUIXamlProjections = false +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.GlobalUsings.g.cs b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.GlobalUsings.g.cs new file mode 100644 index 0000000..84bbb89 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.GlobalUsings.g.cs @@ -0,0 +1,10 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.Drawing; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; +global using global::System.Windows.Forms; diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.assets.cache b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.assets.cache new file mode 100644 index 0000000..dd57bbd Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.assets.cache differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.BuildWithSkipAnalyzers b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.CoreCompileInputs.cache b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..50ef240 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +051ffb89f1ee627ab3b9aaef920afd665a18f0f3c3fe82852812d5c6608dcb30 diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.FileListAbsolute.txt b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..93aac95 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.FileListAbsolute.txt @@ -0,0 +1,32 @@ +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.exe +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.deps.json +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.runtimeconfig.json +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.dll +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.pdb +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.Form1.resources +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.GenerateResource.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfoInputs.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfo.cs +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.CoreCompileInputs.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.dll +R:\DroneSimulator\obj\Debug\net9.0-windows\refint\DroneSimulator.dll +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.pdb +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.genruntimeconfig.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\ref\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.exe +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.deps.json +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.runtimeconfig.json +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.pdb +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.GenerateResource.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfoInputs.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfo.cs +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.CoreCompileInputs.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\refint\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.pdb +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.genruntimeconfig.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\ref\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.Form_Main.resources diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.GenerateResource.cache b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.GenerateResource.cache new file mode 100644 index 0000000..f296fd0 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.csproj.GenerateResource.cache differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.designer.deps.json b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.designer.deps.json new file mode 100644 index 0000000..360ddb4 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.designer.deps.json @@ -0,0 +1,11 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": {} + }, + "libraries": {} +} \ No newline at end of file diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.designer.runtimeconfig.json b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.designer.runtimeconfig.json new file mode 100644 index 0000000..62eff55 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.designer.runtimeconfig.json @@ -0,0 +1,25 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "9.0.0" + } + ], + "additionalProbingPaths": [ + "C:\\Users\\USER\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\USER\\.nuget\\packages", + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false, + "CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false, + "Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true + } + } +} \ No newline at end of file diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.dll b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.dll new file mode 100644 index 0000000..cc2a360 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.dll differ diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.genruntimeconfig.cache b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.genruntimeconfig.cache new file mode 100644 index 0000000..f1834d7 --- /dev/null +++ b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.genruntimeconfig.cache @@ -0,0 +1 @@ +42c9c47684404b6458665b5db1d77e8e1563e0e910b9607df810cd1011407bfc diff --git a/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.pdb b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.pdb new file mode 100644 index 0000000..bc5194b Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/DroneSimulator.pdb differ diff --git a/DroneClient/obj/Debug/net9.0-windows/apphost.exe b/DroneClient/obj/Debug/net9.0-windows/apphost.exe new file mode 100644 index 0000000..92d0918 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/apphost.exe differ diff --git a/DroneClient/obj/Debug/net9.0-windows/ref/DroneClient.dll b/DroneClient/obj/Debug/net9.0-windows/ref/DroneClient.dll new file mode 100644 index 0000000..331abf7 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/ref/DroneClient.dll differ diff --git a/DroneClient/obj/Debug/net9.0-windows/ref/DroneSimulator.dll b/DroneClient/obj/Debug/net9.0-windows/ref/DroneSimulator.dll new file mode 100644 index 0000000..5adc0ee Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/ref/DroneSimulator.dll differ diff --git a/DroneClient/obj/Debug/net9.0-windows/refint/DroneClient.dll b/DroneClient/obj/Debug/net9.0-windows/refint/DroneClient.dll new file mode 100644 index 0000000..331abf7 Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/refint/DroneClient.dll differ diff --git a/DroneClient/obj/Debug/net9.0-windows/refint/DroneSimulator.dll b/DroneClient/obj/Debug/net9.0-windows/refint/DroneSimulator.dll new file mode 100644 index 0000000..5adc0ee Binary files /dev/null and b/DroneClient/obj/Debug/net9.0-windows/refint/DroneSimulator.dll differ diff --git a/DroneClient/obj/DroneClient.csproj.nuget.dgspec.json b/DroneClient/obj/DroneClient.csproj.nuget.dgspec.json new file mode 100644 index 0000000..0f88e49 --- /dev/null +++ b/DroneClient/obj/DroneClient.csproj.nuget.dgspec.json @@ -0,0 +1,76 @@ +{ + "format": 1, + "restore": { + "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj": {} + }, + "projects": { + "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", + "projectName": "DroneClient", + "projectPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", + "packagesPath": "C:\\Users\\Дана\\.nuget\\packages\\", + "outputPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\Дана\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0-windows" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.200" + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/DroneClient/obj/DroneClient.csproj.nuget.g.props b/DroneClient/obj/DroneClient.csproj.nuget.g.props new file mode 100644 index 0000000..02c5408 --- /dev/null +++ b/DroneClient/obj/DroneClient.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\Дана\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.13.2 + + + + + + \ No newline at end of file diff --git a/DroneClient/obj/DroneClient.csproj.nuget.g.targets b/DroneClient/obj/DroneClient.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/DroneClient/obj/DroneClient.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/DroneClient/obj/DroneSimulator.csproj.nuget.dgspec.json b/DroneClient/obj/DroneSimulator.csproj.nuget.dgspec.json new file mode 100644 index 0000000..f42b2eb --- /dev/null +++ b/DroneClient/obj/DroneSimulator.csproj.nuget.dgspec.json @@ -0,0 +1,76 @@ +{ + "format": 1, + "restore": { + "D:\\Files\\Main\\Projects\\Fly\\DroneClient\\DroneSimulator.csproj": {} + }, + "projects": { + "D:\\Files\\Main\\Projects\\Fly\\DroneClient\\DroneSimulator.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\Files\\Main\\Projects\\Fly\\DroneClient\\DroneSimulator.csproj", + "projectName": "DroneSimulator", + "projectPath": "D:\\Files\\Main\\Projects\\Fly\\DroneClient\\DroneSimulator.csproj", + "packagesPath": "C:\\Users\\USER\\.nuget\\packages\\", + "outputPath": "D:\\Files\\Main\\Projects\\Fly\\DroneClient\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\USER\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0-windows" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.200" + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/DroneClient/obj/DroneSimulator.csproj.nuget.g.props b/DroneClient/obj/DroneSimulator.csproj.nuget.g.props new file mode 100644 index 0000000..c200bda --- /dev/null +++ b/DroneClient/obj/DroneSimulator.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\USER\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.13.2 + + + + + + \ No newline at end of file diff --git a/DroneClient/obj/DroneSimulator.csproj.nuget.g.targets b/DroneClient/obj/DroneSimulator.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/DroneClient/obj/DroneSimulator.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/DroneClient/obj/project.assets.json b/DroneClient/obj/project.assets.json new file mode 100644 index 0000000..bb8d343 --- /dev/null +++ b/DroneClient/obj/project.assets.json @@ -0,0 +1,82 @@ +{ + "version": 3, + "targets": { + "net9.0-windows7.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net9.0-windows7.0": [] + }, + "packageFolders": { + "C:\\Users\\Дана\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", + "projectName": "DroneClient", + "projectPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", + "packagesPath": "C:\\Users\\Дана\\.nuget\\packages\\", + "outputPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\Дана\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0-windows" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.200" + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/DroneClient/obj/project.nuget.cache b/DroneClient/obj/project.nuget.cache new file mode 100644 index 0000000..c7efde6 --- /dev/null +++ b/DroneClient/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "ddOSNwF62rQ=", + "success": true, + "projectFilePath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/DroneSimulator/.vs/DroneSimulator/DesignTimeBuild/.dtbcache.v2 b/DroneSimulator/.vs/DroneSimulator/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..1a0296d Binary files /dev/null and b/DroneSimulator/.vs/DroneSimulator/DesignTimeBuild/.dtbcache.v2 differ diff --git a/DroneSimulator/.vs/DroneSimulator/FileContentIndex/88d4b77f-31ef-4e26-bbc6-d1b4e20990a0.vsidx b/DroneSimulator/.vs/DroneSimulator/FileContentIndex/88d4b77f-31ef-4e26-bbc6-d1b4e20990a0.vsidx new file mode 100644 index 0000000..a900f4e Binary files /dev/null and b/DroneSimulator/.vs/DroneSimulator/FileContentIndex/88d4b77f-31ef-4e26-bbc6-d1b4e20990a0.vsidx differ diff --git a/DroneSimulator/.vs/DroneSimulator/v17/.futdcache.v2 b/DroneSimulator/.vs/DroneSimulator/v17/.futdcache.v2 new file mode 100644 index 0000000..15021b5 Binary files /dev/null and b/DroneSimulator/.vs/DroneSimulator/v17/.futdcache.v2 differ diff --git a/DroneSimulator/.vs/DroneSimulator/v17/.suo b/DroneSimulator/.vs/DroneSimulator/v17/.suo new file mode 100644 index 0000000..cd3e445 Binary files /dev/null and b/DroneSimulator/.vs/DroneSimulator/v17/.suo differ diff --git a/DroneSimulator/.vs/DroneSimulator/v17/DocumentLayout.backup.json b/DroneSimulator/.vs/DroneSimulator/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..7929001 --- /dev/null +++ b/DroneSimulator/.vs/DroneSimulator/v17/DocumentLayout.backup.json @@ -0,0 +1,12 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\", + "Documents": [], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [] + } + ] +} \ No newline at end of file diff --git a/DroneSimulator/.vs/DroneSimulator/v17/DocumentLayout.json b/DroneSimulator/.vs/DroneSimulator/v17/DocumentLayout.json new file mode 100644 index 0000000..048d35a --- /dev/null +++ b/DroneSimulator/.vs/DroneSimulator/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneSimulator.csproj|d:\\cpl\\simulator\\dronesimulator\\dronesimulator\\screen2d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}|DroneSimulator.csproj|solutionrelative:screen2d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Screen2D.cs", + "DocumentMoniker": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\Screen2D.cs", + "RelativeDocumentMoniker": "Screen2D.cs", + "ToolTip": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\Screen2D.cs", + "RelativeToolTip": "Screen2D.cs", + "ViewState": "AgIAAIgAAAAAAAAAAAAwwAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-03-27T13:13:30.215Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.metadata.v9.bin b/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.metadata.v9.bin new file mode 100644 index 0000000..b9c259d Binary files /dev/null and b/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.metadata.v9.bin differ diff --git a/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.projects.v9.bin b/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.projects.v9.bin new file mode 100644 index 0000000..a6cc230 Binary files /dev/null and b/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.projects.v9.bin differ diff --git a/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.strings.v9.bin b/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.strings.v9.bin new file mode 100644 index 0000000..78836ef Binary files /dev/null and b/DroneSimulator/.vs/ProjectEvaluation/dronesimulator.strings.v9.bin differ diff --git a/DroneSimulator/Drone.cs b/DroneSimulator/Drone.cs new file mode 100644 index 0000000..df65b3a --- /dev/null +++ b/DroneSimulator/Drone.cs @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using static System.Windows.Forms.AxHost; + +namespace DroneSimulator +{ + internal class Drone + { + public int ID; + public float Mass; // Масса + public bool Active; // Живой? + public float Length; // Длинна лучей + public Vector3 PosXYZ, SpdXYZ, AccXYZ; // Положение в пространстве: Позиция, Скорость, Ускорение + public Quaternion Quat; // Основной кватернион + public float Power = 0; // Тяга всех двигателей + public Vector3 SpdPRY, AccPRY; // Поворот в пространстве: pitch roll yaw + + public Vector3 Acc, Gyr; // Имитация: Акселерометр, Гироскоп + public float LaserRange; // Имитация: Дальномер + + private const float Gravity = 1.0f; + + private const float TO_GRAD = 180 / MathF.PI; + private const float TO_RADI = MathF.PI / 180; + + private Thread DroneThread; + private int Timer; + + private static int CounterID = 0; + + + + public struct DataOut + { + public float AccX, AccY, AccZ; + public float GyrX, GyrY, GyrZ; + public float PosX, PosY; + public float LaserRange; + + public byte[] getBytes() + { + int size = Marshal.SizeOf(this); + byte[] arr = new byte[size]; + + IntPtr ptr = IntPtr.Zero; + try + { + ptr = Marshal.AllocHGlobal(size); + Marshal.StructureToPtr(this, ptr, true); + Marshal.Copy(ptr, arr, 0, size); + } + finally + { + Marshal.FreeHGlobal(ptr); + } + return arr; + } + } + + public struct DataIn + { + public float MotorUL, MotorUR, MotorDL, MotorDR; + + public void fromBytes(byte[] arr) + { + DataIn mem = new DataIn(); + + int size = Marshal.SizeOf(mem); + IntPtr ptr = IntPtr.Zero; + try + { + ptr = Marshal.AllocHGlobal(size); + + Marshal.Copy(arr, 0, ptr, size); + + mem = (DataIn)Marshal.PtrToStructure(ptr, mem.GetType()); + } + finally + { + Marshal.FreeHGlobal(ptr); + } + + this = mem; + } + } + + private void ThreadFunction() + { + while (DroneThread != null) + { + float time = Environment.TickCount - Timer; + Timer = Environment.TickCount; + Action(time / 100); + Thread.Sleep(1); + } + } + + public Drone(int id) + { + ID = id; + Active = false; + PosXYZ = new Vector3(2000, 1000, 0); + SpdXYZ = Vector3.Zero; + AccXYZ = Vector3.Zero; + Quat = Quaternion.Identity; + + DroneThread = new Thread(new ThreadStart(ThreadFunction)); + Timer = Environment.TickCount; + DroneThread.Start(); + } + + public int Create(float mass, float len) + { + Mass = Range(mass); + Length = len; + + Active = true; + + return ID; + } + + public void Close() + { + DroneThread = null; + } + + private float GetAngle(float a1, float a2, float az) + { + if (a2 == 0.0f && az == 0.0f) + { + if (a1 > 0) return 90; + if (a1 < 0) return -90; + return 0; + } + return MathF.Atan(a1 / MathF.Sqrt(a2 * a2 + az * az)) * TO_GRAD; + } + + public void Rotate(float x, float y, float z) + { + x = x * MathF.PI / 180; + y = y * MathF.PI / 180; + z = -z * MathF.PI / 180; + + Quaternion map = Quat; + Quaternion spd = new Quaternion(x, y, z, 0); + Quaternion aq = spd * map; + + map.W -= 0.5f * aq.W; + map.X -= 0.5f * aq.X; + map.Y -= 0.5f * aq.Y; + map.Z -= 0.5f * aq.Z; + + Quat = Quaternion.Normalize(map); + } + + public Vector4 GetOrientation() + { + Quaternion grav = new Quaternion(0, 0, 1, 0); + + grav = (Quat * grav) * Quaternion.Inverse(Quat); + + float yaw = 2 * MathF.Atan2(Quat.Z, Quat.W) * TO_GRAD; + if (yaw < 0.0f) yaw = 360.0f + yaw; + + return new Vector4(GetAngle(grav.Y, grav.X, grav.Z), GetAngle(-grav.X, grav.Y, grav.Z), yaw, grav.Z); + } + + public void Action(float time) + { + if (!Active) return; + + float flow = Power; + + if (PosXYZ.Z < 100) + { + flow += flow * 0.1f; // Воздушная подушка + } + + Quaternion pow = Quaternion.Inverse(Quat) * new Quaternion(0, 0, flow, 0) * Quat; + AccXYZ = new Vector3(pow.X, pow.Y, pow.Z) / Mass; + + SpdPRY += AccPRY * time / (Mass * Length); + + SpdXYZ += (AccXYZ + new Vector3(0, 0, -Gravity)) * time; + PosXYZ += SpdXYZ * time; + + if (PosXYZ.Z < 0) + { + SpdPRY = Vector3.Zero; + SpdXYZ.X = 0; + SpdXYZ.Y = 0; + Quat = Quaternion.Identity; + } + else Rotate(SpdPRY.X, SpdPRY.Y, SpdPRY.Z); + + Vector4 ori = GetOrientation(); + + if (PosXYZ.Z < 0) + { + PosXYZ.Z = 0; + + /*if (SpdXYZ.Z < -5) + { + Active = false; // Сильно ударился о землю + }*/ + + /*if (MathF.Abs(ori.X) > 45 || MathF.Abs(ori.Y) > 45) + { + Active = false; // Повредил винты при посадке + }*/ + + SpdXYZ.Z = 0; + + Acc = new Vector3(0, 0, 1); + Gyr = Vector3.Zero; + LaserRange = 0; + } + else + { + /*if (ori.W < 0) + { + Active = false; // Перевернулся вверх ногами + }*/ + + Quaternion grav = new Quaternion(AccXYZ.X, AccXYZ.Y, AccXYZ.Z, 0); + grav = (Quat * grav) * Quaternion.Inverse(Quat); + Acc = new Vector3(grav.X, grav.Y, grav.Z); + + Gyr = SpdPRY; + + float tilt = (MathF.Abs(ori.X) + MathF.Abs(ori.Y)) * TO_RADI; + + if (tilt < 90 && ori.W > 0) LaserRange = PosXYZ.Z / MathF.Cos(tilt); + else LaserRange = float.MaxValue; + } + } + + private float Range(float pow) + { + if (pow > 1) pow = 1; + if (pow < 0) pow = 0; + + return pow; + } + + public void SetQadroPow(float ul, float ur, float dl, float dr) + { + ul = Range(ul); ur = Range(ur); dl = Range(dl); dr = Range(dr); + + Power = (ul + ur + dl + dr) / 4; + + AccPRY.Y = ((ul + dl) - (ur + dr)); + AccPRY.X = ((ul + ur) - (dl + dr)); + AccPRY.Z = ((ul + dr) - (dl + ur)) / 4; + } + } +} diff --git a/DroneSimulator/DroneSimulator.csproj b/DroneSimulator/DroneSimulator.csproj new file mode 100644 index 0000000..da8dc2d --- /dev/null +++ b/DroneSimulator/DroneSimulator.csproj @@ -0,0 +1,16 @@ + + + + WinExe + net9.0-windows + enable + true + enable + icon.ico + + + + + + + \ No newline at end of file diff --git a/DroneSimulator/DroneSimulator.csproj.user b/DroneSimulator/DroneSimulator.csproj.user new file mode 100644 index 0000000..cf5c74f --- /dev/null +++ b/DroneSimulator/DroneSimulator.csproj.user @@ -0,0 +1,8 @@ + + + + + Form + + + \ No newline at end of file diff --git a/DroneSimulator/DroneSimulator.sln b/DroneSimulator/DroneSimulator.sln new file mode 100644 index 0000000..05ccc73 --- /dev/null +++ b/DroneSimulator/DroneSimulator.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35913.81 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DroneSimulator", "DroneSimulator.csproj", "{B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B66DBB0A-CCDD-4711-ADB0-5AA11AC1760D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F4724E16-C228-4B38-BB06-B90A7A057219} + EndGlobalSection +EndGlobal diff --git a/DroneSimulator/FormMain.Designer.cs b/DroneSimulator/FormMain.Designer.cs new file mode 100644 index 0000000..2997b8d --- /dev/null +++ b/DroneSimulator/FormMain.Designer.cs @@ -0,0 +1,420 @@ +namespace DroneSimulator +{ + partial class Form_Main + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form_Main)); + menuStrip_Menu = new MenuStrip(); + fileToolStripMenuItem = new ToolStripMenuItem(); + exitToolStripMenuItem = new ToolStripMenuItem(); + groupBox_Screen = new GroupBox(); + pictureBox_2D = new PictureBox(); + tabControl_Menu = new TabControl(); + tabPage_Main = new TabPage(); + groupBox_Visual = new GroupBox(); + button_Visual_Start = new Button(); + numericUpDown_Visual_Port = new NumericUpDown(); + label_Visual_Port = new Label(); + groupBox_Clients = new GroupBox(); + numericUpDown_Clients_Limit = new NumericUpDown(); + label_Clients_Limit = new Label(); + label_Clients_Num = new Label(); + label_Clients_Count = new Label(); + button_Client_Start = new Button(); + numericUpDown_Clients_Port = new NumericUpDown(); + label_Clients_Port = new Label(); + tabPage_Model = new TabPage(); + tabPage_Area = new TabPage(); + groupBox_Navi = new GroupBox(); + panel1 = new Panel(); + button_Drone_Color = new Button(); + comboBox_Drone_Rotor = new ComboBox(); + comboBox_Drone = new ComboBox(); + timer_Test = new System.Windows.Forms.Timer(components); + menuStrip_Menu.SuspendLayout(); + groupBox_Screen.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox_2D).BeginInit(); + tabControl_Menu.SuspendLayout(); + tabPage_Main.SuspendLayout(); + groupBox_Visual.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Visual_Port).BeginInit(); + groupBox_Clients.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Limit).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Port).BeginInit(); + groupBox_Navi.SuspendLayout(); + panel1.SuspendLayout(); + SuspendLayout(); + // + // menuStrip_Menu + // + menuStrip_Menu.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem }); + menuStrip_Menu.Location = new Point(0, 0); + menuStrip_Menu.Name = "menuStrip_Menu"; + menuStrip_Menu.Size = new Size(884, 24); + menuStrip_Menu.TabIndex = 0; + menuStrip_Menu.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { exitToolStripMenuItem }); + fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + fileToolStripMenuItem.Size = new Size(37, 20); + fileToolStripMenuItem.Tag = "#file"; + fileToolStripMenuItem.Text = "File"; + // + // exitToolStripMenuItem + // + exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + exitToolStripMenuItem.Size = new Size(93, 22); + exitToolStripMenuItem.Tag = "#exit"; + exitToolStripMenuItem.Text = "Exit"; + exitToolStripMenuItem.Click += exitToolStripMenuItem_Click; + // + // groupBox_Screen + // + groupBox_Screen.Controls.Add(pictureBox_2D); + groupBox_Screen.Dock = DockStyle.Fill; + groupBox_Screen.Location = new Point(218, 24); + groupBox_Screen.Name = "groupBox_Screen"; + groupBox_Screen.Size = new Size(466, 437); + groupBox_Screen.TabIndex = 1; + groupBox_Screen.TabStop = false; + // + // pictureBox_2D + // + pictureBox_2D.BackColor = Color.Gainsboro; + pictureBox_2D.Dock = DockStyle.Fill; + pictureBox_2D.Location = new Point(3, 19); + pictureBox_2D.Name = "pictureBox_2D"; + pictureBox_2D.Size = new Size(460, 415); + pictureBox_2D.SizeMode = PictureBoxSizeMode.Zoom; + pictureBox_2D.TabIndex = 0; + pictureBox_2D.TabStop = false; + // + // tabControl_Menu + // + tabControl_Menu.Controls.Add(tabPage_Main); + tabControl_Menu.Controls.Add(tabPage_Model); + tabControl_Menu.Controls.Add(tabPage_Area); + tabControl_Menu.Dock = DockStyle.Left; + tabControl_Menu.Location = new Point(0, 24); + tabControl_Menu.Name = "tabControl_Menu"; + tabControl_Menu.SelectedIndex = 0; + tabControl_Menu.Size = new Size(218, 437); + tabControl_Menu.TabIndex = 2; + // + // tabPage_Main + // + tabPage_Main.Controls.Add(groupBox_Visual); + tabPage_Main.Controls.Add(groupBox_Clients); + tabPage_Main.Location = new Point(4, 24); + tabPage_Main.Name = "tabPage_Main"; + tabPage_Main.Padding = new Padding(3); + tabPage_Main.Size = new Size(210, 409); + tabPage_Main.TabIndex = 0; + tabPage_Main.Tag = "#main"; + tabPage_Main.Text = "Main"; + tabPage_Main.UseVisualStyleBackColor = true; + // + // groupBox_Visual + // + groupBox_Visual.Controls.Add(button_Visual_Start); + groupBox_Visual.Controls.Add(numericUpDown_Visual_Port); + groupBox_Visual.Controls.Add(label_Visual_Port); + groupBox_Visual.Dock = DockStyle.Top; + groupBox_Visual.Location = new Point(3, 83); + groupBox_Visual.Name = "groupBox_Visual"; + groupBox_Visual.Size = new Size(204, 62); + groupBox_Visual.TabIndex = 2; + groupBox_Visual.TabStop = false; + groupBox_Visual.Tag = "#visual"; + groupBox_Visual.Text = "Visual"; + // + // button_Visual_Start + // + button_Visual_Start.Location = new Point(112, 22); + button_Visual_Start.Name = "button_Visual_Start"; + button_Visual_Start.Size = new Size(86, 23); + button_Visual_Start.TabIndex = 9; + button_Visual_Start.Tag = "#visual_start"; + button_Visual_Start.Text = "Start"; + button_Visual_Start.UseVisualStyleBackColor = true; + // + // numericUpDown_Visual_Port + // + numericUpDown_Visual_Port.Location = new Point(44, 24); + numericUpDown_Visual_Port.Maximum = new decimal(new int[] { 65000, 0, 0, 0 }); + numericUpDown_Visual_Port.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + numericUpDown_Visual_Port.Name = "numericUpDown_Visual_Port"; + numericUpDown_Visual_Port.Size = new Size(62, 23); + numericUpDown_Visual_Port.TabIndex = 8; + numericUpDown_Visual_Port.Value = new decimal(new int[] { 1002, 0, 0, 0 }); + // + // label_Visual_Port + // + label_Visual_Port.AutoSize = true; + label_Visual_Port.Location = new Point(6, 26); + label_Visual_Port.Name = "label_Visual_Port"; + label_Visual_Port.Size = new Size(32, 15); + label_Visual_Port.TabIndex = 7; + label_Visual_Port.Tag = "#visual_port"; + label_Visual_Port.Text = "Port:"; + // + // groupBox_Clients + // + groupBox_Clients.Controls.Add(numericUpDown_Clients_Limit); + groupBox_Clients.Controls.Add(label_Clients_Limit); + groupBox_Clients.Controls.Add(label_Clients_Num); + groupBox_Clients.Controls.Add(label_Clients_Count); + groupBox_Clients.Controls.Add(button_Client_Start); + groupBox_Clients.Controls.Add(numericUpDown_Clients_Port); + groupBox_Clients.Controls.Add(label_Clients_Port); + groupBox_Clients.Dock = DockStyle.Top; + groupBox_Clients.Location = new Point(3, 3); + groupBox_Clients.Name = "groupBox_Clients"; + groupBox_Clients.Size = new Size(204, 80); + groupBox_Clients.TabIndex = 1; + groupBox_Clients.TabStop = false; + groupBox_Clients.Tag = "#clients"; + groupBox_Clients.Text = "Clients"; + // + // numericUpDown_Clients_Limit + // + numericUpDown_Clients_Limit.Location = new Point(44, 48); + numericUpDown_Clients_Limit.Maximum = new decimal(new int[] { 10, 0, 0, 0 }); + numericUpDown_Clients_Limit.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + numericUpDown_Clients_Limit.Name = "numericUpDown_Clients_Limit"; + numericUpDown_Clients_Limit.Size = new Size(42, 23); + numericUpDown_Clients_Limit.TabIndex = 6; + numericUpDown_Clients_Limit.Value = new decimal(new int[] { 1, 0, 0, 0 }); + // + // label_Clients_Limit + // + label_Clients_Limit.AutoSize = true; + label_Clients_Limit.Location = new Point(6, 50); + label_Clients_Limit.Name = "label_Clients_Limit"; + label_Clients_Limit.Size = new Size(37, 15); + label_Clients_Limit.TabIndex = 5; + label_Clients_Limit.Tag = "#clients_limit"; + label_Clients_Limit.Text = "Limit:"; + // + // label_Clients_Num + // + label_Clients_Num.AutoSize = true; + label_Clients_Num.Location = new Point(161, 50); + label_Clients_Num.Name = "label_Clients_Num"; + label_Clients_Num.Size = new Size(13, 15); + label_Clients_Num.TabIndex = 4; + label_Clients_Num.Text = "0"; + // + // label_Clients_Count + // + label_Clients_Count.AutoSize = true; + label_Clients_Count.Location = new Point(112, 50); + label_Clients_Count.Name = "label_Clients_Count"; + label_Clients_Count.Size = new Size(43, 15); + label_Clients_Count.TabIndex = 3; + label_Clients_Count.Tag = "#clients_count"; + label_Clients_Count.Text = "Count:"; + // + // button_Client_Start + // + button_Client_Start.BackColor = Color.Transparent; + button_Client_Start.Location = new Point(112, 15); + button_Client_Start.Name = "button_Client_Start"; + button_Client_Start.Size = new Size(86, 23); + button_Client_Start.TabIndex = 2; + button_Client_Start.Tag = ""; + button_Client_Start.Text = "Start"; + button_Client_Start.UseVisualStyleBackColor = false; + button_Client_Start.Click += button_Client_Start_Click; + // + // numericUpDown_Clients_Port + // + numericUpDown_Clients_Port.Location = new Point(44, 17); + numericUpDown_Clients_Port.Maximum = new decimal(new int[] { 65000, 0, 0, 0 }); + numericUpDown_Clients_Port.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + numericUpDown_Clients_Port.Name = "numericUpDown_Clients_Port"; + numericUpDown_Clients_Port.Size = new Size(62, 23); + numericUpDown_Clients_Port.TabIndex = 1; + numericUpDown_Clients_Port.Value = new decimal(new int[] { 1001, 0, 0, 0 }); + // + // label_Clients_Port + // + label_Clients_Port.AutoSize = true; + label_Clients_Port.Location = new Point(6, 19); + label_Clients_Port.Name = "label_Clients_Port"; + label_Clients_Port.Size = new Size(32, 15); + label_Clients_Port.TabIndex = 0; + label_Clients_Port.Tag = "#clients_port"; + label_Clients_Port.Text = "Port:"; + // + // tabPage_Model + // + tabPage_Model.Location = new Point(4, 24); + tabPage_Model.Name = "tabPage_Model"; + tabPage_Model.Padding = new Padding(3); + tabPage_Model.Size = new Size(210, 409); + tabPage_Model.TabIndex = 1; + tabPage_Model.Tag = "#model"; + tabPage_Model.Text = "Model"; + tabPage_Model.UseVisualStyleBackColor = true; + // + // tabPage_Area + // + tabPage_Area.Location = new Point(4, 24); + tabPage_Area.Name = "tabPage_Area"; + tabPage_Area.Size = new Size(210, 409); + tabPage_Area.TabIndex = 2; + tabPage_Area.Tag = "#area"; + tabPage_Area.Text = "Area"; + tabPage_Area.UseVisualStyleBackColor = true; + // + // groupBox_Navi + // + groupBox_Navi.Controls.Add(panel1); + groupBox_Navi.Controls.Add(comboBox_Drone); + groupBox_Navi.Dock = DockStyle.Right; + groupBox_Navi.Location = new Point(684, 24); + groupBox_Navi.Name = "groupBox_Navi"; + groupBox_Navi.Size = new Size(200, 437); + groupBox_Navi.TabIndex = 3; + groupBox_Navi.TabStop = false; + groupBox_Navi.Tag = "#navigation"; + groupBox_Navi.Text = "Navigation"; + // + // panel1 + // + panel1.Controls.Add(button_Drone_Color); + panel1.Controls.Add(comboBox_Drone_Rotor); + panel1.Dock = DockStyle.Fill; + panel1.Location = new Point(3, 42); + panel1.Name = "panel1"; + panel1.Size = new Size(194, 392); + panel1.TabIndex = 3; + // + // button_Drone_Color + // + button_Drone_Color.BackColor = Color.Tomato; + button_Drone_Color.Location = new Point(13, 6); + button_Drone_Color.Name = "button_Drone_Color"; + button_Drone_Color.Size = new Size(45, 23); + button_Drone_Color.TabIndex = 1; + button_Drone_Color.UseVisualStyleBackColor = false; + // + // comboBox_Drone_Rotor + // + comboBox_Drone_Rotor.FormattingEnabled = true; + comboBox_Drone_Rotor.Items.AddRange(new object[] { "4-Rotor", "6-Rotor", "8-Rotor" }); + comboBox_Drone_Rotor.Location = new Point(114, 6); + comboBox_Drone_Rotor.Name = "comboBox_Drone_Rotor"; + comboBox_Drone_Rotor.Size = new Size(71, 23); + comboBox_Drone_Rotor.TabIndex = 2; + comboBox_Drone_Rotor.Text = "4-Rotor"; + // + // comboBox_Drone + // + comboBox_Drone.Dock = DockStyle.Top; + comboBox_Drone.FormattingEnabled = true; + comboBox_Drone.Location = new Point(3, 19); + comboBox_Drone.Name = "comboBox_Drone"; + comboBox_Drone.Size = new Size(194, 23); + comboBox_Drone.TabIndex = 0; + // + // timer_Test + // + timer_Test.Enabled = true; + timer_Test.Interval = 10; + timer_Test.Tick += timer_Test_Tick; + // + // Form_Main + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(884, 461); + Controls.Add(groupBox_Screen); + Controls.Add(groupBox_Navi); + Controls.Add(tabControl_Menu); + Controls.Add(menuStrip_Menu); + Icon = (Icon)resources.GetObject("$this.Icon"); + MainMenuStrip = menuStrip_Menu; + MinimumSize = new Size(900, 500); + Name = "Form_Main"; + Text = "Drone Simulator V1.0"; + FormClosing += Form_Main_FormClosing; + menuStrip_Menu.ResumeLayout(false); + menuStrip_Menu.PerformLayout(); + groupBox_Screen.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)pictureBox_2D).EndInit(); + tabControl_Menu.ResumeLayout(false); + tabPage_Main.ResumeLayout(false); + groupBox_Visual.ResumeLayout(false); + groupBox_Visual.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Visual_Port).EndInit(); + groupBox_Clients.ResumeLayout(false); + groupBox_Clients.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Limit).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Port).EndInit(); + groupBox_Navi.ResumeLayout(false); + panel1.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private MenuStrip menuStrip_Menu; + private ToolStripMenuItem fileToolStripMenuItem; + private GroupBox groupBox_Screen; + private TabControl tabControl_Menu; + private TabPage tabPage_Main; + private TabPage tabPage_Model; + private Label label_Clients_Port; + private GroupBox groupBox_Clients; + private NumericUpDown numericUpDown_Clients_Port; + private Label label_Clients_Num; + private Label label_Clients_Count; + private Button button_Client_Start; + private NumericUpDown numericUpDown_Clients_Limit; + private Label label_Clients_Limit; + private GroupBox groupBox_Visual; + private Button button_Visual_Start; + private NumericUpDown numericUpDown_Visual_Port; + private Label label_Visual_Port; + private PictureBox pictureBox_2D; + private GroupBox groupBox_Navi; + private ComboBox comboBox_Drone; + private TabPage tabPage_Area; + private Button button_Drone_Color; + private ComboBox comboBox_Drone_Rotor; + private Panel panel1; + private ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.Timer timer_Test; + } +} diff --git a/DroneSimulator/FormMain.cs b/DroneSimulator/FormMain.cs new file mode 100644 index 0000000..b7926ff --- /dev/null +++ b/DroneSimulator/FormMain.cs @@ -0,0 +1,148 @@ +using System.Text; +using System.Numerics; +using System.Windows.Forms; +using static System.Net.Mime.MediaTypeNames; +using static System.Runtime.InteropServices.JavaScript.JSType; +using System.Security.Policy; + +namespace DroneSimulator +{ + public partial class Form_Main : Form + { + Screen2D screen2D = null; + + NetServerClients netServerClient = new NetServerClients(); + + List AllDrones = new List(); + + public Form_Main() + { + InitializeComponent(); + } + + private void ConnectionCallback(object o) + { + NetServerClients.ConnectData data = (NetServerClients.ConnectData)o; + + Invoke((MethodInvoker)delegate + { + label_Clients_Num.Text = data.Count.ToString(); + }); + + if (data.Connect) + { + Drone drone = new Drone(data.ID); + drone.Create(0.5f, 10.0f); + + screen2D.CreateDrone(Color.Red, data.ID); + + AllDrones.Add(drone); + } + else + { + foreach (Drone drone in AllDrones) + { + if (drone.ID != data.ID) continue; + drone.Close(); + + screen2D.RemoveDrone(data.ID); + + AllDrones.Remove(drone); + break; + } + } + } + + private void ReceiveCallback(object o) + { + NetServerClients.ReceiveData data = (NetServerClients.ReceiveData)o; + + Drone? drone = null; + + foreach (Drone d in AllDrones) + { + if (d.ID != data.ID) continue; + drone = d; + break; + } + + if (drone == null) return; + + Drone.DataIn id = new Drone.DataIn(); + + id.fromBytes(data.Buffer); + + drone.SetQadroPow(id.MotorUL, id.MotorUR, id.MotorDL, id.MotorDR); + + Drone.DataOut od = new Drone.DataOut(); + + od.AccX= drone.Acc.X; od.AccY= drone.Acc.Y; od.AccZ= drone.Acc.Z; + od.GyrX = drone.Gyr.X; od.GyrY = drone.Gyr.Y; od.GyrZ = drone.Gyr.Z; + od.PosX= drone.PosXYZ.X; od.PosY = drone.PosXYZ.Y; + od.LaserRange = drone.LaserRange; + + data.Client.Send(od.getBytes()); + } + + private void button_Client_Start_Click(object sender, EventArgs e) + { + var done = netServerClient.StartServer((int)numericUpDown_Clients_Port.Value, (int)numericUpDown_Clients_Limit.Value, ConnectionCallback, ReceiveCallback); + switch (done) + { + case NetServerClients.ServerState.Error: + { + MessageBox.Show("Error to start server"); + break; + } + case NetServerClients.ServerState.Start: + { + button_Client_Start.Text = "Stop"; + button_Client_Start.BackColor = Color.LimeGreen; + break; + } + case NetServerClients.ServerState.Stop: + { + button_Client_Start.Text = "Start"; + button_Client_Start.BackColor = Color.Transparent; + break; + } + } + + if (done != NetServerClients.ServerState.Start) return; + + pictureBox_2D.Image = null; + + screen2D = new Screen2D(DrawCallback); + } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + Close(); + } + + private void DrawCallback(Bitmap bmp) + { + Invoke((MethodInvoker)delegate + { + if (pictureBox_2D.Image == null) pictureBox_2D.Image = bmp; + pictureBox_2D.Refresh(); + }); + } + + private void timer_Test_Tick(object sender, EventArgs e) + { + if (screen2D == null) return; + + foreach (Drone d in AllDrones) + { + screen2D.Move(d.ID, d.PosXYZ, d.GetOrientation()); + } + + screen2D.DrawScene(); + } + private void Form_Main_FormClosing(object sender, FormClosingEventArgs e) + { + foreach (Drone d in AllDrones) d.Close(); + } + } +} diff --git a/DroneSimulator/FormMain.resx b/DroneSimulator/FormMain.resx new file mode 100644 index 0000000..8f19afc --- /dev/null +++ b/DroneSimulator/FormMain.resx @@ -0,0 +1,383 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 162, 5 + + + 25 + + + + + AAABAAEAAAAAAAEAIAAcOgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAFv + ck5UAc+id5oAADnWSURBVHja7V0HeJRV1v4I6QkpQIDQQgm999576ASpoQUCgiAg0nsHUVCkKh1FpRcF + FQ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YFxhDPTE8WYlr/7eB8o+nXXjJMKwOE3z + TTdOsNo2u0LpFbwQF+/ri22zMBazjIzILhBCmUuwOGYM6mkmi707hB+VZCN4SLM8ItWK7Y7j1TXNVHiE + kYHABBxPxyT+UzP5byN5KLMNYA+A1+WndPDNMY1bhPsMkPb5vGaQJqyz6iMbL1Hj8M3sCJzZnxB0xskj + AXhssea5NHGGi/BXGnmJ2pr9kGZiUSASPuivNFMDySGaqbYgI3sDAV8wtr6teOMXGwsFeOmqWmTqahzu + 69PwU4LdSFCyZurcMlUz+dix2sMizZVbGGkBnoDnpbvilamKdwZppoSl/Jr3IhcZDAaDwWAwGAwGg8Fg + MBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwG + g8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAw + GAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPByIb4f3Ur + IFqna2MAAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/DroneSimulator/NetServerClients.cs b/DroneSimulator/NetServerClients.cs new file mode 100644 index 0000000..d8ebdce --- /dev/null +++ b/DroneSimulator/NetServerClients.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net.Sockets; +using System.Net; + +namespace DroneSimulator +{ + internal class NetServerClients + { + public class ConnectData + { + public int ID; + public bool Connect; + public int Count; + + public Socket? Client; + } + + public class ReceiveData + { + public int ID; + public byte[]? Buffer; + public int Size; + + public Socket? Client; + } + + private class ClientData + { + public int ID; + public Socket? workSocket = null; + public const int BufferSize = 1024; + public byte[] buffer = new byte[BufferSize]; + } + + private int SocketID = 0; + private int SocketLimit; + private Socket? ServerSocket = null; + private List ClientSockets = new List(); + + public delegate void ServerCallback(object o); + + private ServerCallback? ConnectionCallback; + private ServerCallback? ReceiveCallback; + + public enum ServerState { Error, Start, Stop }; + + public ServerState StartServer(int Port, int Limit, ServerCallback Connection, ServerCallback Receive) + { + if (ServerSocket != null) + { + ServerSocket.Close(); + foreach (ClientData c in ClientSockets) { c.workSocket?.Shutdown(SocketShutdown.Both); c.workSocket?.Close(); } + return ServerState.Stop; + } + + ConnectionCallback = Connection; + ReceiveCallback = Receive; + + SocketLimit = Limit; + + IPEndPoint ip = new(IPAddress.Any, Port); + ServerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + + try + { + ServerSocket.Bind(ip); + ServerSocket.Listen(10); + ServerSocket.BeginAccept(new AsyncCallback(AcceptCallback), ServerSocket); + } + catch { ServerSocket.Close(); ServerSocket = null; return ServerState.Error; } + + return ServerState.Start; + } + + public void AcceptCallback(IAsyncResult ar) + { + Socket listener = (Socket)ar.AsyncState; + if (listener == null) return; + + Socket handler; + + try { handler = listener.EndAccept(ar); } + catch{ ServerSocket?.Close(); ServerSocket = null; return; } + + if (SocketLimit > ClientSockets.Count) + { + ClientData clientData = new ClientData(); + + clientData.ID = ++SocketID; + + clientData.workSocket = handler; + + ClientSockets.Add(clientData); + + ConnectionCallback(new ConnectData { ID = clientData.ID, Connect = true, Count = ClientSockets.Count, Client = handler }); + + handler.BeginReceive(clientData.buffer, 0, ClientData.BufferSize, 0, new AsyncCallback(ReadCallback), clientData); + } + else handler.Close(); + + listener.BeginAccept(new AsyncCallback(AcceptCallback), listener); + } + + public void ReadCallback(IAsyncResult ar) + { + ClientData cd = (ClientData)ar.AsyncState; + if (cd == null) return; + + int bytes = 0; + try { bytes = cd.workSocket.EndReceive(ar); } + catch { } + + if (bytes == 0) + { + cd.workSocket?.Close(); + + ClientSockets.Remove(cd); + + ConnectionCallback(new ConnectData { ID = cd.ID, Connect = false, Count = ClientSockets.Count, Client = null }); + + return; + } + + ReceiveCallback(new ReceiveData { ID = cd.ID, Buffer = cd.buffer, Size = bytes, Client = cd.workSocket }); + + cd.workSocket?.BeginReceive(cd.buffer, 0, ClientData.BufferSize, 0, new AsyncCallback(ReadCallback), cd); + } + } +} diff --git a/DroneSimulator/Program.cs b/DroneSimulator/Program.cs new file mode 100644 index 0000000..efb14d6 --- /dev/null +++ b/DroneSimulator/Program.cs @@ -0,0 +1,17 @@ +namespace DroneSimulator +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new Form_Main()); + } + } +} \ No newline at end of file diff --git a/DroneSimulator/Screen2D.cs b/DroneSimulator/Screen2D.cs new file mode 100644 index 0000000..f8f3854 --- /dev/null +++ b/DroneSimulator/Screen2D.cs @@ -0,0 +1,186 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; +using System.Reflection.Metadata; +using System.Text; +using System.Threading.Tasks; + +namespace DroneSimulator +{ + internal class Screen2D + { + + public delegate void DrawCallback(Bitmap bmp); + + public Screen2D(DrawCallback callback) + { + drawCallback = callback; + } + + private class DroneInfo + { + public int ID; + public Color RGB; + public Bitmap? Drone; + public Point PosXY; + public int Height = 0; + + public PointF TiltXY = new Point(0, 0); + public int Azimuth = 0; + } + + private DrawCallback drawCallback; + private Bitmap MainArea = new Bitmap(4096, 2560); + private List DroneList = new List(); + + public static Bitmap DrawQadro(Color ColorFill) + { + Bitmap drone = new Bitmap(130, 130); + + using (Graphics g = Graphics.FromImage(drone)) + { + g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighSpeed; + + SolidBrush solidBrush = new SolidBrush(ColorFill); + + Point[] mid = { new Point(35, 65), new Point(70, 40), new Point(70, 90) }; + g.FillPolygon(solidBrush, mid); + + g.FillEllipse(solidBrush, new Rectangle(15, 15, 35, 35)); + g.FillEllipse(solidBrush, new Rectangle(15, 80, 35, 35)); + g.FillEllipse(solidBrush, new Rectangle(80, 80, 35, 35)); + g.FillEllipse(solidBrush, new Rectangle(80, 15, 35, 35)); + + g.FillRectangle(solidBrush, new Rectangle(50, 60, 50, 10)); + + g.DrawEllipse(new Pen(ColorFill), new Rectangle(0, 0, 129, 129)); + + solidBrush.Dispose(); + } + + return RotateImage(drone, 90); + } + + private static Bitmap RotateImage(Bitmap bmp, float angle) + { + Bitmap rotatedImage = new Bitmap(bmp.Width, bmp.Height); + + using (Graphics g = Graphics.FromImage(rotatedImage)) + { + // Set the rotation point to the center in the matrix + g.TranslateTransform(bmp.Width / 2, bmp.Height / 2); + // Rotate + g.RotateTransform(angle); + // Restore rotation point in the matrix + g.TranslateTransform(-bmp.Width / 2, -bmp.Height / 2); + // Draw the image on the bitmap + g.DrawImage(bmp, new Point(0, 0)); + } + + return rotatedImage; + } + + public void CreateDrone(Color ColorFill, int ID) + { + DroneInfo info = new DroneInfo(); + info.ID = ID; + info.RGB = ColorFill; + info.Drone = DrawQadro(ColorFill); + + DroneList.Add(info); + } + + public void RemoveDrone(int ID) + { + foreach (DroneInfo i in DroneList) + { + if (i.ID != ID) continue; + DroneList.Remove(i); + break; + } + } + + public void DrawScene() + { + using (Graphics g = Graphics.FromImage(MainArea)) + { + g.Clear(Color.Gainsboro); + SolidBrush shadowBrush = new SolidBrush(Color.Black); + g.DrawRectangle(new Pen(Color.Black), new Rectangle { Width = MainArea.Width - 1, Height = MainArea.Height - 1 }); + + foreach (var d in DroneList) + { + if (d.Azimuth >= 360) d.Azimuth -= 360; + var bmp = RotateImage(d.Drone, d.Azimuth); + + g.FillEllipse(new SolidBrush(Color.FromArgb(50, d.RGB)), d.PosXY.X + d.Height, d.PosXY.Y + d.Height, 130, 130); + + g.DrawLine(new Pen(Color.Black), new Point(d.PosXY.X + d.Drone.Width / 2, d.PosXY.Y + d.Drone.Height / 2), new Point(d.PosXY.X + d.Height + d.Drone.Width / 2, d.PosXY.Y + d.Height + d.Drone.Height / 2)); + + //g.DrawImage(bmp, new Rectangle(d.PosXY.X+32, d.PosXY.Y, 65, 130)); + + float x1 = 0, y1 = 0; + float x2 = 130, y2 = 0; + float x3 = 0, y3 = 130; + + const float TO_RADI = MathF.PI / 180; + + Quaternion tilt = new Quaternion(d.TiltXY.X, d.TiltXY.Y, 0, 0); + Quaternion rotate = Quaternion.CreateFromAxisAngle(new Vector3(0, 0, 1), d.Azimuth * TO_RADI); + + tilt = tilt * rotate * rotate; + + if (tilt.Y > 0) + { + x1 = (int)(Math.Sin(tilt.Y) * 130); + x3 = (int)(Math.Sin(tilt.Y) * 130); + } + else + { + x2 = (int)(Math.Cos(tilt.Y) * 130); + } + + if (tilt.X > 0) + { + y1 = (int)(Math.Sin(tilt.X) * 130); + y2 = (int)(Math.Sin(tilt.X) * 130); + } + else + { + y3 = (int)(Math.Cos(tilt.X) * 130); + } + + PointF ul = new PointF(d.PosXY.X + x1, d.PosXY.Y + y1); PointF ur = new PointF(d.PosXY.X + x2, d.PosXY.Y + y2); + PointF dl = new PointF(d.PosXY.X + x3, d.PosXY.Y + y3); + PointF[] dest = { ul, ur, dl }; + + g.DrawImage(bmp, dest); + } + } + + drawCallback(MainArea); + } + + public void Move(int id, Vector3 pos, Vector4 tilt) + { + const float TO_GRAD = 180 / MathF.PI; + const float TO_RADI = MathF.PI / 180; + + foreach (var d in DroneList) + { + if (d.ID != id) continue; + + d.PosXY.X = (int)pos.X; + d.PosXY.Y = MainArea.Height - (int)pos.Y; + d.Height = (int)pos.Z; + + d.TiltXY.X = tilt.X * TO_RADI; + d.TiltXY.Y = tilt.Y * TO_RADI; + d.Azimuth = (int)tilt.Z; + + break; + } + } + } +} diff --git a/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.deps.json b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.deps.json new file mode 100644 index 0000000..fbaa818 --- /dev/null +++ b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": { + "DroneSimulator/1.0.0": { + "runtime": { + "DroneSimulator.dll": {} + } + } + } + }, + "libraries": { + "DroneSimulator/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.dll b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.dll new file mode 100644 index 0000000..d16af7e Binary files /dev/null and b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.dll differ diff --git a/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.exe b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.exe new file mode 100644 index 0000000..4233390 Binary files /dev/null and b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.exe differ diff --git a/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.pdb b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.pdb new file mode 100644 index 0000000..6417c5e Binary files /dev/null and b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.pdb differ diff --git a/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.runtimeconfig.json b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.runtimeconfig.json new file mode 100644 index 0000000..68ec4b9 --- /dev/null +++ b/DroneSimulator/bin/Debug/net9.0-windows/DroneSimulator.runtimeconfig.json @@ -0,0 +1,19 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "9.0.0" + } + ], + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false, + "CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false + } + } +} \ No newline at end of file diff --git a/DroneSimulator/icon.ico b/DroneSimulator/icon.ico new file mode 100644 index 0000000..26b62ee Binary files /dev/null and b/DroneSimulator/icon.ico differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs b/DroneSimulator/obj/Debug/net9.0-windows/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs new file mode 100644 index 0000000..feda5e9 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfo.cs b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfo.cs new file mode 100644 index 0000000..a494b3c --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfo.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("DroneSimulator")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("DroneSimulator")] +[assembly: System.Reflection.AssemblyTitleAttribute("DroneSimulator")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] +[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")] +[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")] + +// Создано классом WriteCodeFragment MSBuild. + diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfoInputs.cache b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfoInputs.cache new file mode 100644 index 0000000..ac31a13 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +7f461f329c2aabe3c068a957f4f02cdcdb168c359c556cd0c46598798ec3c65d diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.Form_Main.resources b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.Form_Main.resources new file mode 100644 index 0000000..9a5a677 Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.Form_Main.resources differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..62904fc --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,22 @@ +is_global = true +build_property.ApplicationManifest = +build_property.StartupObject = +build_property.ApplicationDefaultFont = +build_property.ApplicationHighDpiMode = +build_property.ApplicationUseCompatibleTextRendering = +build_property.ApplicationVisualStyles = +build_property.TargetFramework = net9.0-windows +build_property.TargetPlatformMinVersion = 7.0 +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = DroneSimulator +build_property.ProjectDir = D:\CPL\Simulator\DroneSimulator\DroneSimulator\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.CsWinRTUseWindowsUIXamlProjections = false +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.GlobalUsings.g.cs b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.GlobalUsings.g.cs new file mode 100644 index 0000000..84bbb89 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.GlobalUsings.g.cs @@ -0,0 +1,10 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.Drawing; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; +global using global::System.Windows.Forms; diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.assets.cache b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.assets.cache new file mode 100644 index 0000000..c6f44be Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.assets.cache differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.BuildWithSkipAnalyzers b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.BuildWithSkipAnalyzers new file mode 100644 index 0000000..e69de29 diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.CoreCompileInputs.cache b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..50ef240 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +051ffb89f1ee627ab3b9aaef920afd665a18f0f3c3fe82852812d5c6608dcb30 diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.FileListAbsolute.txt b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..c46d5df --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.FileListAbsolute.txt @@ -0,0 +1,48 @@ +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.exe +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.deps.json +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.runtimeconfig.json +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.dll +R:\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.pdb +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.Form1.resources +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.GenerateResource.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfoInputs.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfo.cs +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.CoreCompileInputs.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.dll +R:\DroneSimulator\obj\Debug\net9.0-windows\refint\DroneSimulator.dll +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.pdb +R:\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.genruntimeconfig.cache +R:\DroneSimulator\obj\Debug\net9.0-windows\ref\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.exe +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.deps.json +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.runtimeconfig.json +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.pdb +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.GenerateResource.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfoInputs.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfo.cs +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.CoreCompileInputs.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\refint\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.pdb +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.genruntimeconfig.cache +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\ref\DroneSimulator.dll +D:\Files\Main\Projects\Fly\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.Form_Main.resources +D:\CPL\Simulator\DroneSimulator\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.exe +D:\CPL\Simulator\DroneSimulator\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.deps.json +D:\CPL\Simulator\DroneSimulator\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.runtimeconfig.json +D:\CPL\Simulator\DroneSimulator\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.dll +D:\CPL\Simulator\DroneSimulator\DroneSimulator\bin\Debug\net9.0-windows\DroneSimulator.pdb +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.Form_Main.resources +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.GenerateResource.cache +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.GeneratedMSBuildEditorConfig.editorconfig +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfoInputs.cache +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.AssemblyInfo.cs +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.csproj.CoreCompileInputs.cache +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.dll +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\refint\DroneSimulator.dll +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.pdb +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\DroneSimulator.genruntimeconfig.cache +D:\CPL\Simulator\DroneSimulator\DroneSimulator\obj\Debug\net9.0-windows\ref\DroneSimulator.dll diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.GenerateResource.cache b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.GenerateResource.cache new file mode 100644 index 0000000..7c21443 Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.csproj.GenerateResource.cache differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.designer.deps.json b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.designer.deps.json new file mode 100644 index 0000000..360ddb4 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.designer.deps.json @@ -0,0 +1,11 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": {} + }, + "libraries": {} +} \ No newline at end of file diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.designer.runtimeconfig.json b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.designer.runtimeconfig.json new file mode 100644 index 0000000..62eff55 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.designer.runtimeconfig.json @@ -0,0 +1,25 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "frameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + { + "name": "Microsoft.WindowsDesktop.App", + "version": "9.0.0" + } + ], + "additionalProbingPaths": [ + "C:\\Users\\USER\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\USER\\.nuget\\packages", + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false, + "CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false, + "Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true + } + } +} \ No newline at end of file diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.dll b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.dll new file mode 100644 index 0000000..d16af7e Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.dll differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.genruntimeconfig.cache b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.genruntimeconfig.cache new file mode 100644 index 0000000..fc5d767 --- /dev/null +++ b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.genruntimeconfig.cache @@ -0,0 +1 @@ +77eb2f8d5fd7b96d896def58f5f04d71ddf79c26314f987f4254b0ca5d5a8991 diff --git a/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.pdb b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.pdb new file mode 100644 index 0000000..6417c5e Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/DroneSimulator.pdb differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/apphost.exe b/DroneSimulator/obj/Debug/net9.0-windows/apphost.exe new file mode 100644 index 0000000..4233390 Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/apphost.exe differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/ref/DroneSimulator.dll b/DroneSimulator/obj/Debug/net9.0-windows/ref/DroneSimulator.dll new file mode 100644 index 0000000..5adc0ee Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/ref/DroneSimulator.dll differ diff --git a/DroneSimulator/obj/Debug/net9.0-windows/refint/DroneSimulator.dll b/DroneSimulator/obj/Debug/net9.0-windows/refint/DroneSimulator.dll new file mode 100644 index 0000000..5adc0ee Binary files /dev/null and b/DroneSimulator/obj/Debug/net9.0-windows/refint/DroneSimulator.dll differ diff --git a/DroneSimulator/obj/DroneSimulator.csproj.nuget.dgspec.json b/DroneSimulator/obj/DroneSimulator.csproj.nuget.dgspec.json new file mode 100644 index 0000000..51e9e8d --- /dev/null +++ b/DroneSimulator/obj/DroneSimulator.csproj.nuget.dgspec.json @@ -0,0 +1,76 @@ +{ + "format": 1, + "restore": { + "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj": {} + }, + "projects": { + "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj", + "projectName": "DroneSimulator", + "projectPath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj", + "packagesPath": "C:\\Users\\Дана\\.nuget\\packages\\", + "outputPath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\Дана\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0-windows" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.200" + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/DroneSimulator/obj/DroneSimulator.csproj.nuget.g.props b/DroneSimulator/obj/DroneSimulator.csproj.nuget.g.props new file mode 100644 index 0000000..02c5408 --- /dev/null +++ b/DroneSimulator/obj/DroneSimulator.csproj.nuget.g.props @@ -0,0 +1,16 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\Дана\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.13.2 + + + + + + \ No newline at end of file diff --git a/DroneSimulator/obj/DroneSimulator.csproj.nuget.g.targets b/DroneSimulator/obj/DroneSimulator.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/DroneSimulator/obj/DroneSimulator.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/DroneSimulator/obj/project.assets.json b/DroneSimulator/obj/project.assets.json new file mode 100644 index 0000000..54aadae --- /dev/null +++ b/DroneSimulator/obj/project.assets.json @@ -0,0 +1,82 @@ +{ + "version": 3, + "targets": { + "net9.0-windows7.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net9.0-windows7.0": [] + }, + "packageFolders": { + "C:\\Users\\Дана\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj", + "projectName": "DroneSimulator", + "projectPath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj", + "packagesPath": "C:\\Users\\Дана\\.nuget\\packages\\", + "outputPath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\Дана\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net9.0-windows" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.200" + }, + "frameworks": { + "net9.0-windows7.0": { + "targetAlias": "net9.0-windows", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + }, + "Microsoft.WindowsDesktop.App.WindowsForms": { + "privateAssets": "none" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/DroneSimulator/obj/project.nuget.cache b/DroneSimulator/obj/project.nuget.cache new file mode 100644 index 0000000..f08d225 --- /dev/null +++ b/DroneSimulator/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "PBD6ejBWMGo=", + "success": true, + "projectFilePath": "D:\\CPL\\Simulator\\DroneSimulator\\DroneSimulator\\DroneSimulator.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file