create repository
This commit is contained in:
BIN
DroneClient/.vs/DroneClient/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
DroneClient/.vs/DroneClient/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
BIN
DroneClient/.vs/DroneClient/v17/.futdcache.v2
Normal file
BIN
DroneClient/.vs/DroneClient/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
DroneClient/.vs/DroneClient/v17/.suo
Normal file
BIN
DroneClient/.vs/DroneClient/v17/.suo
Normal file
Binary file not shown.
12
DroneClient/.vs/DroneClient/v17/DocumentLayout.backup.json
Normal file
12
DroneClient/.vs/DroneClient/v17/DocumentLayout.backup.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\",
|
||||
"Documents": [],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": []
|
||||
}
|
||||
]
|
||||
}
|
53
DroneClient/.vs/DroneClient/v17/DocumentLayout.json
Normal file
53
DroneClient/.vs/DroneClient/v17/DocumentLayout.json
Normal file
@ -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]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
BIN
DroneClient/.vs/ProjectEvaluation/droneclient.metadata.v9.bin
Normal file
BIN
DroneClient/.vs/ProjectEvaluation/droneclient.metadata.v9.bin
Normal file
Binary file not shown.
BIN
DroneClient/.vs/ProjectEvaluation/droneclient.projects.v9.bin
Normal file
BIN
DroneClient/.vs/ProjectEvaluation/droneclient.projects.v9.bin
Normal file
Binary file not shown.
BIN
DroneClient/.vs/ProjectEvaluation/droneclient.strings.v9.bin
Normal file
BIN
DroneClient/.vs/ProjectEvaluation/droneclient.strings.v9.bin
Normal file
Binary file not shown.
67
DroneClient/Drone.cs
Normal file
67
DroneClient/Drone.cs
Normal file
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
11
DroneClient/DroneClient.csproj
Normal file
11
DroneClient/DroneClient.csproj
Normal file
@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
8
DroneClient/DroneClient.csproj.user
Normal file
8
DroneClient/DroneClient.csproj.user
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Compile Update="FormMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
25
DroneClient/DroneClient.sln
Normal file
25
DroneClient/DroneClient.sln
Normal file
@ -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
|
513
DroneClient/FormMain.Designer.cs
generated
Normal file
513
DroneClient/FormMain.Designer.cs
generated
Normal file
@ -0,0 +1,513 @@
|
||||
namespace DroneSimulator
|
||||
{
|
||||
partial class Form_Main
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
154
DroneClient/FormMain.cs
Normal file
154
DroneClient/FormMain.cs
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
126
DroneClient/FormMain.resx
Normal file
126
DroneClient/FormMain.resx
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer_Test.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>162, 5</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
</root>
|
104
DroneClient/NetClient.cs
Normal file
104
DroneClient/NetClient.cs
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
17
DroneClient/Program.cs
Normal file
17
DroneClient/Program.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace DroneSimulator
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[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());
|
||||
}
|
||||
}
|
||||
}
|
23
DroneClient/bin/Debug/net9.0-windows/DroneClient.deps.json
Normal file
23
DroneClient/bin/Debug/net9.0-windows/DroneClient.deps.json
Normal file
@ -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": ""
|
||||
}
|
||||
}
|
||||
}
|
BIN
DroneClient/bin/Debug/net9.0-windows/DroneClient.dll
Normal file
BIN
DroneClient/bin/Debug/net9.0-windows/DroneClient.dll
Normal file
Binary file not shown.
BIN
DroneClient/bin/Debug/net9.0-windows/DroneClient.exe
Normal file
BIN
DroneClient/bin/Debug/net9.0-windows/DroneClient.exe
Normal file
Binary file not shown.
BIN
DroneClient/bin/Debug/net9.0-windows/DroneClient.pdb
Normal file
BIN
DroneClient/bin/Debug/net9.0-windows/DroneClient.pdb
Normal file
Binary file not shown.
@ -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
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
|
@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Этот код создан программой.
|
||||
// Исполняемая версия:4.0.30319.42000
|
||||
//
|
||||
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
// повторной генерации кода.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
@ -0,0 +1 @@
|
||||
372de9fd6d36597e50cdb2250f48b9cb0d5e8e1a2d1e568b83e287afe9580301
|
@ -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 =
|
@ -0,0 +1,10 @@
|
||||
// <auto-generated/>
|
||||
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;
|
BIN
DroneClient/obj/Debug/net9.0-windows/DroneClient.assets.cache
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/DroneClient.assets.cache
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
01e86f1c7bc139724ab77bc57845e8da30f3f593b41b11317ce8867d8fb43c28
|
@ -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
|
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v9.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v9.0": {}
|
||||
},
|
||||
"libraries": {}
|
||||
}
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
BIN
DroneClient/obj/Debug/net9.0-windows/DroneClient.dll
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/DroneClient.dll
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
812e26f7e032de5fb2d5301fec24f483552f39e0a38ac0c052cba2ffa3a73bbd
|
BIN
DroneClient/obj/Debug/net9.0-windows/DroneClient.pdb
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/DroneClient.pdb
Normal file
Binary file not shown.
@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
@ -0,0 +1 @@
|
||||
7f461f329c2aabe3c068a957f4f02cdcdb168c359c556cd0c46598798ec3c65d
|
Binary file not shown.
@ -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 =
|
@ -0,0 +1,10 @@
|
||||
// <auto-generated/>
|
||||
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;
|
BIN
DroneClient/obj/Debug/net9.0-windows/DroneSimulator.assets.cache
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/DroneSimulator.assets.cache
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
051ffb89f1ee627ab3b9aaef920afd665a18f0f3c3fe82852812d5c6608dcb30
|
@ -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
|
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v9.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v9.0": {}
|
||||
},
|
||||
"libraries": {}
|
||||
}
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
BIN
DroneClient/obj/Debug/net9.0-windows/DroneSimulator.dll
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/DroneSimulator.dll
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
42c9c47684404b6458665b5db1d77e8e1563e0e910b9607df810cd1011407bfc
|
BIN
DroneClient/obj/Debug/net9.0-windows/DroneSimulator.pdb
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/DroneSimulator.pdb
Normal file
Binary file not shown.
BIN
DroneClient/obj/Debug/net9.0-windows/apphost.exe
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/apphost.exe
Normal file
Binary file not shown.
BIN
DroneClient/obj/Debug/net9.0-windows/ref/DroneClient.dll
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/ref/DroneClient.dll
Normal file
Binary file not shown.
BIN
DroneClient/obj/Debug/net9.0-windows/ref/DroneSimulator.dll
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/ref/DroneSimulator.dll
Normal file
Binary file not shown.
BIN
DroneClient/obj/Debug/net9.0-windows/refint/DroneClient.dll
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/refint/DroneClient.dll
Normal file
Binary file not shown.
BIN
DroneClient/obj/Debug/net9.0-windows/refint/DroneSimulator.dll
Normal file
BIN
DroneClient/obj/Debug/net9.0-windows/refint/DroneSimulator.dll
Normal file
Binary file not shown.
76
DroneClient/obj/DroneClient.csproj.nuget.dgspec.json
Normal file
76
DroneClient/obj/DroneClient.csproj.nuget.dgspec.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
DroneClient/obj/DroneClient.csproj.nuget.g.props
Normal file
16
DroneClient/obj/DroneClient.csproj.nuget.g.props
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Дана\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\Дана\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
2
DroneClient/obj/DroneClient.csproj.nuget.g.targets
Normal file
2
DroneClient/obj/DroneClient.csproj.nuget.g.targets
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
76
DroneClient/obj/DroneSimulator.csproj.nuget.dgspec.json
Normal file
76
DroneClient/obj/DroneSimulator.csproj.nuget.dgspec.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
DroneClient/obj/DroneSimulator.csproj.nuget.g.props
Normal file
16
DroneClient/obj/DroneSimulator.csproj.nuget.g.props
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\USER\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\USER\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
2
DroneClient/obj/DroneSimulator.csproj.nuget.g.targets
Normal file
2
DroneClient/obj/DroneSimulator.csproj.nuget.g.targets
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
82
DroneClient/obj/project.assets.json
Normal file
82
DroneClient/obj/project.assets.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
DroneClient/obj/project.nuget.cache
Normal file
8
DroneClient/obj/project.nuget.cache
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "ddOSNwF62rQ=",
|
||||
"success": true,
|
||||
"projectFilePath": "D:\\CPL\\Simulator\\DroneClient\\DroneClient\\DroneClient.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
Reference in New Issue
Block a user