diff --git a/DroneSimulator/FormMain.Designer.cs b/DroneSimulator/FormMain.Designer.cs
index 481fdfd..7e7efed 100644
--- a/DroneSimulator/FormMain.Designer.cs
+++ b/DroneSimulator/FormMain.Designer.cs
@@ -20,820 +20,864 @@
base.Dispose(disposing);
}
- #region Windows Form Designer generated code
+ #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();
- numericUpDown_Visual_Limit = new NumericUpDown();
- label1 = new Label();
- label_Visual_Num = new Label();
- label3 = new Label();
- 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);
- textBox_GPS_Lat = new TextBox();
- label2 = new Label();
- groupBox_GPS = new GroupBox();
- textBox_GPS_Lon = new TextBox();
- label4 = new Label();
- numericUpDown_GPS_Freq = new NumericUpDown();
- label_GPS_Frequency = new Label();
- label6 = new Label();
- groupBox_Barometer = new GroupBox();
- numericUpDown_Bar_Freq = new NumericUpDown();
- label5 = new Label();
- label7 = new Label();
- label8 = new Label();
- numericUpDown_Bar_Accur = new NumericUpDown();
- label9 = new Label();
- label10 = new Label();
- textBox_GPS_Accur = new NumericUpDown();
- label11 = new Label();
- groupBox1 = new GroupBox();
- label12 = new Label();
- numericUpDown_OF_Accur = new NumericUpDown();
- label13 = new Label();
- numericUpDown_OF_Freq = new NumericUpDown();
- label14 = new Label();
- label15 = new Label();
- checkBox_GPS_Enable = new CheckBox();
- label16 = new Label();
- numericUpDown1 = new NumericUpDown();
- label17 = new Label();
- checkBox_OF_Enable = new CheckBox();
- checkBox_Bar_Enable = new CheckBox();
- 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_Limit).BeginInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Visual_Port).BeginInit();
- groupBox_Clients.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Limit).BeginInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Port).BeginInit();
- tabPage_Model.SuspendLayout();
- groupBox_Navi.SuspendLayout();
- panel1.SuspendLayout();
- groupBox_GPS.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_GPS_Freq).BeginInit();
- groupBox_Barometer.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Freq).BeginInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Accur).BeginInit();
- ((System.ComponentModel.ISupportInitialize)textBox_GPS_Accur).BeginInit();
- groupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Accur).BeginInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Freq).BeginInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
- 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(numericUpDown_Visual_Limit);
- groupBox_Visual.Controls.Add(label1);
- groupBox_Visual.Controls.Add(label_Visual_Num);
- groupBox_Visual.Controls.Add(label3);
- 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, 91);
- groupBox_Visual.TabIndex = 2;
- groupBox_Visual.TabStop = false;
- groupBox_Visual.Tag = "#visual";
- groupBox_Visual.Text = "Visual";
- //
- // numericUpDown_Visual_Limit
- //
- numericUpDown_Visual_Limit.Location = new Point(44, 57);
- numericUpDown_Visual_Limit.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
- numericUpDown_Visual_Limit.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
- numericUpDown_Visual_Limit.Name = "numericUpDown_Visual_Limit";
- numericUpDown_Visual_Limit.Size = new Size(42, 23);
- numericUpDown_Visual_Limit.TabIndex = 13;
- numericUpDown_Visual_Limit.Value = new decimal(new int[] { 1, 0, 0, 0 });
- //
- // label1
- //
- label1.AutoSize = true;
- label1.Location = new Point(6, 59);
- label1.Name = "label1";
- label1.Size = new Size(37, 15);
- label1.TabIndex = 12;
- label1.Tag = "#clients_limit";
- label1.Text = "Limit:";
- //
- // label_Visual_Num
- //
- label_Visual_Num.AutoSize = true;
- label_Visual_Num.Location = new Point(161, 59);
- label_Visual_Num.Name = "label_Visual_Num";
- label_Visual_Num.Size = new Size(13, 15);
- label_Visual_Num.TabIndex = 11;
- label_Visual_Num.Text = "0";
- //
- // label3
- //
- label3.AutoSize = true;
- label3.Location = new Point(112, 59);
- label3.Name = "label3";
- label3.Size = new Size(43, 15);
- label3.TabIndex = 10;
- label3.Tag = "#clients_count";
- label3.Text = "Count:";
- //
- // 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;
- button_Visual_Start.Click += button_Visual_Start_Click;
- //
- // 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.Controls.Add(groupBox1);
- tabPage_Model.Controls.Add(groupBox_Barometer);
- tabPage_Model.Controls.Add(groupBox_GPS);
- 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;
- //
- // textBox_GPS_Lat
- //
- textBox_GPS_Lat.Location = new Point(37, 22);
- textBox_GPS_Lat.Name = "textBox_GPS_Lat";
- textBox_GPS_Lat.Size = new Size(92, 23);
- textBox_GPS_Lat.TabIndex = 0;
- textBox_GPS_Lat.Text = "47.2125649";
- //
- // label2
- //
- label2.AutoSize = true;
- label2.Location = new Point(5, 25);
- label2.Name = "label2";
- label2.Size = new Size(26, 15);
- label2.TabIndex = 1;
- label2.Text = "Lat:";
- //
- // groupBox_GPS
- //
- groupBox_GPS.Controls.Add(checkBox_GPS_Enable);
- groupBox_GPS.Controls.Add(label10);
- groupBox_GPS.Controls.Add(textBox_GPS_Accur);
- groupBox_GPS.Controls.Add(label11);
- groupBox_GPS.Controls.Add(numericUpDown_GPS_Freq);
- groupBox_GPS.Controls.Add(label6);
- groupBox_GPS.Controls.Add(label_GPS_Frequency);
- groupBox_GPS.Controls.Add(label4);
- groupBox_GPS.Controls.Add(textBox_GPS_Lon);
- groupBox_GPS.Controls.Add(label2);
- groupBox_GPS.Controls.Add(textBox_GPS_Lat);
- groupBox_GPS.Dock = DockStyle.Top;
- groupBox_GPS.Enabled = false;
- groupBox_GPS.Location = new Point(3, 3);
- groupBox_GPS.Name = "groupBox_GPS";
- groupBox_GPS.Size = new Size(204, 112);
- groupBox_GPS.TabIndex = 2;
- groupBox_GPS.TabStop = false;
- groupBox_GPS.Text = "GPS";
- //
- // textBox_GPS_Lon
- //
- textBox_GPS_Lon.Location = new Point(37, 51);
- textBox_GPS_Lon.Name = "textBox_GPS_Lon";
- textBox_GPS_Lon.Size = new Size(92, 23);
- textBox_GPS_Lon.TabIndex = 2;
- textBox_GPS_Lon.Text = "38.9160740";
- //
- // label4
- //
- label4.AutoSize = true;
- label4.Location = new Point(5, 54);
- label4.Name = "label4";
- label4.Size = new Size(30, 15);
- label4.TabIndex = 3;
- label4.Text = "Lon:";
- //
- // numericUpDown_GPS_Freq
- //
- numericUpDown_GPS_Freq.Location = new Point(135, 51);
- numericUpDown_GPS_Freq.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
- numericUpDown_GPS_Freq.Name = "numericUpDown_GPS_Freq";
- numericUpDown_GPS_Freq.Size = new Size(40, 23);
- numericUpDown_GPS_Freq.TabIndex = 4;
- numericUpDown_GPS_Freq.Value = new decimal(new int[] { 10, 0, 0, 0 });
- //
- // label_GPS_Frequency
- //
- label_GPS_Frequency.AutoSize = true;
- label_GPS_Frequency.Location = new Point(135, 25);
- label_GPS_Frequency.Name = "label_GPS_Frequency";
- label_GPS_Frequency.Size = new Size(62, 15);
- label_GPS_Frequency.TabIndex = 5;
- label_GPS_Frequency.Tag = "#frequency";
- label_GPS_Frequency.Text = "Frequency";
- //
- // label6
- //
- label6.AutoSize = true;
- label6.Location = new Point(176, 54);
- label6.Name = "label6";
- label6.Size = new Size(21, 15);
- label6.TabIndex = 6;
- label6.Text = "Hz";
- //
- // groupBox_Barometer
- //
- groupBox_Barometer.Controls.Add(checkBox_Bar_Enable);
- groupBox_Barometer.Controls.Add(label9);
- groupBox_Barometer.Controls.Add(numericUpDown_Bar_Accur);
- groupBox_Barometer.Controls.Add(label8);
- groupBox_Barometer.Controls.Add(numericUpDown_Bar_Freq);
- groupBox_Barometer.Controls.Add(label5);
- groupBox_Barometer.Controls.Add(label7);
- groupBox_Barometer.Dock = DockStyle.Top;
- groupBox_Barometer.Location = new Point(3, 115);
- groupBox_Barometer.Name = "groupBox_Barometer";
- groupBox_Barometer.Size = new Size(204, 88);
- groupBox_Barometer.TabIndex = 3;
- groupBox_Barometer.TabStop = false;
- groupBox_Barometer.Tag = "#barometer";
- groupBox_Barometer.Text = "Barometer";
- //
- // numericUpDown_Bar_Freq
- //
- numericUpDown_Bar_Freq.Location = new Point(69, 22);
- numericUpDown_Bar_Freq.Maximum = new decimal(new int[] { 200, 0, 0, 0 });
- numericUpDown_Bar_Freq.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
- numericUpDown_Bar_Freq.Name = "numericUpDown_Bar_Freq";
- numericUpDown_Bar_Freq.Size = new Size(40, 23);
- numericUpDown_Bar_Freq.TabIndex = 7;
- numericUpDown_Bar_Freq.Value = new decimal(new int[] { 50, 0, 0, 0 });
- //
- // label5
- //
- label5.AutoSize = true;
- label5.Location = new Point(111, 24);
- label5.Name = "label5";
- label5.Size = new Size(21, 15);
- label5.TabIndex = 9;
- label5.Text = "Hz";
- //
- // label7
- //
- label7.AutoSize = true;
- label7.Location = new Point(6, 24);
- label7.Name = "label7";
- label7.Size = new Size(62, 15);
- label7.TabIndex = 8;
- label7.Tag = "#frequency";
- label7.Text = "Frequency";
- //
- // label8
- //
- label8.AutoSize = true;
- label8.Location = new Point(7, 53);
- label8.Name = "label8";
- label8.Size = new Size(56, 15);
- label8.TabIndex = 10;
- label8.Tag = "#accuracy";
- label8.Text = "Accuracy";
- //
- // numericUpDown_Bar_Accur
- //
- numericUpDown_Bar_Accur.DecimalPlaces = 1;
- numericUpDown_Bar_Accur.Location = new Point(69, 51);
- numericUpDown_Bar_Accur.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
- numericUpDown_Bar_Accur.Name = "numericUpDown_Bar_Accur";
- numericUpDown_Bar_Accur.Size = new Size(40, 23);
- numericUpDown_Bar_Accur.TabIndex = 11;
- numericUpDown_Bar_Accur.Value = new decimal(new int[] { 1, 0, 0, 0 });
- //
- // label9
- //
- label9.AutoSize = true;
- label9.Location = new Point(112, 53);
- label9.Name = "label9";
- label9.Size = new Size(20, 15);
- label9.TabIndex = 12;
- label9.Text = "Pa";
- //
- // label10
- //
- label10.AutoSize = true;
- label10.Location = new Point(111, 82);
- label10.Name = "label10";
- label10.Size = new Size(18, 15);
- label10.TabIndex = 15;
- label10.Text = "m";
- //
- // textBox_GPS_Accur
- //
- textBox_GPS_Accur.DecimalPlaces = 1;
- textBox_GPS_Accur.Location = new Point(68, 80);
- textBox_GPS_Accur.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
- textBox_GPS_Accur.Name = "textBox_GPS_Accur";
- textBox_GPS_Accur.Size = new Size(40, 23);
- textBox_GPS_Accur.TabIndex = 14;
- textBox_GPS_Accur.Value = new decimal(new int[] { 1, 0, 0, 0 });
- //
- // label11
- //
- label11.AutoSize = true;
- label11.Location = new Point(6, 82);
- label11.Name = "label11";
- label11.Size = new Size(56, 15);
- label11.TabIndex = 13;
- label11.Tag = "#accuracy";
- label11.Text = "Accuracy";
- //
- // groupBox1
- //
- groupBox1.Controls.Add(checkBox_OF_Enable);
- groupBox1.Controls.Add(label17);
- groupBox1.Controls.Add(numericUpDown1);
- groupBox1.Controls.Add(label16);
- groupBox1.Controls.Add(label12);
- groupBox1.Controls.Add(numericUpDown_OF_Accur);
- groupBox1.Controls.Add(label13);
- groupBox1.Controls.Add(numericUpDown_OF_Freq);
- groupBox1.Controls.Add(label14);
- groupBox1.Controls.Add(label15);
- groupBox1.Dock = DockStyle.Top;
- groupBox1.Enabled = false;
- groupBox1.Location = new Point(3, 203);
- groupBox1.Name = "groupBox1";
- groupBox1.Size = new Size(204, 114);
- groupBox1.TabIndex = 4;
- groupBox1.TabStop = false;
- groupBox1.Text = "Optical flow";
- //
- // label12
- //
- label12.AutoSize = true;
- label12.Location = new Point(111, 53);
- label12.Name = "label12";
- label12.Size = new Size(28, 15);
- label12.TabIndex = 18;
- label12.Text = "Deg";
- //
- // numericUpDown_OF_Accur
- //
- numericUpDown_OF_Accur.DecimalPlaces = 1;
- numericUpDown_OF_Accur.Location = new Point(69, 51);
- numericUpDown_OF_Accur.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
- numericUpDown_OF_Accur.Name = "numericUpDown_OF_Accur";
- numericUpDown_OF_Accur.Size = new Size(40, 23);
- numericUpDown_OF_Accur.TabIndex = 17;
- numericUpDown_OF_Accur.Value = new decimal(new int[] { 1, 0, 0, 0 });
- //
- // label13
- //
- label13.AutoSize = true;
- label13.Location = new Point(7, 53);
- label13.Name = "label13";
- label13.Size = new Size(56, 15);
- label13.TabIndex = 16;
- label13.Tag = "#accuracy";
- label13.Text = "Accuracy";
- //
- // numericUpDown_OF_Freq
- //
- numericUpDown_OF_Freq.Location = new Point(69, 22);
- numericUpDown_OF_Freq.Maximum = new decimal(new int[] { 200, 0, 0, 0 });
- numericUpDown_OF_Freq.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
- numericUpDown_OF_Freq.Name = "numericUpDown_OF_Freq";
- numericUpDown_OF_Freq.Size = new Size(40, 23);
- numericUpDown_OF_Freq.TabIndex = 13;
- numericUpDown_OF_Freq.Value = new decimal(new int[] { 100, 0, 0, 0 });
- //
- // label14
- //
- label14.AutoSize = true;
- label14.Location = new Point(112, 24);
- label14.Name = "label14";
- label14.Size = new Size(21, 15);
- label14.TabIndex = 15;
- label14.Text = "Hz";
- //
- // label15
- //
- label15.AutoSize = true;
- label15.Location = new Point(6, 24);
- label15.Name = "label15";
- label15.Size = new Size(62, 15);
- label15.TabIndex = 14;
- label15.Tag = "#frequency";
- label15.Text = "Frequency";
- //
- // checkBox_GPS_Enable
- //
- checkBox_GPS_Enable.AutoSize = true;
- checkBox_GPS_Enable.Checked = true;
- checkBox_GPS_Enable.CheckState = CheckState.Checked;
- checkBox_GPS_Enable.Location = new Point(158, 87);
- checkBox_GPS_Enable.Name = "checkBox_GPS_Enable";
- checkBox_GPS_Enable.Size = new Size(39, 19);
- checkBox_GPS_Enable.TabIndex = 16;
- checkBox_GPS_Enable.Tag = "#en";
- checkBox_GPS_Enable.Text = "En";
- checkBox_GPS_Enable.UseVisualStyleBackColor = true;
- //
- // label16
- //
- label16.AutoSize = true;
- label16.Location = new Point(1, 82);
- label16.Name = "label16";
- label16.Size = new Size(67, 15);
- label16.TabIndex = 19;
- label16.Tag = "#max_height";
- label16.Text = "Max height";
- //
- // numericUpDown1
- //
- numericUpDown1.Location = new Point(68, 80);
- numericUpDown1.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
- numericUpDown1.Name = "numericUpDown1";
- numericUpDown1.Size = new Size(40, 23);
- numericUpDown1.TabIndex = 20;
- numericUpDown1.Value = new decimal(new int[] { 8, 0, 0, 0 });
- //
- // label17
- //
- label17.AutoSize = true;
- label17.Location = new Point(111, 82);
- label17.Name = "label17";
- label17.Size = new Size(18, 15);
- label17.TabIndex = 21;
- label17.Text = "m";
- //
- // checkBox_OF_Enable
- //
- checkBox_OF_Enable.AutoSize = true;
- checkBox_OF_Enable.Checked = true;
- checkBox_OF_Enable.CheckState = CheckState.Checked;
- checkBox_OF_Enable.Location = new Point(158, 89);
- checkBox_OF_Enable.Name = "checkBox_OF_Enable";
- checkBox_OF_Enable.Size = new Size(39, 19);
- checkBox_OF_Enable.TabIndex = 22;
- checkBox_OF_Enable.Tag = "#en";
- checkBox_OF_Enable.Text = "En";
- checkBox_OF_Enable.UseVisualStyleBackColor = true;
- //
- // checkBox_Bar_Enable
- //
- checkBox_Bar_Enable.AutoSize = true;
- checkBox_Bar_Enable.Checked = true;
- checkBox_Bar_Enable.CheckState = CheckState.Checked;
- checkBox_Bar_Enable.Location = new Point(158, 63);
- checkBox_Bar_Enable.Name = "checkBox_Bar_Enable";
- checkBox_Bar_Enable.Size = new Size(39, 19);
- checkBox_Bar_Enable.TabIndex = 17;
- checkBox_Bar_Enable.Tag = "#en";
- checkBox_Bar_Enable.Text = "En";
- checkBox_Bar_Enable.UseVisualStyleBackColor = true;
- //
- // 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_Limit).EndInit();
- ((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();
- tabPage_Model.ResumeLayout(false);
- groupBox_Navi.ResumeLayout(false);
- panel1.ResumeLayout(false);
- groupBox_GPS.ResumeLayout(false);
- groupBox_GPS.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_GPS_Freq).EndInit();
- groupBox_Barometer.ResumeLayout(false);
- groupBox_Barometer.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Freq).EndInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Accur).EndInit();
- ((System.ComponentModel.ISupportInitialize)textBox_GPS_Accur).EndInit();
- groupBox1.ResumeLayout(false);
- groupBox1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Accur).EndInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Freq).EndInit();
- ((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
- ResumeLayout(false);
- PerformLayout();
- }
+ ///
+ /// 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();
+ numericUpDown_Visual_Limit = new NumericUpDown();
+ label1 = new Label();
+ label_Visual_Num = new Label();
+ label3 = new Label();
+ 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();
+ groupBox1 = new GroupBox();
+ checkBox_OF_Enable = new CheckBox();
+ label17 = new Label();
+ numericUpDown1 = new NumericUpDown();
+ label16 = new Label();
+ label12 = new Label();
+ numericUpDown_OF_Accur = new NumericUpDown();
+ label13 = new Label();
+ numericUpDown_OF_Freq = new NumericUpDown();
+ label14 = new Label();
+ label15 = new Label();
+ groupBox_Barometer = new GroupBox();
+ checkBox_Bar_Enable = new CheckBox();
+ label9 = new Label();
+ numericUpDown_Bar_Accur = new NumericUpDown();
+ label8 = new Label();
+ numericUpDown_Bar_Freq = new NumericUpDown();
+ label5 = new Label();
+ label7 = new Label();
+ groupBox_GPS = new GroupBox();
+ checkBox_GPS_Enable = new CheckBox();
+ label10 = new Label();
+ textBox_GPS_Accur = new NumericUpDown();
+ label11 = new Label();
+ numericUpDown_GPS_Freq = new NumericUpDown();
+ label6 = new Label();
+ label_GPS_Frequency = new Label();
+ label4 = new Label();
+ textBox_GPS_Lon = new TextBox();
+ label2 = new Label();
+ textBox_GPS_Lat = new TextBox();
+ 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_Limit).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Visual_Port).BeginInit();
+ groupBox_Clients.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Limit).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Clients_Port).BeginInit();
+ tabPage_Model.SuspendLayout();
+ groupBox1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Accur).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Freq).BeginInit();
+ groupBox_Barometer.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Accur).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Freq).BeginInit();
+ groupBox_GPS.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)textBox_GPS_Accur).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_GPS_Freq).BeginInit();
+ groupBox_Navi.SuspendLayout();
+ panel1.SuspendLayout();
+ SuspendLayout();
+ //
+ // menuStrip_Menu
+ //
+ menuStrip_Menu.ImageScalingSize = new Size(20, 20);
+ menuStrip_Menu.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem });
+ menuStrip_Menu.Location = new Point(0, 0);
+ menuStrip_Menu.Name = "menuStrip_Menu";
+ menuStrip_Menu.Padding = new Padding(7, 3, 0, 3);
+ menuStrip_Menu.Size = new Size(1010, 30);
+ menuStrip_Menu.TabIndex = 0;
+ menuStrip_Menu.Text = "menuStrip1";
+ //
+ // fileToolStripMenuItem
+ //
+ fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { exitToolStripMenuItem });
+ fileToolStripMenuItem.Name = "fileToolStripMenuItem";
+ fileToolStripMenuItem.Size = new Size(46, 24);
+ fileToolStripMenuItem.Tag = "#file";
+ fileToolStripMenuItem.Text = "File";
+ //
+ // exitToolStripMenuItem
+ //
+ exitToolStripMenuItem.Name = "exitToolStripMenuItem";
+ exitToolStripMenuItem.Size = new Size(116, 26);
+ 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(249, 30);
+ groupBox_Screen.Margin = new Padding(3, 4, 3, 4);
+ groupBox_Screen.Name = "groupBox_Screen";
+ groupBox_Screen.Padding = new Padding(3, 4, 3, 4);
+ groupBox_Screen.Size = new Size(532, 585);
+ 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, 24);
+ pictureBox_2D.Margin = new Padding(3, 4, 3, 4);
+ pictureBox_2D.Name = "pictureBox_2D";
+ pictureBox_2D.Size = new Size(526, 557);
+ 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, 30);
+ tabControl_Menu.Margin = new Padding(3, 4, 3, 4);
+ tabControl_Menu.Name = "tabControl_Menu";
+ tabControl_Menu.SelectedIndex = 0;
+ tabControl_Menu.Size = new Size(249, 585);
+ tabControl_Menu.TabIndex = 2;
+ //
+ // tabPage_Main
+ //
+ tabPage_Main.Controls.Add(groupBox_Visual);
+ tabPage_Main.Controls.Add(groupBox_Clients);
+ tabPage_Main.Location = new Point(4, 29);
+ tabPage_Main.Margin = new Padding(3, 4, 3, 4);
+ tabPage_Main.Name = "tabPage_Main";
+ tabPage_Main.Padding = new Padding(3, 4, 3, 4);
+ tabPage_Main.Size = new Size(241, 552);
+ tabPage_Main.TabIndex = 0;
+ tabPage_Main.Tag = "#main";
+ tabPage_Main.Text = "Main";
+ tabPage_Main.UseVisualStyleBackColor = true;
+ //
+ // groupBox_Visual
+ //
+ groupBox_Visual.Controls.Add(numericUpDown_Visual_Limit);
+ groupBox_Visual.Controls.Add(label1);
+ groupBox_Visual.Controls.Add(label_Visual_Num);
+ groupBox_Visual.Controls.Add(label3);
+ 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, 111);
+ groupBox_Visual.Margin = new Padding(3, 4, 3, 4);
+ groupBox_Visual.Name = "groupBox_Visual";
+ groupBox_Visual.Padding = new Padding(3, 4, 3, 4);
+ groupBox_Visual.Size = new Size(235, 121);
+ groupBox_Visual.TabIndex = 2;
+ groupBox_Visual.TabStop = false;
+ groupBox_Visual.Tag = "#visual";
+ groupBox_Visual.Text = "Visual";
+ //
+ // numericUpDown_Visual_Limit
+ //
+ numericUpDown_Visual_Limit.Location = new Point(50, 76);
+ numericUpDown_Visual_Limit.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown_Visual_Limit.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
+ numericUpDown_Visual_Limit.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
+ numericUpDown_Visual_Limit.Name = "numericUpDown_Visual_Limit";
+ numericUpDown_Visual_Limit.Size = new Size(48, 27);
+ numericUpDown_Visual_Limit.TabIndex = 13;
+ numericUpDown_Visual_Limit.Value = new decimal(new int[] { 1, 0, 0, 0 });
+ //
+ // label1
+ //
+ label1.AutoSize = true;
+ label1.Location = new Point(7, 79);
+ label1.Name = "label1";
+ label1.Size = new Size(45, 20);
+ label1.TabIndex = 12;
+ label1.Tag = "#clients_limit";
+ label1.Text = "Limit:";
+ //
+ // label_Visual_Num
+ //
+ label_Visual_Num.AutoSize = true;
+ label_Visual_Num.Location = new Point(184, 79);
+ label_Visual_Num.Name = "label_Visual_Num";
+ label_Visual_Num.Size = new Size(17, 20);
+ label_Visual_Num.TabIndex = 11;
+ label_Visual_Num.Text = "0";
+ //
+ // label3
+ //
+ label3.AutoSize = true;
+ label3.Location = new Point(128, 79);
+ label3.Name = "label3";
+ label3.Size = new Size(51, 20);
+ label3.TabIndex = 10;
+ label3.Tag = "#clients_count";
+ label3.Text = "Count:";
+ //
+ // button_Visual_Start
+ //
+ button_Visual_Start.Location = new Point(128, 29);
+ button_Visual_Start.Margin = new Padding(3, 4, 3, 4);
+ button_Visual_Start.Name = "button_Visual_Start";
+ button_Visual_Start.Size = new Size(98, 31);
+ button_Visual_Start.TabIndex = 9;
+ button_Visual_Start.Tag = "#visual_start";
+ button_Visual_Start.Text = "Start";
+ button_Visual_Start.UseVisualStyleBackColor = true;
+ button_Visual_Start.Click += button_Visual_Start_Click;
+ //
+ // numericUpDown_Visual_Port
+ //
+ numericUpDown_Visual_Port.Location = new Point(50, 32);
+ numericUpDown_Visual_Port.Margin = new Padding(3, 4, 3, 4);
+ 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(71, 27);
+ 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(7, 35);
+ label_Visual_Port.Name = "label_Visual_Port";
+ label_Visual_Port.Size = new Size(38, 20);
+ 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, 4);
+ groupBox_Clients.Margin = new Padding(3, 4, 3, 4);
+ groupBox_Clients.Name = "groupBox_Clients";
+ groupBox_Clients.Padding = new Padding(3, 4, 3, 4);
+ groupBox_Clients.Size = new Size(235, 107);
+ 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(50, 64);
+ numericUpDown_Clients_Limit.Margin = new Padding(3, 4, 3, 4);
+ 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(48, 27);
+ 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(7, 67);
+ label_Clients_Limit.Name = "label_Clients_Limit";
+ label_Clients_Limit.Size = new Size(45, 20);
+ 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(184, 67);
+ label_Clients_Num.Name = "label_Clients_Num";
+ label_Clients_Num.Size = new Size(17, 20);
+ label_Clients_Num.TabIndex = 4;
+ label_Clients_Num.Text = "0";
+ //
+ // label_Clients_Count
+ //
+ label_Clients_Count.AutoSize = true;
+ label_Clients_Count.Location = new Point(128, 67);
+ label_Clients_Count.Name = "label_Clients_Count";
+ label_Clients_Count.Size = new Size(51, 20);
+ 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(128, 20);
+ button_Client_Start.Margin = new Padding(3, 4, 3, 4);
+ button_Client_Start.Name = "button_Client_Start";
+ button_Client_Start.Size = new Size(98, 31);
+ 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(50, 23);
+ numericUpDown_Clients_Port.Margin = new Padding(3, 4, 3, 4);
+ 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(71, 27);
+ 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(7, 25);
+ label_Clients_Port.Name = "label_Clients_Port";
+ label_Clients_Port.Size = new Size(38, 20);
+ label_Clients_Port.TabIndex = 0;
+ label_Clients_Port.Tag = "#clients_port";
+ label_Clients_Port.Text = "Port:";
+ //
+ // tabPage_Model
+ //
+ tabPage_Model.Controls.Add(groupBox1);
+ tabPage_Model.Controls.Add(groupBox_Barometer);
+ tabPage_Model.Controls.Add(groupBox_GPS);
+ tabPage_Model.Location = new Point(4, 29);
+ tabPage_Model.Margin = new Padding(3, 4, 3, 4);
+ tabPage_Model.Name = "tabPage_Model";
+ tabPage_Model.Padding = new Padding(3, 4, 3, 4);
+ tabPage_Model.Size = new Size(241, 552);
+ tabPage_Model.TabIndex = 1;
+ tabPage_Model.Tag = "#model";
+ tabPage_Model.Text = "Model";
+ tabPage_Model.UseVisualStyleBackColor = true;
+ //
+ // groupBox1
+ //
+ groupBox1.Controls.Add(checkBox_OF_Enable);
+ groupBox1.Controls.Add(label17);
+ groupBox1.Controls.Add(numericUpDown1);
+ groupBox1.Controls.Add(label16);
+ groupBox1.Controls.Add(label12);
+ groupBox1.Controls.Add(numericUpDown_OF_Accur);
+ groupBox1.Controls.Add(label13);
+ groupBox1.Controls.Add(numericUpDown_OF_Freq);
+ groupBox1.Controls.Add(label14);
+ groupBox1.Controls.Add(label15);
+ groupBox1.Dock = DockStyle.Top;
+ groupBox1.Enabled = false;
+ groupBox1.Location = new Point(3, 270);
+ groupBox1.Margin = new Padding(3, 4, 3, 4);
+ groupBox1.Name = "groupBox1";
+ groupBox1.Padding = new Padding(3, 4, 3, 4);
+ groupBox1.Size = new Size(235, 152);
+ groupBox1.TabIndex = 4;
+ groupBox1.TabStop = false;
+ groupBox1.Text = "Optical flow";
+ //
+ // checkBox_OF_Enable
+ //
+ checkBox_OF_Enable.AutoSize = true;
+ checkBox_OF_Enable.Checked = true;
+ checkBox_OF_Enable.CheckState = CheckState.Checked;
+ checkBox_OF_Enable.Location = new Point(181, 119);
+ checkBox_OF_Enable.Margin = new Padding(3, 4, 3, 4);
+ checkBox_OF_Enable.Name = "checkBox_OF_Enable";
+ checkBox_OF_Enable.Size = new Size(47, 24);
+ checkBox_OF_Enable.TabIndex = 22;
+ checkBox_OF_Enable.Tag = "#en";
+ checkBox_OF_Enable.Text = "En";
+ checkBox_OF_Enable.UseVisualStyleBackColor = true;
+ //
+ // label17
+ //
+ label17.AutoSize = true;
+ label17.Location = new Point(127, 109);
+ label17.Name = "label17";
+ label17.Size = new Size(22, 20);
+ label17.TabIndex = 21;
+ label17.Text = "m";
+ //
+ // numericUpDown1
+ //
+ numericUpDown1.Location = new Point(78, 107);
+ numericUpDown1.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown1.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
+ numericUpDown1.Name = "numericUpDown1";
+ numericUpDown1.Size = new Size(46, 27);
+ numericUpDown1.TabIndex = 20;
+ numericUpDown1.Value = new decimal(new int[] { 8, 0, 0, 0 });
+ //
+ // label16
+ //
+ label16.AutoSize = true;
+ label16.Location = new Point(1, 109);
+ label16.Name = "label16";
+ label16.Size = new Size(83, 20);
+ label16.TabIndex = 19;
+ label16.Tag = "#max_height";
+ label16.Text = "Max height";
+ //
+ // label12
+ //
+ label12.AutoSize = true;
+ label12.Location = new Point(127, 71);
+ label12.Name = "label12";
+ label12.Size = new Size(37, 20);
+ label12.TabIndex = 18;
+ label12.Text = "Deg";
+ //
+ // numericUpDown_OF_Accur
+ //
+ numericUpDown_OF_Accur.DecimalPlaces = 1;
+ numericUpDown_OF_Accur.Location = new Point(79, 68);
+ numericUpDown_OF_Accur.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown_OF_Accur.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
+ numericUpDown_OF_Accur.Name = "numericUpDown_OF_Accur";
+ numericUpDown_OF_Accur.Size = new Size(46, 27);
+ numericUpDown_OF_Accur.TabIndex = 17;
+ numericUpDown_OF_Accur.Value = new decimal(new int[] { 1, 0, 0, 0 });
+ //
+ // label13
+ //
+ label13.AutoSize = true;
+ label13.Location = new Point(8, 71);
+ label13.Name = "label13";
+ label13.Size = new Size(68, 20);
+ label13.TabIndex = 16;
+ label13.Tag = "#accuracy";
+ label13.Text = "Accuracy";
+ //
+ // numericUpDown_OF_Freq
+ //
+ numericUpDown_OF_Freq.Location = new Point(79, 29);
+ numericUpDown_OF_Freq.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown_OF_Freq.Maximum = new decimal(new int[] { 200, 0, 0, 0 });
+ numericUpDown_OF_Freq.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
+ numericUpDown_OF_Freq.Name = "numericUpDown_OF_Freq";
+ numericUpDown_OF_Freq.Size = new Size(46, 27);
+ numericUpDown_OF_Freq.TabIndex = 13;
+ numericUpDown_OF_Freq.Value = new decimal(new int[] { 100, 0, 0, 0 });
+ //
+ // label14
+ //
+ label14.AutoSize = true;
+ label14.Location = new Point(128, 32);
+ label14.Name = "label14";
+ label14.Size = new Size(27, 20);
+ label14.TabIndex = 15;
+ label14.Text = "Hz";
+ //
+ // label15
+ //
+ label15.AutoSize = true;
+ label15.Location = new Point(7, 32);
+ label15.Name = "label15";
+ label15.Size = new Size(76, 20);
+ label15.TabIndex = 14;
+ label15.Tag = "#frequency";
+ label15.Text = "Frequency";
+ //
+ // groupBox_Barometer
+ //
+ groupBox_Barometer.Controls.Add(checkBox_Bar_Enable);
+ groupBox_Barometer.Controls.Add(label9);
+ groupBox_Barometer.Controls.Add(numericUpDown_Bar_Accur);
+ groupBox_Barometer.Controls.Add(label8);
+ groupBox_Barometer.Controls.Add(numericUpDown_Bar_Freq);
+ groupBox_Barometer.Controls.Add(label5);
+ groupBox_Barometer.Controls.Add(label7);
+ groupBox_Barometer.Dock = DockStyle.Top;
+ groupBox_Barometer.Location = new Point(3, 153);
+ groupBox_Barometer.Margin = new Padding(3, 4, 3, 4);
+ groupBox_Barometer.Name = "groupBox_Barometer";
+ groupBox_Barometer.Padding = new Padding(3, 4, 3, 4);
+ groupBox_Barometer.Size = new Size(235, 117);
+ groupBox_Barometer.TabIndex = 3;
+ groupBox_Barometer.TabStop = false;
+ groupBox_Barometer.Tag = "#barometer";
+ groupBox_Barometer.Text = "Barometer";
+ //
+ // checkBox_Bar_Enable
+ //
+ checkBox_Bar_Enable.AutoSize = true;
+ checkBox_Bar_Enable.Checked = true;
+ checkBox_Bar_Enable.CheckState = CheckState.Checked;
+ checkBox_Bar_Enable.Location = new Point(181, 84);
+ checkBox_Bar_Enable.Margin = new Padding(3, 4, 3, 4);
+ checkBox_Bar_Enable.Name = "checkBox_Bar_Enable";
+ checkBox_Bar_Enable.Size = new Size(47, 24);
+ checkBox_Bar_Enable.TabIndex = 17;
+ checkBox_Bar_Enable.Tag = "#en";
+ checkBox_Bar_Enable.Text = "En";
+ checkBox_Bar_Enable.UseVisualStyleBackColor = true;
+ //
+ // label9
+ //
+ label9.AutoSize = true;
+ label9.Location = new Point(128, 71);
+ label9.Name = "label9";
+ label9.Size = new Size(24, 20);
+ label9.TabIndex = 12;
+ label9.Text = "Pa";
+ //
+ // numericUpDown_Bar_Accur
+ //
+ numericUpDown_Bar_Accur.DecimalPlaces = 1;
+ numericUpDown_Bar_Accur.Location = new Point(79, 68);
+ numericUpDown_Bar_Accur.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown_Bar_Accur.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
+ numericUpDown_Bar_Accur.Name = "numericUpDown_Bar_Accur";
+ numericUpDown_Bar_Accur.Size = new Size(46, 27);
+ numericUpDown_Bar_Accur.TabIndex = 11;
+ numericUpDown_Bar_Accur.Value = new decimal(new int[] { 1, 0, 0, 0 });
+ //
+ // label8
+ //
+ label8.AutoSize = true;
+ label8.Location = new Point(8, 71);
+ label8.Name = "label8";
+ label8.Size = new Size(68, 20);
+ label8.TabIndex = 10;
+ label8.Tag = "#accuracy";
+ label8.Text = "Accuracy";
+ //
+ // numericUpDown_Bar_Freq
+ //
+ numericUpDown_Bar_Freq.Location = new Point(79, 29);
+ numericUpDown_Bar_Freq.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown_Bar_Freq.Maximum = new decimal(new int[] { 200, 0, 0, 0 });
+ numericUpDown_Bar_Freq.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
+ numericUpDown_Bar_Freq.Name = "numericUpDown_Bar_Freq";
+ numericUpDown_Bar_Freq.Size = new Size(46, 27);
+ numericUpDown_Bar_Freq.TabIndex = 7;
+ numericUpDown_Bar_Freq.Value = new decimal(new int[] { 50, 0, 0, 0 });
+ //
+ // label5
+ //
+ label5.AutoSize = true;
+ label5.Location = new Point(127, 32);
+ label5.Name = "label5";
+ label5.Size = new Size(27, 20);
+ label5.TabIndex = 9;
+ label5.Text = "Hz";
+ //
+ // label7
+ //
+ label7.AutoSize = true;
+ label7.Location = new Point(7, 32);
+ label7.Name = "label7";
+ label7.Size = new Size(76, 20);
+ label7.TabIndex = 8;
+ label7.Tag = "#frequency";
+ label7.Text = "Frequency";
+ //
+ // groupBox_GPS
+ //
+ groupBox_GPS.Controls.Add(checkBox_GPS_Enable);
+ groupBox_GPS.Controls.Add(label10);
+ groupBox_GPS.Controls.Add(textBox_GPS_Accur);
+ groupBox_GPS.Controls.Add(label11);
+ groupBox_GPS.Controls.Add(numericUpDown_GPS_Freq);
+ groupBox_GPS.Controls.Add(label6);
+ groupBox_GPS.Controls.Add(label_GPS_Frequency);
+ groupBox_GPS.Controls.Add(label4);
+ groupBox_GPS.Controls.Add(textBox_GPS_Lon);
+ groupBox_GPS.Controls.Add(label2);
+ groupBox_GPS.Controls.Add(textBox_GPS_Lat);
+ groupBox_GPS.Dock = DockStyle.Top;
+ groupBox_GPS.Enabled = false;
+ groupBox_GPS.Location = new Point(3, 4);
+ groupBox_GPS.Margin = new Padding(3, 4, 3, 4);
+ groupBox_GPS.Name = "groupBox_GPS";
+ groupBox_GPS.Padding = new Padding(3, 4, 3, 4);
+ groupBox_GPS.Size = new Size(235, 149);
+ groupBox_GPS.TabIndex = 2;
+ groupBox_GPS.TabStop = false;
+ groupBox_GPS.Text = "GPS";
+ //
+ // checkBox_GPS_Enable
+ //
+ checkBox_GPS_Enable.AutoSize = true;
+ checkBox_GPS_Enable.Checked = true;
+ checkBox_GPS_Enable.CheckState = CheckState.Checked;
+ checkBox_GPS_Enable.Location = new Point(181, 116);
+ checkBox_GPS_Enable.Margin = new Padding(3, 4, 3, 4);
+ checkBox_GPS_Enable.Name = "checkBox_GPS_Enable";
+ checkBox_GPS_Enable.Size = new Size(47, 24);
+ checkBox_GPS_Enable.TabIndex = 16;
+ checkBox_GPS_Enable.Tag = "#en";
+ checkBox_GPS_Enable.Text = "En";
+ checkBox_GPS_Enable.UseVisualStyleBackColor = true;
+ //
+ // label10
+ //
+ label10.AutoSize = true;
+ label10.Location = new Point(127, 109);
+ label10.Name = "label10";
+ label10.Size = new Size(22, 20);
+ label10.TabIndex = 15;
+ label10.Text = "m";
+ //
+ // textBox_GPS_Accur
+ //
+ textBox_GPS_Accur.DecimalPlaces = 1;
+ textBox_GPS_Accur.Location = new Point(78, 107);
+ textBox_GPS_Accur.Margin = new Padding(3, 4, 3, 4);
+ textBox_GPS_Accur.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
+ textBox_GPS_Accur.Name = "textBox_GPS_Accur";
+ textBox_GPS_Accur.Size = new Size(46, 27);
+ textBox_GPS_Accur.TabIndex = 14;
+ textBox_GPS_Accur.Value = new decimal(new int[] { 1, 0, 0, 0 });
+ //
+ // label11
+ //
+ label11.AutoSize = true;
+ label11.Location = new Point(7, 109);
+ label11.Name = "label11";
+ label11.Size = new Size(68, 20);
+ label11.TabIndex = 13;
+ label11.Tag = "#accuracy";
+ label11.Text = "Accuracy";
+ //
+ // numericUpDown_GPS_Freq
+ //
+ numericUpDown_GPS_Freq.Location = new Point(154, 68);
+ numericUpDown_GPS_Freq.Margin = new Padding(3, 4, 3, 4);
+ numericUpDown_GPS_Freq.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
+ numericUpDown_GPS_Freq.Name = "numericUpDown_GPS_Freq";
+ numericUpDown_GPS_Freq.Size = new Size(46, 27);
+ numericUpDown_GPS_Freq.TabIndex = 4;
+ numericUpDown_GPS_Freq.Value = new decimal(new int[] { 10, 0, 0, 0 });
+ //
+ // label6
+ //
+ label6.AutoSize = true;
+ label6.Location = new Point(201, 72);
+ label6.Name = "label6";
+ label6.Size = new Size(27, 20);
+ label6.TabIndex = 6;
+ label6.Text = "Hz";
+ //
+ // label_GPS_Frequency
+ //
+ label_GPS_Frequency.AutoSize = true;
+ label_GPS_Frequency.Location = new Point(154, 33);
+ label_GPS_Frequency.Name = "label_GPS_Frequency";
+ label_GPS_Frequency.Size = new Size(76, 20);
+ label_GPS_Frequency.TabIndex = 5;
+ label_GPS_Frequency.Tag = "#frequency";
+ label_GPS_Frequency.Text = "Frequency";
+ //
+ // label4
+ //
+ label4.AutoSize = true;
+ label4.Location = new Point(6, 72);
+ label4.Name = "label4";
+ label4.Size = new Size(36, 20);
+ label4.TabIndex = 3;
+ label4.Text = "Lon:";
+ //
+ // textBox_GPS_Lon
+ //
+ textBox_GPS_Lon.Location = new Point(42, 68);
+ textBox_GPS_Lon.Margin = new Padding(3, 4, 3, 4);
+ textBox_GPS_Lon.Name = "textBox_GPS_Lon";
+ textBox_GPS_Lon.Size = new Size(105, 27);
+ textBox_GPS_Lon.TabIndex = 2;
+ textBox_GPS_Lon.Text = "38.9160740";
+ //
+ // label2
+ //
+ label2.AutoSize = true;
+ label2.Location = new Point(6, 33);
+ label2.Name = "label2";
+ label2.Size = new Size(32, 20);
+ label2.TabIndex = 1;
+ label2.Text = "Lat:";
+ //
+ // textBox_GPS_Lat
+ //
+ textBox_GPS_Lat.Location = new Point(42, 29);
+ textBox_GPS_Lat.Margin = new Padding(3, 4, 3, 4);
+ textBox_GPS_Lat.Name = "textBox_GPS_Lat";
+ textBox_GPS_Lat.Size = new Size(105, 27);
+ textBox_GPS_Lat.TabIndex = 0;
+ textBox_GPS_Lat.Text = "47.2125649";
+ //
+ // tabPage_Area
+ //
+ tabPage_Area.Location = new Point(4, 29);
+ tabPage_Area.Margin = new Padding(3, 4, 3, 4);
+ tabPage_Area.Name = "tabPage_Area";
+ tabPage_Area.Size = new Size(241, 552);
+ 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(781, 30);
+ groupBox_Navi.Margin = new Padding(3, 4, 3, 4);
+ groupBox_Navi.Name = "groupBox_Navi";
+ groupBox_Navi.Padding = new Padding(3, 4, 3, 4);
+ groupBox_Navi.Size = new Size(229, 585);
+ 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, 52);
+ panel1.Margin = new Padding(3, 4, 3, 4);
+ panel1.Name = "panel1";
+ panel1.Size = new Size(223, 529);
+ panel1.TabIndex = 3;
+ //
+ // button_Drone_Color
+ //
+ button_Drone_Color.BackColor = Color.Tomato;
+ button_Drone_Color.Location = new Point(15, 8);
+ button_Drone_Color.Margin = new Padding(3, 4, 3, 4);
+ button_Drone_Color.Name = "button_Drone_Color";
+ button_Drone_Color.Size = new Size(51, 31);
+ 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(130, 8);
+ comboBox_Drone_Rotor.Margin = new Padding(3, 4, 3, 4);
+ comboBox_Drone_Rotor.Name = "comboBox_Drone_Rotor";
+ comboBox_Drone_Rotor.Size = new Size(81, 28);
+ 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, 24);
+ comboBox_Drone.Margin = new Padding(3, 4, 3, 4);
+ comboBox_Drone.Name = "comboBox_Drone";
+ comboBox_Drone.Size = new Size(223, 28);
+ 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(8F, 20F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(1010, 615);
+ 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;
+ Margin = new Padding(3, 4, 3, 4);
+ MinimumSize = new Size(1026, 651);
+ 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_Limit).EndInit();
+ ((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();
+ tabPage_Model.ResumeLayout(false);
+ groupBox1.ResumeLayout(false);
+ groupBox1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Accur).EndInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_OF_Freq).EndInit();
+ groupBox_Barometer.ResumeLayout(false);
+ groupBox_Barometer.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Accur).EndInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_Bar_Freq).EndInit();
+ groupBox_GPS.ResumeLayout(false);
+ groupBox_GPS.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)textBox_GPS_Accur).EndInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDown_GPS_Freq).EndInit();
+ groupBox_Navi.ResumeLayout(false);
+ panel1.ResumeLayout(false);
+ ResumeLayout(false);
+ PerformLayout();
+ }
- #endregion
+ #endregion
- private MenuStrip menuStrip_Menu;
+ private MenuStrip menuStrip_Menu;
private ToolStripMenuItem fileToolStripMenuItem;
private GroupBox groupBox_Screen;
private TabControl tabControl_Menu;
@@ -895,5 +939,5 @@
private Label label16;
private CheckBox checkBox_OF_Enable;
private CheckBox checkBox_Bar_Enable;
- }
+ }
}
diff --git a/DroneSimulator/FormMain.cs b/DroneSimulator/FormMain.cs
index 469e08b..fa8066c 100644
--- a/DroneSimulator/FormMain.cs
+++ b/DroneSimulator/FormMain.cs
@@ -8,201 +8,210 @@ using System.Runtime.InteropServices;
using System.CodeDom;
using System.Linq;
+using System.Net.WebSockets;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
namespace DroneSimulator
{
- public partial class Form_Main : Form
- {
- Screen2D screen2D = null;
-
- NetServerClients netServerClient = new NetServerClients();
- NetServerVisual netServerVisual = new NetServerVisual();
-
- List AllDrones = new List();
-
- public Form_Main()
+ public partial class Form_Main : Form
{
- InitializeComponent();
- }
+ Screen2D screen2D = null;
- private void ClientConnectionCallback(object o)
- {
- NetServerClients.ConnectData data = (NetServerClients.ConnectData)o;
+ NetServerClients netServerClient = new NetServerClients();
+ NetServerVisual netServerVisual = new NetServerVisual();
- Invoke((MethodInvoker)delegate
- {
- label_Clients_Num.Text = data.Count.ToString();
- });
-
- if (data.Connect)
- {
- Drone drone = new Drone(data.ID);
- drone.Create(1.0f, 0.5f, 1.0f);
-
- screen2D.CreateDrone(Color.Red, data.ID);
-
- AllDrones.Add(drone);
- }
- else
- {
- foreach (Drone drone in AllDrones)
+ List AllDrones = new List();
+ private ClientWebSocket _webSocket;
+ private CancellationTokenSource _cts;
+ private bool _isRunning;
+ public Form_Main()
{
- if (drone.ID != data.ID) continue;
- drone.Close();
-
- screen2D.RemoveDrone(data.ID);
-
- AllDrones.Remove(drone);
- break;
+ InitializeComponent();
}
- }
- }
- private void ClientReceiveCallback(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;
-
- List? send = drone.DataStream(data.Buffer, data.Size);
-
- if (send == null) return;
- try
- {
- foreach (byte[]? b in send)
+ private void ClientConnectionCallback(object o)
{
- if (b != null) data.Client?.Send(b);
+ 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(1.0f, 0.5f, 1.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;
+ }
+ }
}
- }
- catch { }
+
+ private void ClientReceiveCallback(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;
+
+ List? send = drone.DataStream(data.Buffer, data.Size);
+
+ if (send == null) return;
+ try
+ {
+ foreach (byte[]? b in send)
+ {
+ if (b != null) data.Client?.Send(b);
+ }
+ }
+ catch { }
+ }
+
+ private void button_Client_Start_Click(object sender, EventArgs e)
+ {
+ var done = netServerClient.StartServer((int)numericUpDown_Clients_Port.Value, (int)numericUpDown_Clients_Limit.Value, ClientConnectionCallback, ClientReceiveCallback);
+ switch (done)
+ {
+ case NetServerClients.ServerState.Error:
+ {
+ MessageBox.Show("Error to start clients server", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ break;
+ }
+ case NetServerClients.ServerState.Start:
+ {
+ button_Client_Start.Text = "Stop";
+ button_Client_Start.BackColor = Color.LimeGreen;
+ break;
+ }
+ case NetServerClients.ServerState.Stop:
+ {
+ label_Clients_Num.Text = "0";
+ 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();
+ }
+
+ private void VisualConnectionCallback(object o)
+ {
+ NetServerVisual.ConnectData data = (NetServerVisual.ConnectData)o;
+
+ Invoke((MethodInvoker)delegate
+ {
+ label_Clients_Num.Text = data.Count.ToString();
+ });
+
+ if (data.Connect)
+ {
+ //---
+ }
+ else
+ {
+ //---
+ }
+ }
+
+ private void VisualReceiveCallback(object o)
+ {
+ NetServerVisual.ReceiveData data = (NetServerVisual.ReceiveData)o;
+
+ foreach (Drone d in AllDrones)
+ {
+ Drone.DataVisual v = d.GetVisual();
+
+ try { data.Client.Send(Drone.getBytes(v)); }
+ catch { }
+ }
+ }
+
+ private void button_Visual_Start_Click(object sender, EventArgs e)
+ {
+ var done = netServerVisual.StartServer((int)numericUpDown_Visual_Port.Value, (int)numericUpDown_Visual_Limit.Value, VisualConnectionCallback, VisualReceiveCallback);
+ switch (done)
+ {
+ case NetServerVisual.ServerState.Error:
+ {
+ MessageBox.Show("Error to start visual server", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ break;
+ }
+ case NetServerVisual.ServerState.Start:
+ {
+ button_Visual_Start.Text = "Stop";
+ button_Visual_Start.BackColor = Color.LimeGreen;
+ break;
+ }
+ case NetServerVisual.ServerState.Stop:
+ {
+ label_Visual_Num.Text = "0";
+ button_Visual_Start.Text = "Start";
+ button_Visual_Start.BackColor = Color.Transparent;
+ break;
+ }
+ }
+ }
+
+
}
-
- private void button_Client_Start_Click(object sender, EventArgs e)
- {
- var done = netServerClient.StartServer((int)numericUpDown_Clients_Port.Value, (int)numericUpDown_Clients_Limit.Value, ClientConnectionCallback, ClientReceiveCallback);
- switch (done)
- {
- case NetServerClients.ServerState.Error:
- {
- MessageBox.Show("Error to start clients server", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- break;
- }
- case NetServerClients.ServerState.Start:
- {
- button_Client_Start.Text = "Stop";
- button_Client_Start.BackColor = Color.LimeGreen;
- break;
- }
- case NetServerClients.ServerState.Stop:
- {
- label_Clients_Num.Text = "0";
- 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();
- }
-
- private void VisualConnectionCallback(object o)
- {
- NetServerVisual.ConnectData data = (NetServerVisual.ConnectData)o;
-
- Invoke((MethodInvoker)delegate
- {
- label_Clients_Num.Text = data.Count.ToString();
- });
-
- if (data.Connect)
- {
- //---
- }
- else
- {
- //---
- }
- }
-
- private void VisualReceiveCallback(object o)
- {
- NetServerVisual.ReceiveData data = (NetServerVisual.ReceiveData)o;
-
- foreach (Drone d in AllDrones)
- {
- Drone.DataVisual v = d.GetVisual();
-
- try { data.Client.Send(Drone.getBytes(v)); }
- catch { }
- }
- }
-
- private void button_Visual_Start_Click(object sender, EventArgs e)
- {
- var done = netServerVisual.StartServer((int)numericUpDown_Visual_Port.Value, (int)numericUpDown_Visual_Limit.Value, VisualConnectionCallback, VisualReceiveCallback);
- switch (done)
- {
- case NetServerVisual.ServerState.Error:
- {
- MessageBox.Show("Error to start visual server", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- break;
- }
- case NetServerVisual.ServerState.Start:
- {
- button_Visual_Start.Text = "Stop";
- button_Visual_Start.BackColor = Color.LimeGreen;
- break;
- }
- case NetServerVisual.ServerState.Stop:
- {
- label_Visual_Num.Text = "0";
- button_Visual_Start.Text = "Start";
- button_Visual_Start.BackColor = Color.Transparent;
- break;
- }
- }
- }
- }
}