public static DialogResult MessageShowAgain(string title, string promptText) { Form form = new Form(); System.Windows.Forms.Label label = new System.Windows.Forms.Label(); CheckBox chk = new CheckBox(); Controls.MyButton buttonOk = new Controls.MyButton(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2)); form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); form.Text = title; label.Text = promptText; chk.Tag = ("SHOWAGAIN_" + title.Replace(" ", "_").Replace('+', '_')); chk.AutoSize = true; chk.Text = Strings.ShowMeAgain; chk.Checked = true; chk.Location = new Point(9, 80); if (Settings.Instance.GetBoolean((string)chk.Tag) == false) // skip it { form.Dispose(); chk.Dispose(); buttonOk.Dispose(); label.Dispose(); return(DialogResult.OK); } chk.CheckStateChanged += new EventHandler(chk_CheckStateChanged); buttonOk.Text = Strings.OK; buttonOk.DialogResult = DialogResult.OK; buttonOk.Location = new Point(form.Right - 100, 80); label.SetBounds(9, 40, 372, 13); label.AutoSize = true; form.ClientSize = new Size(396, 107); form.Controls.AddRange(new Control[] { label, chk, buttonOk }); form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); form.FormBorderStyle = FormBorderStyle.FixedDialog; form.StartPosition = FormStartPosition.CenterScreen; form.MinimizeBox = false; form.MaximizeBox = false; ThemeManager.ApplyThemeTo(form); DialogResult dialogResult = form.ShowDialog(); form.Dispose(); form = null; return(dialogResult); }
public OptionForm() { InitializeComponent(); Combobox = comboBox1; Button1 = myButton1; Button2 = myButton2; }
/* #if (FRAME_CONFIG == QUAD_FRAME) MAV_TYPE_QUADROTOR, #elif (FRAME_CONFIG == TRI_FRAME) MAV_TYPE_TRICOPTER, #elif (FRAME_CONFIG == HEXA_FRAME || FRAME_CONFIG == Y6_FRAME) MAV_TYPE_HEXAROTOR, #elif (FRAME_CONFIG == OCTA_FRAME || FRAME_CONFIG == OCTA_QUAD_FRAME) MAV_TYPE_OCTOROTOR, #elif (FRAME_CONFIG == HELI_FRAME) MAV_TYPE_HELICOPTER, #elif (FRAME_CONFIG == SINGLE_FRAME) //because mavlink did not define a singlecopter, we use a rocket MAV_TYPE_ROCKET, #elif (FRAME_CONFIG == COAX_FRAME) //because mavlink did not define a singlecopter, we use a rocket MAV_TYPE_ROCKET, #else #error Unrecognised frame type #endif*/ public void Activate() { int x = 20; int y = 40; int motormax = 8; if (!MainV2.comPort.MAV.param.ContainsKey("FRAME")) { this.Enabled = false; return; } HIL.Motor[] motors = new HIL.Motor[0]; if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.TRICOPTER) { motormax = 4; motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.TRICOPTER, (int)(float)MainV2.comPort.MAV.param["FRAME"]); } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.QUADROTOR) { motormax = 4; motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.QUADROTOR, (int)(float)MainV2.comPort.MAV.param["FRAME"]); } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HEXAROTOR) { motormax = 6; motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.HEXAROTOR, (int)(float)MainV2.comPort.MAV.param["FRAME"]); } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.OCTOROTOR) { motormax = 8; motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.OCTOROTOR, (int)(float)MainV2.comPort.MAV.param["FRAME"]); } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HELICOPTER) { motormax = 0; } for (int a = 1; a <= motormax; a++) { MyButton but = new MyButton(); but.Text = "Test motor " + (char)((a-1) + 'A'); but.Location = new Point(x,y); but.Click += but_Click; but.Tag = a; this.Controls.Add(but); y += 25; } }
void doButtontoUI(string name, int x, int y) { MyLabel lbl = new MyLabel(); ComboBox cmbbutton = new ComboBox(); Controls.MyButton mybut = new Controls.MyButton(); HorizontalProgressBar hbar = new HorizontalProgressBar(); ComboBox cmbaction = new ComboBox(); // do this here so putting in text works this.Controls.AddRange(new Control[] { lbl, cmbbutton, mybut, hbar, cmbaction }); lbl.Location = new Point(x, y); lbl.Size = new Size(47, 13); lbl.Text = "Button " + name; cmbbutton.Location = new Point(72, y); cmbbutton.Size = new Size(70, 21); cmbbutton.DataSource = getButtonNumbers(); cmbbutton.DropDownStyle = ComboBoxStyle.DropDownList; cmbbutton.Name = "cmbbutton" + name; if (MainV2.config["butno" + name] != null) { cmbbutton.Text = (MainV2.config["butno" + name].ToString()); } cmbbutton.SelectedIndexChanged += new EventHandler(cmbbutton_SelectedIndexChanged); mybut.Location = new Point(BUT_detch1.Left, y); mybut.Size = BUT_detch1.Size; mybut.Text = BUT_detch1.Text; mybut.Name = "mybut" + name; mybut.Click += new EventHandler(BUT_detbutton_Click); hbar.Location = new Point(progressBar1.Left, y); hbar.Size = progressBar1.Size; hbar.Name = "hbar" + name; cmbaction.Location = new Point(hbar.Right + 5, y); cmbaction.Size = new Size(100, 21); cmbaction.DataSource = Common.getModesList(MainV2.comPort.MAV.cs); cmbaction.ValueMember = "Key"; cmbaction.DisplayMember = "Value"; cmbaction.DropDownStyle = ComboBoxStyle.DropDownList; cmbaction.Name = "cmbaction" + name; if (MainV2.config["butaction" + name] != null) { cmbaction.Text = MainV2.config["butaction" + name].ToString(); } this.Height += 25; }
/* #if (FRAME_CONFIG == QUAD_FRAME) MAV_TYPE_QUADROTOR, #elif (FRAME_CONFIG == TRI_FRAME) MAV_TYPE_TRICOPTER, #elif (FRAME_CONFIG == HEXA_FRAME || FRAME_CONFIG == Y6_FRAME) MAV_TYPE_HEXAROTOR, #elif (FRAME_CONFIG == OCTA_FRAME || FRAME_CONFIG == OCTA_QUAD_FRAME) MAV_TYPE_OCTOROTOR, #elif (FRAME_CONFIG == HELI_FRAME) MAV_TYPE_HELICOPTER, #elif (FRAME_CONFIG == SINGLE_FRAME) //because mavlink did not define a singlecopter, we use a rocket MAV_TYPE_ROCKET, #elif (FRAME_CONFIG == COAX_FRAME) //because mavlink did not define a singlecopter, we use a rocket MAV_TYPE_ROCKET, #else #error Unrecognised frame type #endif*/ public void Activate() { var x = 20; var y = 40; var motormax = this.get_motormax(); MyButton but; for (var a = 1; a <= motormax; a++) { but = new MyButton(); but.Text = "Test motor " + (char) ((a - 1) + 'A'); but.Location = new Point(x, y); but.Click += but_Click; but.Tag = a; Controls.Add(but); y += 25; } but = new MyButton(); but.Text = "Test all motors"; but.Location = new Point(x, y); but.Size = new Size(75, 37); but.Click += but_TestAll; Controls.Add(but); y += 39; but = new MyButton(); but.Text = "Stop all motors"; but.Location = new Point(x, y); but.Size = new Size(75, 37); but.Click += but_StopAll; Controls.Add(but); y += 39; but = new MyButton(); but.Text = "Test all in Sequence"; but.Location = new Point(x, y); but.Size = new Size(75, 37); but.Click += but_TestAllSeq; Controls.Add(but); Utilities.ThemeManager.ApplyThemeTo(this); }
public void Activate() { int x = 20; int y = 40; int motormax = 8; //HIL.Motor.build_motors(""); if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.QUADROTOR) { motormax = 4; } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HEXAROTOR) { motormax = 6; } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.OCTOROTOR) { motormax = 8; } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.TRICOPTER) { motormax = 3; } else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HELICOPTER) { motormax = 0; } for (int a = 1; a <= motormax; a++) { MyButton but = new MyButton(); but.Text = "Test motor " + a; but.Location = new Point(x,y); but.Click += but_Click; but.Tag = a; this.Controls.Add(but); y += 25; } }
private void flightPlannerToolStripMenuItem_Click(object sender, EventArgs e) { foreach (Control ctl in splitContainer1.Panel2.Controls) { ctl.Visible = false; } foreach (MainSwitcher.Screen sc in MainV2.View.screens) { if (sc.Name == "FlightPlanner") { MyButton but = new MyButton { Location = new Point(splitContainer1.Panel2.Width/2, 0), Text = "Close" }; but.Click += but_Click; splitContainer1.Panel2.Controls.Add(but); splitContainer1.Panel2.Controls.Add(sc.Control); ThemeManager.ApplyThemeTo(sc.Control); sc.Control.Dock = DockStyle.Fill; sc.Control.Visible = true; if (sc.Control is IActivate) { ((IActivate) (sc.Control)).Activate(); } but.BringToFront(); break; } } }
/// <summary> /// The template xml for the screen /// </summary> /// <param name="FileName"></param> public void LoadXML(string FileName) { int x = 20; int y = 0; int optionx = 300; int optiony = 0; string name = ""; List<string> paramname = new List<string>(); double rangemin = 0; double rangemax = 10; double step = 0.001; using (XmlReader reader = XmlReader.Create(FileName)) { while (reader.Read()) { switch (reader.Name.ToUpper()) { case "ITEM": break; case "HEAD": y += 30; string heading = reader.ReadString(); Label lbl = new Label(); lbl.AutoSize = true; lbl.Text = heading; lbl.Location = new Point(x,y); lbl.Font = new Font(FontFamily.GenericSansSerif, 15,FontStyle.Bold); this.Controls.Add(lbl); Controls.MyButton but = new Controls.MyButton(); but.Text = "Save"; but.Location = new Point(optionx + 100, y); but.Click += new EventHandler(but_Click); this.Controls.Add(but); y = lbl.Location.Y + lbl.Height + 10; LineSeparator ls = new LineSeparator(); ls.Width = this.Width - 40; ls.Location = new Point(x,y); ls.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.Controls.Add(ls); y = ls.Location.Y + ls.Height; break; case "SUBHEAD": y += 15; optiony = y; optionx = 300; string subhead = reader.ReadString(); Label lbl2 = new Label(); lbl2.AutoSize = true; lbl2.Text = subhead; lbl2.Location = new Point(x,y); lbl2.Font = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold); this.Controls.Add(lbl2); y = lbl2.Location.Y + lbl2.Height; break; case "DESC": y += 2; string desc = reader.ReadString(); Label lbl3 = new Label(); lbl3.AutoSize = true; lbl3.Text = AddNewLinesToText(desc); lbl3.Location = new Point(x,y); lbl3.Font = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold); this.Controls.Add(lbl3); y = lbl3.Location.Y + lbl3.Height; break; case "FIELDS": if (reader.NodeType == XmlNodeType.EndElement) { if (optiony > y) y = optiony; } break; case "FIELD": if (reader.NodeType == XmlNodeType.EndElement) { if (name == "" || paramname.Count == 0) break; Label lbl5 = new Label(); //lbl5.AutoSize = true; lbl5.Text = name; lbl5.Location = new Point(optionx, optiony); lbl5.Size = new System.Drawing.Size(90,20); lbl5.Font = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold); lbl5.TextAlign = ContentAlignment.MiddleRight; this.Controls.Add(lbl5); NumericUpDown nud = new NumericUpDown(); nud.Location = new Point(optionx + 100, optiony); nud.Size = new System.Drawing.Size(78,20); nud.Maximum = (decimal)rangemax; nud.Minimum = (decimal)rangemin; nud.Increment = (decimal)step; nud.DecimalPlaces = (int)(step.ToString().Length - step.ToString(new System.Globalization.CultureInfo("en-US")).IndexOf('.') -1); nud.Name = paramname[0]; this.Controls.Add(nud); optiony += nud.Height; _linkedParams[paramname[0]] = paramname; } else { name = ""; paramname = new List<string>(); rangemax = 10; rangemin = 0; step = 0.001; } break; case "NAME": name = reader.ReadString(); break; case "PARAMNAME": paramname.Add(reader.ReadString()); break; case "RANGEMIN": rangemin = double.Parse(reader.ReadString(), new System.Globalization.CultureInfo("en-US")); break; case "RANGEMAX": rangemax = double.Parse(reader.ReadString(), new System.Globalization.CultureInfo("en-US")); break; case "STEP": step = double.Parse(reader.ReadString(), new System.Globalization.CultureInfo("en-US")); break; } } } ThemeManager.ApplyThemeTo(this); disableNumericUpDownControls(this); }
public static DialogResult MessageShowAgain(string title, string promptText) { Form form = new Form(); System.Windows.Forms.Label label = new System.Windows.Forms.Label(); CheckBox chk = new CheckBox(); Controls.MyButton buttonOk = new Controls.MyButton(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2)); form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); form.Text = title; label.Text = promptText; chk.Tag = ("SHOWAGAIN_" + title.Replace(" ", "_")); chk.AutoSize = true; chk.Text = "Show me again?"; chk.Checked = true; chk.Location = new Point(9, 80); if (MainV2.config[(string)chk.Tag] != null && (string)MainV2.config[(string)chk.Tag] == "False") // skip it { form.Dispose(); chk.Dispose(); buttonOk.Dispose(); label.Dispose(); return DialogResult.OK; } chk.CheckStateChanged += new EventHandler(chk_CheckStateChanged); buttonOk.Text = "OK"; buttonOk.DialogResult = DialogResult.OK; buttonOk.Location = new Point(form.Right - 100, 80); label.SetBounds(9, 40, 372, 13); label.AutoSize = true; form.ClientSize = new Size(396, 107); form.Controls.AddRange(new Control[] { label, chk, buttonOk }); form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); form.FormBorderStyle = FormBorderStyle.FixedDialog; form.StartPosition = FormStartPosition.CenterScreen; form.MinimizeBox = false; form.MaximizeBox = false; ThemeManager.ApplyThemeTo(form); DialogResult dialogResult = form.ShowDialog(); form.Dispose(); form = null; return dialogResult; }
static DialogResult ShowUI(string title, string promptText, string value, bool password = false) { Form form = new Form(); Label label = new Label(); TextBox textBox = new TextBox(); if (password) { textBox.UseSystemPasswordChar = true; } MyButton buttonOk = new MyButton(); MyButton buttonCancel = new MyButton(); //System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2)); //form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); // Suspend form layout. form.SuspendLayout(); const int yMargin = 10; // // label // var y = 20; label.AutoSize = true; label.Location = new Point(9, y); label.Size = new Size(372, 13); label.Text = promptText; label.MaximumSize = new Size(372, 0); // // textBox // textBox.Size = new Size(372, 20); textBox.Text = value; textBox.TextChanged += textBox_TextChanged; // // buttonOk // buttonOk.Size = new Size(75, 23); buttonOk.Text = "OK"; buttonOk.DialogResult = DialogResult.OK; // // buttonCancel // buttonCancel.Size = new Size(75, 23); buttonCancel.Text = "Cancel"; buttonCancel.DialogResult = DialogResult.Cancel; // // form // form.TopMost = true; form.TopLevel = true; form.Text = title; form.ClientSize = new Size(396, 107); form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel }); form.FormBorderStyle = FormBorderStyle.FixedSingle; form.StartPosition = FormStartPosition.CenterScreen; form.MinimizeBox = false; form.MaximizeBox = false; form.AcceptButton = buttonOk; form.CancelButton = buttonCancel; // Resume form layout form.ResumeLayout(false); form.PerformLayout(); // Adjust the location of textBox, buttonOk, buttonCancel based on the content of the label. y = y + label.Height + yMargin; textBox.Location = new Point(12, y); y = y + textBox.Height + yMargin; buttonOk.Location = new Point(228, y); buttonCancel.Location = new Point(309, y); // Increase the size of the form. form.ClientSize = new Size(396, y + buttonOk.Height + yMargin); if (ApplyTheme != null) { ApplyTheme(form); } Console.WriteLine("Input Box " + System.Threading.Thread.CurrentThread.Name); Application.DoEvents(); form.ShowDialog(); Console.WriteLine("Input Box 2 " + System.Threading.Thread.CurrentThread.Name); DialogResult dialogResult = form.DialogResult; if (dialogResult == DialogResult.OK) { value = textBox.Text; InputBox.value = value; } form.Dispose(); TextChanged = null; form = null; return(dialogResult); }
private void btn_docalc_Click(object sender, EventArgs e) { //Convert for sanity check prop_size = t_prop.Text.ConvertToDouble(); batt_cells = t_cellcount.Text.ConvertToDouble(); batt_cell_max_voltage = t_cellmax.Text.ConvertToDouble(); batt_cell_min_voltage = t_cellmin.Text.ConvertToDouble(); if (prop_size <= 0) { CustomMessageBox.Show("Prop size must be larger than zero.", "ERROR!"); return; } if (batt_cells < 1) { CustomMessageBox.Show("Battery cell count must be at least 1.", "ERROR!"); return; } calc_values(); if (cb_tmotor.Checked) { mot_thst_expo = 0.2; } var atc_prefix = "ATC"; var mot_prefix = "MOT"; if (MainV2.comPort.MAV.cs.firmware == Firmwares.ArduPlane) { atc_prefix = "Q_A"; mot_prefix = "Q_M"; } var new_params = new Dictionary <string, double>(); //Fill up the list of params to change new_params.Add("ACRO_YAW_P", acro_yaw_p); new_params.Add(atc_prefix + "_ACCEL_P_MAX", atc_accel_p_max); new_params.Add(atc_prefix + "_ACCEL_R_MAX", atc_accel_r_max); new_params.Add(atc_prefix + "_ACCEL_Y_MAX", atc_accel_y_max); //Filters has different name in 4.x and in 3.x if (MainV2.comPort.MAV.cs.version.Major == 4) { new_params.Add(atc_prefix + "_RAT_PIT_FLTD", atc_rat_pit_fltd); new_params.Add(atc_prefix + "_RAT_PIT_FLTE", atc_rat_pit_flte); new_params.Add(atc_prefix + "_RAT_PIT_FLTT", atc_rat_pit_fltt); new_params.Add(atc_prefix + "_RAT_RLL_FLTD", atc_rat_rll_fltd); new_params.Add(atc_prefix + "_RAT_RLL_FLTE", atc_rat_rll_flte); new_params.Add(atc_prefix + "_RAT_RLL_FLTT", atc_rat_rll_fltt); new_params.Add(atc_prefix + "_RAT_YAW_FLTD", atc_rat_yaw_fltd); new_params.Add(atc_prefix + "_RAT_YAW_FLTE", atc_rat_yaw_flte); new_params.Add(atc_prefix + "_RAT_YAW_FLTT", atc_rat_yaw_fltt); } else { new_params.Add(atc_prefix + "_RAT_PIT_FILT", atc_rat_pit_fltd); new_params.Add(atc_prefix + "_RAT_RLL_FILT", atc_rat_rll_fltd); new_params.Add(atc_prefix + "_RAT_YAW_FILT", atc_rat_yaw_flte); } new_params.Add(atc_prefix + "_THR_MIX_MAN", atc_thr_mix_man); new_params.Add("INS_ACCEL_FILTER", ins_accel_filter); new_params.Add("INS_GYRO_FILTER", ins_gyro_filter); new_params.Add(mot_prefix + "_THST_EXPO", mot_thst_expo); new_params.Add(mot_prefix + "_THST_HOVER", mot_thst_hover); new_params.Add("BATT_ARM_VOLT", batt_arm_volt); new_params.Add("BATT_CRT_VOLT", batt_crt_volt); new_params.Add("BATT_LOW_VOLT", batt_low_volt); new_params.Add(mot_prefix + "_BAT_VOLT_MAX", mot_bat_volt_max); new_params.Add(mot_prefix + "_BAT_VOLT_MIN", mot_bat_volt_min); if (cb_tmotor.Checked) { new_params.Add(mot_prefix + "_PWM_MIN", 1100); new_params.Add(mot_prefix + "_PWM_MAX", 1940); } if (cb_suggested.Checked && MainV2.comPort.MAV.cs.version.Major == 4 && (MainV2.comPort.MAV.cs.firmware != Firmwares.ArduPlane)) { new_params.Add("BATT_FS_CRT_ACT", 1); new_params.Add("BATT_FS_LOW_ACT", 2); new_params.Add("FENCE_ACTION", 3); new_params.Add("FENCE_ALT_MAX", 120); new_params.Add("FENCE_ENABLE", 1); new_params.Add("FENCE_RADIUS", 150); new_params.Add("FENCE_TYPE", 7); } Form paramCompareForm = new ParamCompare(null, MainV2.comPort.MAV.param, new_params); ThemeManager.ApplyThemeTo(paramCompareForm); MissionPlanner.Controls.MyButton button = paramCompareForm.Controls.Find("BUT_save", true).FirstOrDefault() as MissionPlanner.Controls.MyButton; button.Text = "Write to FC"; paramCompareForm.StartPosition = FormStartPosition.CenterParent; paramCompareForm.ShowDialog(); if (paramCompareForm.DialogResult == DialogResult.OK) { CustomMessageBox.Show("Initial Parameters succesfully updated.\r\nCheck parameters before flight!\r\n\r\nAfter test flight :\r\n\tSet ATC_THR_MIX_MAN to 0.5\r\n\tSet PSC_ACCZ_P to MOT_THST_HOVER\r\n\tSet PSC_ACCZ_I to 2*MOT_THST_HOVER\r\n\r\nHappy flying!", "Initial parameter calculator"); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProgressReporterDialogue)); this.progressBar1 = new MissionPlanner.Controls.MyProgressBar(); this.lblProgressMessage = new System.Windows.Forms.Label(); this.btnCancel = new MissionPlanner.Controls.MyButton(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.btnClose = new MissionPlanner.Controls.MyButton(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.imgWarning = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.imgWarning)).BeginInit(); this.SuspendLayout(); // // progressBar1 // resources.ApplyResources(this.progressBar1, "progressBar1"); this.progressBar1.BackColor = System.Drawing.Color.Transparent; this.progressBar1.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(167)))), ((int)(((byte)(42))))); this.progressBar1.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(139)))), ((int)(((byte)(26))))); this.progressBar1.Name = "progressBar1"; this.progressBar1.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(171)))), ((int)(((byte)(112))))); this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.progressBar1.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(54)))), ((int)(((byte)(8))))); // // lblProgressMessage // resources.ApplyResources(this.lblProgressMessage, "lblProgressMessage"); this.lblProgressMessage.Name = "lblProgressMessage"; // // btnCancel // resources.ApplyResources(this.btnCancel, "btnCancel"); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 2; this.btnCancel.Text = "取消"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // linkLabel1 // resources.ApplyResources(this.linkLabel1, "linkLabel1"); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "详细..."; this.linkLabel1.Visible = false; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // btnClose // resources.ApplyResources(this.btnClose, "btnClose"); this.btnClose.Name = "btnClose"; this.btnClose.Size = new System.Drawing.Size(75, 23); this.btnClose.TabIndex = 5; this.btnClose.Text = "关闭"; this.btnClose.UseVisualStyleBackColor = true; this.btnClose.Click += new System.EventHandler(this.btn_Close_Click); // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 200; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // imgWarning // resources.ApplyResources(this.imgWarning, "imgWarning"); //this.imgWarning.Image = global::MissionPlanner.Controls.Properties.Resources.iconWarning48; this.imgWarning.Image = OSD.Properties.Resources.iconWarning48; this.imgWarning.Name = "imgWarning"; this.imgWarning.TabStop = false; // // ProgressReporterDialogue // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ControlBox = false; this.Controls.Add(this.linkLabel1); this.Controls.Add(this.imgWarning); this.Controls.Add(this.lblProgressMessage); this.Controls.Add(this.progressBar1); this.Controls.Add(this.btnClose); this.Controls.Add(this.btnCancel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ProgressReporterDialogue"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "进度"; this.Load += new System.EventHandler(this.ProgressReporterDialogue_Load); ((System.ComponentModel.ISupportInitialize)(this.imgWarning)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public static DialogResult MessageShowAgain(string title, string promptText) { Form form = new Form(); System.Windows.Forms.Label label = new System.Windows.Forms.Label(); CheckBox chk = new CheckBox(); Controls.MyButton buttonOk = new Controls.MyButton(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2)); form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); string link = ""; string linktext = ""; Regex linkregex = new Regex(@"(\[link;([^\]]+);([^\]]+)\])", RegexOptions.IgnoreCase); Match match = linkregex.Match(promptText); if (match.Success) { link = match.Groups[2].Value; linktext = match.Groups[3].Value; promptText = promptText.Replace(match.Groups[1].Value, ""); } form.Text = title; label.Text = promptText; chk.Tag = ("SHOWAGAIN_" + title.Replace(" ", "_").Replace('+', '_')); chk.AutoSize = true; chk.Text = Strings.ShowMeAgain; chk.Checked = true; chk.Location = new Point(9, 80); if (Settings.Instance.ContainsKey((string)chk.Tag) && Settings.Instance.GetBoolean((string)chk.Tag) == false) // skip it { form.Dispose(); chk.Dispose(); buttonOk.Dispose(); label.Dispose(); return(DialogResult.OK); } chk.CheckStateChanged += new EventHandler(chk_CheckStateChanged); buttonOk.Text = Strings.OK; buttonOk.DialogResult = DialogResult.OK; buttonOk.Location = new Point(form.Right - 100, 80); label.SetBounds(9, 9, 372, 13); label.AutoSize = true; form.Controls.AddRange(new Control[] { label, chk, buttonOk }); if (link != "" && linktext != "") { Size textSize2 = TextRenderer.MeasureText(linktext, SystemFonts.DefaultFont); var linklbl = new LinkLabel { Left = 9, Top = label.Bottom, Width = textSize2.Width, Height = textSize2.Height, Text = linktext, Tag = link, AutoSize = true }; linklbl.Click += (sender, args) => { try { System.Diagnostics.Process.Start(((LinkLabel)sender).Tag.ToString()); } catch (Exception exception) { CustomMessageBox.Show("Failed to open link " + ((LinkLabel)sender).Tag.ToString()); } }; form.Controls.Add(linklbl); form.Width = Math.Max(form.Width, linklbl.Right + 16); } form.ClientSize = new Size(396, 107); form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); form.FormBorderStyle = FormBorderStyle.FixedDialog; form.StartPosition = FormStartPosition.CenterScreen; form.MinimizeBox = false; form.MaximizeBox = false; ThemeManager.ApplyThemeTo(form); DialogResult dialogResult = form.ShowDialog(); form.Dispose(); form = null; return(dialogResult); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.progressBar1 = new MissionPlanner.Controls.MyProgressBar(); this.lblProgressMessage = new System.Windows.Forms.Label(); this.btnCancel = new MissionPlanner.Controls.MyButton(); this.imgWarning = new System.Windows.Forms.PictureBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.btnClose = new MissionPlanner.Controls.MyButton(); this.timer1 = new System.Windows.Forms.Timer(this.components); ((System.ComponentModel.ISupportInitialize)(this.imgWarning)).BeginInit(); this.SuspendLayout(); // // progressBar1 // this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.progressBar1.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(167)))), ((int)(((byte)(42))))); this.progressBar1.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(139)))), ((int)(((byte)(26))))); this.progressBar1.Location = new System.Drawing.Point(11, 90); this.progressBar1.Name = "progressBar1"; this.progressBar1.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(171)))), ((int)(((byte)(112))))); this.progressBar1.Size = new System.Drawing.Size(277, 13); this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.progressBar1.TabIndex = 0; this.progressBar1.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(54)))), ((int)(((byte)(8))))); // // lblProgressMessage // this.lblProgressMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblProgressMessage.Location = new System.Drawing.Point(13, 13); this.lblProgressMessage.Name = "lblProgressMessage"; this.lblProgressMessage.Size = new System.Drawing.Size(275, 74); this.lblProgressMessage.TabIndex = 1; this.lblProgressMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // btnCancel // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.Location = new System.Drawing.Point(213, 109); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(75, 23); this.btnCancel.TabIndex = 2; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // imgWarning // this.imgWarning.Image = global::MissionPlanner.Controls.Properties.Resources.iconWarning48; this.imgWarning.Location = new System.Drawing.Point(13, 22); this.imgWarning.Name = "imgWarning"; this.imgWarning.Size = new System.Drawing.Size(48, 48); this.imgWarning.TabIndex = 3; this.imgWarning.TabStop = false; this.imgWarning.Visible = false; // // linkLabel1 // this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.linkLabel1.AutoSize = true; this.linkLabel1.Location = new System.Drawing.Point(240, 90); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(48, 13); this.linkLabel1.TabIndex = 4; this.linkLabel1.TabStop = true; this.linkLabel1.Text = "Details..."; this.linkLabel1.Visible = false; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // btnClose // this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnClose.Location = new System.Drawing.Point(213, 109); this.btnClose.Name = "btnClose"; this.btnClose.Size = new System.Drawing.Size(75, 23); this.btnClose.TabIndex = 5; this.btnClose.Text = "Close"; this.btnClose.UseVisualStyleBackColor = true; this.btnClose.Click += new System.EventHandler(this.btn_Close_Click); // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 200; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // ProgressReporterDialogue // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(306, 144); this.ControlBox = false; this.Controls.Add(this.btnClose); this.Controls.Add(this.linkLabel1); this.Controls.Add(this.imgWarning); this.Controls.Add(this.btnCancel); this.Controls.Add(this.lblProgressMessage); this.Controls.Add(this.progressBar1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ProgressReporterDialogue"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Progress"; this.TopMost = true; this.Load += new System.EventHandler(this.ProgressReporterDialogue_Load); ((System.ComponentModel.ISupportInitialize)(this.imgWarning)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Georefimage)); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.TXT_logfile = new System.Windows.Forms.TextBox(); this.TXT_jpgdir = new System.Windows.Forms.TextBox(); this.TXT_offsetseconds = new System.Windows.Forms.TextBox(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.TXT_outputlog = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.BUT_Geotagimages = new Controls.MyButton(); this.BUT_estoffset = new Controls.MyButton(); this.BUT_doit = new Controls.MyButton(); this.BUT_browsedir = new Controls.MyButton(); this.BUT_browselog = new Controls.MyButton(); this.NUM_latpos = new System.Windows.Forms.NumericUpDown(); this.NUM_lngpos = new System.Windows.Forms.NumericUpDown(); this.NUM_altpos = new System.Windows.Forms.NumericUpDown(); this.NUM_headingpos = new System.Windows.Forms.NumericUpDown(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.BUT_networklinkgeoref = new Controls.MyButton(); this.num_vfov = new System.Windows.Forms.NumericUpDown(); this.num_hfov = new System.Windows.Forms.NumericUpDown(); this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.num_camerarotation = new System.Windows.Forms.NumericUpDown(); this.label9 = new System.Windows.Forms.Label(); this.NUM_time = new System.Windows.Forms.NumericUpDown(); this.label10 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).BeginInit(); this.SuspendLayout(); // // openFileDialog1 // this.openFileDialog1.FileName = "openFileDialog1"; // // TXT_logfile // resources.ApplyResources(this.TXT_logfile, "TXT_logfile"); this.TXT_logfile.Name = "TXT_logfile"; this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged); // // TXT_jpgdir // resources.ApplyResources(this.TXT_jpgdir, "TXT_jpgdir"); this.TXT_jpgdir.Name = "TXT_jpgdir"; // // TXT_offsetseconds // resources.ApplyResources(this.TXT_offsetseconds, "TXT_offsetseconds"); this.TXT_offsetseconds.Name = "TXT_offsetseconds"; // // TXT_outputlog // resources.ApplyResources(this.TXT_outputlog, "TXT_outputlog"); this.TXT_outputlog.Name = "TXT_outputlog"; this.TXT_outputlog.ReadOnly = true; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // // BUT_Geotagimages // this.BUT_Geotagimages.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); this.BUT_Geotagimages.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_Geotagimages, "BUT_Geotagimages"); this.BUT_Geotagimages.Name = "BUT_Geotagimages"; this.BUT_Geotagimages.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_Geotagimages.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_Geotagimages.UseVisualStyleBackColor = true; this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click); // // BUT_estoffset // this.BUT_estoffset.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); this.BUT_estoffset.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_estoffset, "BUT_estoffset"); this.BUT_estoffset.Name = "BUT_estoffset"; this.BUT_estoffset.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_estoffset.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_estoffset.UseVisualStyleBackColor = true; this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click); // // BUT_doit // this.BUT_doit.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); this.BUT_doit.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_doit, "BUT_doit"); this.BUT_doit.Name = "BUT_doit"; this.BUT_doit.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_doit.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_doit.UseVisualStyleBackColor = true; this.BUT_doit.Click += new System.EventHandler(this.BUT_doit_Click); // // BUT_browsedir // this.BUT_browsedir.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); this.BUT_browsedir.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_browsedir, "BUT_browsedir"); this.BUT_browsedir.Name = "BUT_browsedir"; this.BUT_browsedir.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_browsedir.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_browsedir.UseVisualStyleBackColor = true; this.BUT_browsedir.Click += new System.EventHandler(this.BUT_browsedir_Click); // // BUT_browselog // this.BUT_browselog.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); this.BUT_browselog.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_browselog, "BUT_browselog"); this.BUT_browselog.Name = "BUT_browselog"; this.BUT_browselog.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_browselog.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_browselog.UseVisualStyleBackColor = true; this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click); // // NUM_latpos // resources.ApplyResources(this.NUM_latpos, "NUM_latpos"); this.NUM_latpos.Name = "NUM_latpos"; this.NUM_latpos.Value = new decimal(new int[] { 3, 0, 0, 0}); // // NUM_lngpos // resources.ApplyResources(this.NUM_lngpos, "NUM_lngpos"); this.NUM_lngpos.Name = "NUM_lngpos"; this.NUM_lngpos.Value = new decimal(new int[] { 4, 0, 0, 0}); // // NUM_altpos // resources.ApplyResources(this.NUM_altpos, "NUM_altpos"); this.NUM_altpos.Name = "NUM_altpos"; this.NUM_altpos.Value = new decimal(new int[] { 5, 0, 0, 0}); // // NUM_headingpos // resources.ApplyResources(this.NUM_headingpos, "NUM_headingpos"); this.NUM_headingpos.Name = "NUM_headingpos"; this.NUM_headingpos.Value = new decimal(new int[] { 10, 0, 0, 0}); // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; // // label4 // resources.ApplyResources(this.label4, "label4"); this.label4.Name = "label4"; // // label5 // resources.ApplyResources(this.label5, "label5"); this.label5.Name = "label5"; // // label6 // resources.ApplyResources(this.label6, "label6"); this.label6.Name = "label6"; // // BUT_networklinkgeoref // this.BUT_networklinkgeoref.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150))))); this.BUT_networklinkgeoref.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31))))); resources.ApplyResources(this.BUT_networklinkgeoref, "BUT_networklinkgeoref"); this.BUT_networklinkgeoref.Name = "BUT_networklinkgeoref"; this.BUT_networklinkgeoref.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41))))); this.BUT_networklinkgeoref.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_networklinkgeoref.UseVisualStyleBackColor = true; this.BUT_networklinkgeoref.Click += new System.EventHandler(this.BUT_networklinkgeoref_Click); // // num_vfov // resources.ApplyResources(this.num_vfov, "num_vfov"); this.num_vfov.Maximum = new decimal(new int[] { 900, 0, 0, 0}); this.num_vfov.Name = "num_vfov"; this.num_vfov.Value = new decimal(new int[] { 130, 0, 0, 0}); // // num_hfov // resources.ApplyResources(this.num_hfov, "num_hfov"); this.num_hfov.Maximum = new decimal(new int[] { 900, 0, 0, 0}); this.num_hfov.Name = "num_hfov"; this.num_hfov.Value = new decimal(new int[] { 200, 0, 0, 0}); // // label7 // resources.ApplyResources(this.label7, "label7"); this.label7.Name = "label7"; // // label8 // resources.ApplyResources(this.label8, "label8"); this.label8.Name = "label8"; // // num_camerarotation // resources.ApplyResources(this.num_camerarotation, "num_camerarotation"); this.num_camerarotation.Maximum = new decimal(new int[] { 180, 0, 0, 0}); this.num_camerarotation.Minimum = new decimal(new int[] { 180, 0, 0, -2147483648}); this.num_camerarotation.Name = "num_camerarotation"; this.num_camerarotation.Value = new decimal(new int[] { 90, 0, 0, 0}); // // label9 // resources.ApplyResources(this.label9, "label9"); this.label9.Name = "label9"; // // NUM_time // resources.ApplyResources(this.NUM_time, "NUM_time"); this.NUM_time.Name = "NUM_time"; this.NUM_time.Value = new decimal(new int[] { 2, 0, 0, 0}); // // label10 // resources.ApplyResources(this.label10, "label10"); this.label10.Name = "label10"; // // Georefimage // resources.ApplyResources(this, "$this"); this.Controls.Add(this.label10); this.Controls.Add(this.NUM_time); this.Controls.Add(this.label9); this.Controls.Add(this.num_camerarotation); this.Controls.Add(this.label8); this.Controls.Add(this.label7); this.Controls.Add(this.num_hfov); this.Controls.Add(this.num_vfov); this.Controls.Add(this.BUT_networklinkgeoref); this.Controls.Add(this.label6); this.Controls.Add(this.label5); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.NUM_headingpos); this.Controls.Add(this.NUM_altpos); this.Controls.Add(this.NUM_lngpos); this.Controls.Add(this.NUM_latpos); this.Controls.Add(this.BUT_Geotagimages); this.Controls.Add(this.BUT_estoffset); this.Controls.Add(this.label1); this.Controls.Add(this.TXT_outputlog); this.Controls.Add(this.BUT_doit); this.Controls.Add(this.TXT_offsetseconds); this.Controls.Add(this.TXT_jpgdir); this.Controls.Add(this.TXT_logfile); this.Controls.Add(this.BUT_browsedir); this.Controls.Add(this.BUT_browselog); this.Name = "Georefimage"; ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
private static void AddButtonsToForm(Form msgBoxFrm, MessageBoxButtons buttons) { Rectangle screenRectangle = msgBoxFrm.RectangleToScreen(msgBoxFrm.ClientRectangle); int titleHeight = screenRectangle.Top - msgBoxFrm.Top; var t = Type.GetType("Mono.Runtime"); if ((t != null)) titleHeight = 25; switch (buttons) { case MessageBoxButtons.OK: var but = new MyButton { Size = new Size(75, 23), Text = "确定", Left = msgBoxFrm.Width - 100 - FORM_X_MARGIN, Top = msgBoxFrm.Height - 40 - FORM_Y_MARGIN - titleHeight }; but.Click += delegate { _state = DialogResult.OK; msgBoxFrm.Close(); }; msgBoxFrm.Controls.Add(but); msgBoxFrm.AcceptButton = but; break; case MessageBoxButtons.YesNo: if (msgBoxFrm.Width < (75 * 2 + FORM_X_MARGIN * 3)) msgBoxFrm.Width = (75 * 2 + FORM_X_MARGIN * 3); var butyes = new MyButton { Size = new Size(75, 23), Text = "是", Left = msgBoxFrm.Width - 75 * 2 - FORM_X_MARGIN * 2, Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight }; butyes.Click += delegate { _state = DialogResult.Yes; msgBoxFrm.Close(); }; msgBoxFrm.Controls.Add(butyes); msgBoxFrm.AcceptButton = butyes; var butno = new MyButton { Size = new Size(75, 23), Text = "否", Left = msgBoxFrm.Width - 75 - FORM_X_MARGIN, Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight }; butno.Click += delegate { _state = DialogResult.No; msgBoxFrm.Close(); }; msgBoxFrm.Controls.Add(butno); msgBoxFrm.CancelButton = butno; break; case MessageBoxButtons.OKCancel: if (msgBoxFrm.Width < (75 * 2 + FORM_X_MARGIN * 3)) msgBoxFrm.Width = (75 * 2 + FORM_X_MARGIN * 3); var butok = new MyButton { Size = new Size(75, 23), Text = "确定", Left = msgBoxFrm.Width - 75 * 2 - FORM_X_MARGIN * 2, Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight }; butok.Click += delegate { _state = DialogResult.OK; msgBoxFrm.Close(); }; msgBoxFrm.Controls.Add(butok); msgBoxFrm.AcceptButton = butok; var butcancel = new MyButton { Size = new Size(75, 23), Text = "取消", Left = msgBoxFrm.Width - 75 - FORM_X_MARGIN, Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight }; butcancel.Click += delegate { _state = DialogResult.Cancel; msgBoxFrm.Close(); }; msgBoxFrm.Controls.Add(butcancel); msgBoxFrm.CancelButton = butcancel; break; default: throw new NotImplementedException("Only MessageBoxButtons.OK and YesNo supported at this time"); } }
//[DebuggerHidden] public override bool Init() { loopratehz = 5; MainV2.instance.Invoke((Action) delegate { sc = Host.MainForm.FlightData.Controls.Find("splitContainer1", true).FirstOrDefault() as SplitContainer; //TrackBar tb = Host.MainForm.FlightData.Controls.Find("TRK_zoom", true).FirstOrDefault() as TrackBar; //Panel pn1 = Host.MainForm.FlightData.Controls.Find("panel1", true).FirstOrDefault() as Panel; //tblMap = Host.MainForm.FlightData.Controls.Find("tableMap", true).FirstOrDefault() as TableLayoutPanel; //SplitContainer SubMainLeft = Host.MainForm.FlightData.Controls.Find("SubMainLeft", true).FirstOrDefault() as SplitContainer; //HUD hud = SubMainLeft.Panel1.Controls["hud1"] as HUD; lab = new System.Windows.Forms.Label(); lab.Name = "pLabel"; lab.Location = new System.Drawing.Point(66, 15); lab.Text = "Ez itt ?"; sc.Panel2.Controls.Add(lab); sc.Panel2.Controls.SetChildIndex(lab, 1); ahd_q = new MissionPlanner.Controls.MyButton(); ahd_ch1 = new MissionPlanner.Controls.MyButton(); ahd_ch2 = new MissionPlanner.Controls.MyButton(); ahd_ch3 = new MissionPlanner.Controls.MyButton(); ahd_ch4 = new MissionPlanner.Controls.MyButton(); int w = sc.Panel2.Width; int h = 40; int s = 30; int l = 120; ahd_q.Location = new System.Drawing.Point(w - l, h); h = h + s; ahd_q.Name = "ahd1"; ahd_q.Text = "QUAD"; ahd_q.Anchor = (AnchorStyles.Top | AnchorStyles.Right); sc.Panel2.Controls.Add(ahd_q); sc.Panel2.Controls.SetChildIndex(ahd_q, 1); ahd_q.Click += new EventHandler(this.btn_Click); ahd_ch1.Location = new System.Drawing.Point(w - l, h); h = h + s; ahd_ch1.Text = "CH1"; ahd_ch1.Name = "ahd2"; ahd_ch1.Anchor = (AnchorStyles.Top | AnchorStyles.Right); sc.Panel2.Controls.Add(ahd_ch1); sc.Panel2.Controls.SetChildIndex(ahd_ch1, 1); ahd_ch1.Click += new EventHandler(this.btn_Click); ahd_ch2.Location = new System.Drawing.Point(w - l, h); h = h + s; ahd_ch2.Text = "CH2"; ahd_ch2.Name = "ahd3"; ahd_ch2.Anchor = (AnchorStyles.Top | AnchorStyles.Right); sc.Panel2.Controls.Add(ahd_ch2); sc.Panel2.Controls.SetChildIndex(ahd_ch2, 1); ahd_ch2.Click += new EventHandler(this.btn_Click); ahd_ch3.Location = new System.Drawing.Point(w - l, h); h = h + s; ahd_ch3.Text = "CH3"; ahd_ch3.Name = "ahd4"; ahd_ch3.Anchor = (AnchorStyles.Top | AnchorStyles.Right); sc.Panel2.Controls.Add(ahd_ch3); sc.Panel2.Controls.SetChildIndex(ahd_ch3, 1); ahd_ch3.Click += new EventHandler(this.btn_Click); ahd_ch4.Location = new System.Drawing.Point(w - l, h); ahd_ch4.Text = "CH4"; ahd_ch4.Name = "ahd5"; ahd_ch4.Anchor = (AnchorStyles.Top | AnchorStyles.Right); sc.Panel2.Controls.Add(ahd_ch4); sc.Panel2.Controls.SetChildIndex(ahd_ch4, 1); ahd_ch4.Click += new EventHandler(this.btn_Click); }); AcquireJoystick("Logitech Dual Action"); return(true); }
public static void Show() { var l1 = "Your board has a Critical service bulletin"; var l2 = "To send us a report about your board, and to find out about this safety issue. Click bellow"; Form frm = new Form() { Width = 250, Height = 250, AutoSize = true }; FlowLayoutPanel flp = new FlowLayoutPanel() { Dock = DockStyle.Fill, FlowDirection = FlowDirection.TopDown }; Label lb1 = new Label() { Text = l1, AutoSize = true }; Label link = new Label() { Text = l2, AutoSize = true }; Label nameLabel = new Label() { Text = "Enter your name (optional): ", AutoSize = true }; TextBox nameTextBox = new TextBox() { Width = TextRenderer.MeasureText("thisismyname andmysurname", frm.Font).Width }; Label emailLabel = new Label() { Text = "Enter your email (optional): ", AutoSize = true }; TextBox emailTextBox = new TextBox() { Width = TextRenderer.MeasureText("*****@*****.**", frm.Font).Width }; MyButton submitButton = new MyButton() { Text = "Service Bulletin" }; frm.Controls.Add(flp); flp.Controls.Add(lb1); flp.Controls.Add(nameLabel); flp.Controls.Add(nameTextBox); flp.Controls.Add(emailLabel); flp.Controls.Add(emailTextBox); flp.Controls.Add(link); flp.Controls.Add(submitButton); submitButton.Click += (sender, args) => { var url = String.Format( "https://discuss.cubepilot.org:444/CubeSB?BRD_TYPE={0}&SerialNo={1}&INS_ACC_ID={2}&INS_ACC2_ID={3}&INS_ACC3_ID={4}&INS_GYR_ID={5}&INS_GYR2_ID={6}&INS_GYR3_ID={7}&Baro1={8}&Baro2={9}&Name={10}&Email={11}", MainV2.comPort.MAV.param["BRD_TYPE"], MainV2.comPort.MAV.SerialString, MainV2.comPort.MAV.param["INS_ACC_ID"], MainV2.comPort.MAV.param["INS_ACC2_ID"], MainV2.comPort.MAV.param["INS_ACC3_ID"], MainV2.comPort.MAV.param["INS_GYR_ID"], MainV2.comPort.MAV.param["INS_GYR2_ID"], MainV2.comPort.MAV.param["INS_GYR3_ID"], MainV2.comPort.MAV.cs.press_abs, MainV2.comPort.MAV.cs.press_abs2, nameTextBox.Text, emailTextBox.Text); System.Diagnostics.Process.Start(url); }; ThemeManager.ApplyThemeTo(frm); frm.Show(); }
static DialogResult ShowUI(string title, string promptText, string value, bool password = false) { Form form = new Form(); Label label = new Label(); TextBox textBox = new TextBox(); if (password) textBox.UseSystemPasswordChar = true; MyButton buttonOk = new MyButton(); MyButton buttonCancel = new MyButton(); //System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2)); //form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); // Suspend form layout. form.SuspendLayout(); const int yMargin = 10; // // label // var y = 20; label.AutoSize = true; label.Location = new Point(9, y); label.Size = new Size(372, 13); label.Text = promptText; label.MaximumSize = new Size(372, 0); // // textBox // textBox.Size = new Size(372, 20); textBox.Text = value; textBox.TextChanged += textBox_TextChanged; // // buttonOk // buttonOk.Size = new Size(75, 23); buttonOk.Text = "OK"; buttonOk.DialogResult = DialogResult.OK; // // buttonCancel // buttonCancel.Size = new Size(75, 23); buttonCancel.Text = "Cancel"; buttonCancel.DialogResult = DialogResult.Cancel; // // form // form.TopMost = true; form.TopLevel = true; form.Text = title; form.ClientSize = new Size(396, 107); form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel }); form.FormBorderStyle = FormBorderStyle.FixedSingle; form.StartPosition = FormStartPosition.CenterScreen; form.MinimizeBox = false; form.MaximizeBox = false; form.AcceptButton = buttonOk; form.CancelButton = buttonCancel; // Resume form layout form.ResumeLayout(false); form.PerformLayout(); // Adjust the location of textBox, buttonOk, buttonCancel based on the content of the label. y = y + label.Height + yMargin; textBox.Location = new Point(12, y); y = y + textBox.Height + yMargin; buttonOk.Location = new Point(228, y); buttonCancel.Location = new Point(309, y); // Increase the size of the form. form.ClientSize = new Size(396, y + buttonOk.Height + yMargin); if (ApplyTheme != null) ApplyTheme(form); Console.WriteLine("Input Box " + System.Threading.Thread.CurrentThread.Name); Application.DoEvents(); form.ShowDialog(); Console.WriteLine("Input Box 2 " + System.Threading.Thread.CurrentThread.Name); DialogResult dialogResult = form.DialogResult; if (dialogResult == DialogResult.OK) { value = textBox.Text; InputBox.value = value; } form.Dispose(); TextChanged = null; form = null; return dialogResult; }
public override bool Init() { loopratehz = 2; //Since the controls on FlighData are located in a different thread, we must use BeginInvoke to access them. MainV2.instance.BeginInvoke((MethodInvoker)(() => { //SplitContainer1 is hosting panel1 and panel2 where panel2 contains the map and all other controls on the map (WindDir, gps labels, zoom, joystick, etc.) FDRightSide = Host.MainForm.FlightData.Controls.Find("splitContainer1", true).FirstOrDefault() as SplitContainer; //hide direction color description labels var l = Host.MainForm.FlightData.Controls.Find("label3", true).FirstOrDefault() as Label; l.Visible = false; l = Host.MainForm.FlightData.Controls.Find("label4", true).FirstOrDefault() as Label; l.Visible = false; l = Host.MainForm.FlightData.Controls.Find("label5", true).FirstOrDefault() as Label; l.Visible = false; l = Host.MainForm.FlightData.Controls.Find("label6", true).FirstOrDefault() as Label; l.Visible = false; //Create a new label to display debug info (this is not the label which display ground and air tension forces, it is used only for debug purposes) lDebugInfo = new System.Windows.Forms.Label(); lDebugInfo.Name = "lDebugInfo"; //This is a good approximate position beside the wind direction and below the distance bar lDebugInfo.Location = new System.Drawing.Point(66, 45); lDebugInfo.Text = "TensionerDebugInfo"; lDebugInfo.AutoSize = true; //Add to Panel2 and bring forward to display above the gMap FDRightSide.Panel2.Controls.Add(lDebugInfo); FDRightSide.Panel2.Controls.SetChildIndex(lDebugInfo, 1); lPullForce = new Label(); lPullForce.Name = "lbl_PullForce"; lPullForce.Location = new System.Drawing.Point(0, FDRightSide.Panel2.Height - 160); lPullForce.Text = "000"; lPullForce.AutoSize = true; lPullForce.Font = new Font("Tahoma", 45, FontStyle.Bold); lPullForce.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); FDRightSide.Panel2.Controls.Add(lPullForce); FDRightSide.Panel2.Controls.SetChildIndex(lPullForce, 1); System.Windows.Forms.ToolStripMenuItem men = new System.Windows.Forms.ToolStripMenuItem() { Text = "Tensioner Settings" }; men.Click += settings_Click; Host.FDMenuMap.Items.Add(men); btnReleaseServoOpen = new MissionPlanner.Controls.MyButton(); btnReleaseServoOpen.Location = new System.Drawing.Point(0, FDRightSide.Panel2.Height - 185); btnReleaseServoOpen.Name = "btnReleaseServoOpen"; btnReleaseServoOpen.Text = "Cable release"; btnReleaseServoOpen.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); FDRightSide.Panel2.Controls.Add(btnReleaseServoOpen); FDRightSide.Panel2.Controls.SetChildIndex(btnReleaseServoOpen, 2); btnReleaseServoOpen.Click += new EventHandler(this.btnReleaseServoOpen_Click); btnReleaseServoClose = new MissionPlanner.Controls.MyButton(); btnReleaseServoClose.Location = new System.Drawing.Point(0, FDRightSide.Panel2.Height - 75); btnReleaseServoClose.Name = "btnReleaseServoClose"; btnReleaseServoClose.Text = "Close hook"; btnReleaseServoClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); FDRightSide.Panel2.Controls.Add(btnReleaseServoClose); FDRightSide.Panel2.Controls.SetChildIndex(btnReleaseServoClose, 2); btnReleaseServoClose.Click += new EventHandler(this.btnReleaseServoClose_Click); btnLandingGearUp = new MissionPlanner.Controls.MyButton(); btnLandingGearUp.Location = new System.Drawing.Point(0, FDRightSide.Panel2.Height - 340); btnLandingGearUp.Name = "btnLandingGearUp"; btnLandingGearUp.Text = "LG UP"; btnLandingGearUp.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); FDRightSide.Panel2.Controls.Add(btnLandingGearUp); FDRightSide.Panel2.Controls.SetChildIndex(btnLandingGearUp, 2); btnLandingGearUp.Click += new EventHandler(this.BtnLandingGearUp_Click); btnLandingGearDown = new MissionPlanner.Controls.MyButton(); btnLandingGearDown.Location = new System.Drawing.Point(0, FDRightSide.Panel2.Height - 300); btnLandingGearDown.Name = "btnLandingGearDown"; btnLandingGearDown.Text = "LG DOWN"; btnLandingGearDown.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left); FDRightSide.Panel2.Controls.Add(btnLandingGearDown); FDRightSide.Panel2.Controls.SetChildIndex(btnLandingGearDown, 2); btnLandingGearDown.Click += new EventHandler(this.BtnLandingGearDown_Click); })); //Check settings and save back (in case there are no initial values in config.xml urlTensionerAddress = Host.config["TensionerURL", "http://localhost/data.xml"]; Host.config["TensionerURL"] = urlTensionerAddress; webTimeoutMs = Host.config.GetInt32("TensionerWebTimeout", 50); Host.config["TensionerWebTimeout"] = webTimeoutMs.ToString(); bSafetyDisconnetEnable = Host.config.GetBoolean("TensionerSafetyDisconnectEnable", true); Host.config["TensionerSafetyDisconnectEnable"] = bSafetyDisconnetEnable.ToString(); safetyDisconnectDelay = Host.config.GetInt32("TensionerSafetyDisconnectDelay", 3000); Host.config["TensionerSafetyDisconnectDelay"] = safetyDisconnectDelay.ToString(); safetyDisconnectForce = Host.config.GetInt32("TensionerSafetyDisconnectForce", 140); Host.config["TensionerSafetyDisconnectForce"] = safetyDisconnectForce.ToString(); releaseServo = Host.config.GetInt32("TensionerReleaseServoNo", 10); Host.config["TensionerReleaseServoNo"] = releaseServo.ToString(); releaseServoClose = Host.config.GetInt32("TensionerReleaseServoClosed", 1200); Host.config["TensionerReleaseServoClosed"] = releaseServoClose.ToString(); releaseServoOpen = Host.config.GetInt32("TensionerReleaseServoOpen", 1950); Host.config["TensionerReleaseServoOpen"] = releaseServoOpen.ToString(); yellowLimit = Host.config.GetInt32("TensionerYellowWarningLimit", 50); Host.config["TensionerYellowWarningLimit"] = yellowLimit.ToString(); redLimit = Host.config.GetInt32("TensionerRedWarningLimit", 60); Host.config["TensionerRedWarningLimit"] = redLimit.ToString(); altLimit = Host.config.GetInt32("TensionerAltitudeLimit", 15); Host.config["TensionerAltitudeLimit"] = altLimit.ToString(); bDebugEnabled = Host.config.GetBoolean("TensionerTensionerDebug", false); Host.config["TensionerTensionerDebug"] = bDebugEnabled.ToString(); landingGearServo = Host.config.GetInt32("TensionerLGServoNo", 9); Host.config["TensionerLGServoNo"] = landingGearServo.ToString(); landingGearServoUp = Host.config.GetInt32("TensionerLGServoUP", 1900); Host.config["TensionerLGServoUP"] = landingGearServoUp.ToString(); landingGearServoDown = Host.config.GetInt32("TensionerLGServoDOWN", 1100); Host.config["TensionerLGServoDOWN"] = landingGearServoDown.ToString(); return(true); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Georefimage)); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.TXT_logfile = new System.Windows.Forms.TextBox(); this.TXT_jpgdir = new System.Windows.Forms.TextBox(); this.TXT_offsetseconds = new System.Windows.Forms.TextBox(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.TXT_outputlog = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.BUT_Geotagimages = new MissionPlanner.Controls.MyButton(); this.BUT_estoffset = new MissionPlanner.Controls.MyButton(); this.BUT_doit = new MissionPlanner.Controls.MyButton(); this.BUT_browsedir = new MissionPlanner.Controls.MyButton(); this.BUT_browselog = new MissionPlanner.Controls.MyButton(); this.NUM_latpos = new System.Windows.Forms.NumericUpDown(); this.NUM_lngpos = new System.Windows.Forms.NumericUpDown(); this.NUM_altpos = new System.Windows.Forms.NumericUpDown(); this.NUM_ATT_Heading = new System.Windows.Forms.NumericUpDown(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.BUT_networklinkgeoref = new MissionPlanner.Controls.MyButton(); this.NUM_time = new System.Windows.Forms.NumericUpDown(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.RDIO_TimeOffset = new System.Windows.Forms.RadioButton(); this.RDIO_CAMMsgSynchro = new System.Windows.Forms.RadioButton(); this.PANEL_TIME_OFFSET = new System.Windows.Forms.Panel(); this.label13 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.NUM_CAM_Alt = new System.Windows.Forms.NumericUpDown(); this.label15 = new System.Windows.Forms.Label(); this.NUM_CAM_Lon = new System.Windows.Forms.NumericUpDown(); this.NUM_CAM_Lat = new System.Windows.Forms.NumericUpDown(); this.label16 = new System.Windows.Forms.Label(); this.PANEL_CAM = new System.Windows.Forms.Panel(); this.NUM_CAM_Week = new System.Windows.Forms.NumericUpDown(); this.label26 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.NUM_ATT_Roll = new System.Windows.Forms.NumericUpDown(); this.label25 = new System.Windows.Forms.Label(); this.NUM_ATT_Pitch = new System.Windows.Forms.NumericUpDown(); this.label24 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); this.NUM_GPS_Week = new System.Windows.Forms.NumericUpDown(); this.panel1 = new System.Windows.Forms.Panel(); this.NUM_CAM_Time = new System.Windows.Forms.NumericUpDown(); this.label22 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); this.NUM_GPS_AMSL_Alt = new System.Windows.Forms.NumericUpDown(); this.label20 = new System.Windows.Forms.Label(); this.NUM_CAM_Pitch = new System.Windows.Forms.NumericUpDown(); this.label19 = new System.Windows.Forms.Label(); this.NUM_CAM_Roll = new System.Windows.Forms.NumericUpDown(); this.label18 = new System.Windows.Forms.Label(); this.NUM_CAM_Heading = new System.Windows.Forms.NumericUpDown(); this.label17 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.num_camerarotation = new System.Windows.Forms.NumericUpDown(); this.label8 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.num_hfov = new System.Windows.Forms.NumericUpDown(); this.num_vfov = new System.Windows.Forms.NumericUpDown(); this.panel3 = new System.Windows.Forms.Panel(); this.CHECK_AMSLAlt_Use = new System.Windows.Forms.CheckBox(); this.PANEL_SHUTTER_LAG = new System.Windows.Forms.Panel(); this.TXT_shutterLag = new System.Windows.Forms.TextBox(); this.label27 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Heading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).BeginInit(); this.PANEL_TIME_OFFSET.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Alt)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Lon)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Lat)).BeginInit(); this.PANEL_CAM.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Week)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Roll)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Pitch)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_GPS_Week)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Time)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_GPS_AMSL_Alt)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Pitch)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Roll)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Heading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).BeginInit(); this.panel3.SuspendLayout(); this.PANEL_SHUTTER_LAG.SuspendLayout(); this.SuspendLayout(); // // openFileDialog1 // this.openFileDialog1.FileName = "openFileDialog1"; // // TXT_logfile // resources.ApplyResources(this.TXT_logfile, "TXT_logfile"); this.TXT_logfile.Name = "TXT_logfile"; this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged); // // TXT_jpgdir // resources.ApplyResources(this.TXT_jpgdir, "TXT_jpgdir"); this.TXT_jpgdir.Name = "TXT_jpgdir"; // // TXT_offsetseconds // resources.ApplyResources(this.TXT_offsetseconds, "TXT_offsetseconds"); this.TXT_offsetseconds.Name = "TXT_offsetseconds"; // // TXT_outputlog // resources.ApplyResources(this.TXT_outputlog, "TXT_outputlog"); this.TXT_outputlog.Name = "TXT_outputlog"; this.TXT_outputlog.ReadOnly = true; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // // BUT_Geotagimages // resources.ApplyResources(this.BUT_Geotagimages, "BUT_Geotagimages"); this.BUT_Geotagimages.Name = "BUT_Geotagimages"; this.BUT_Geotagimages.UseVisualStyleBackColor = true; this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click); // // BUT_estoffset // resources.ApplyResources(this.BUT_estoffset, "BUT_estoffset"); this.BUT_estoffset.Name = "BUT_estoffset"; this.BUT_estoffset.UseVisualStyleBackColor = true; this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click); // // BUT_doit // resources.ApplyResources(this.BUT_doit, "BUT_doit"); this.BUT_doit.Name = "BUT_doit"; this.BUT_doit.UseVisualStyleBackColor = true; this.BUT_doit.Click += new System.EventHandler(this.BUT_doit_Click); // // BUT_browsedir // resources.ApplyResources(this.BUT_browsedir, "BUT_browsedir"); this.BUT_browsedir.Name = "BUT_browsedir"; this.BUT_browsedir.UseVisualStyleBackColor = true; this.BUT_browsedir.Click += new System.EventHandler(this.BUT_browsedir_Click); // // BUT_browselog // resources.ApplyResources(this.BUT_browselog, "BUT_browselog"); this.BUT_browselog.Name = "BUT_browselog"; this.BUT_browselog.UseVisualStyleBackColor = true; this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click); // // NUM_latpos // resources.ApplyResources(this.NUM_latpos, "NUM_latpos"); this.NUM_latpos.Name = "NUM_latpos"; this.NUM_latpos.Value = new decimal(new int[] { 6, 0, 0, 0}); this.NUM_latpos.ValueChanged += new System.EventHandler(this.NUM_latpos_ValueChanged); // // NUM_lngpos // resources.ApplyResources(this.NUM_lngpos, "NUM_lngpos"); this.NUM_lngpos.Name = "NUM_lngpos"; this.NUM_lngpos.Value = new decimal(new int[] { 7, 0, 0, 0}); this.NUM_lngpos.ValueChanged += new System.EventHandler(this.NUM_lngpos_ValueChanged); // // NUM_altpos // resources.ApplyResources(this.NUM_altpos, "NUM_altpos"); this.NUM_altpos.Name = "NUM_altpos"; this.NUM_altpos.Value = new decimal(new int[] { 8, 0, 0, 0}); this.NUM_altpos.ValueChanged += new System.EventHandler(this.NUM_altpos_ValueChanged); // // NUM_ATT_Heading // resources.ApplyResources(this.NUM_ATT_Heading, "NUM_ATT_Heading"); this.NUM_ATT_Heading.Name = "NUM_ATT_Heading"; this.NUM_ATT_Heading.Value = new decimal(new int[] { 10, 0, 0, 0}); this.NUM_ATT_Heading.ValueChanged += new System.EventHandler(this.NUM_ATT_Heading_ValueChanged); // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; // // label4 // resources.ApplyResources(this.label4, "label4"); this.label4.Name = "label4"; // // label5 // resources.ApplyResources(this.label5, "label5"); this.label5.Name = "label5"; // // BUT_networklinkgeoref // resources.ApplyResources(this.BUT_networklinkgeoref, "BUT_networklinkgeoref"); this.BUT_networklinkgeoref.Name = "BUT_networklinkgeoref"; this.BUT_networklinkgeoref.UseVisualStyleBackColor = true; this.BUT_networklinkgeoref.Click += new System.EventHandler(this.BUT_networklinkgeoref_Click); // // NUM_time // resources.ApplyResources(this.NUM_time, "NUM_time"); this.NUM_time.Name = "NUM_time"; this.NUM_time.Value = new decimal(new int[] { 2, 0, 0, 0}); this.NUM_time.ValueChanged += new System.EventHandler(this.NUM_time_ValueChanged); // // label10 // resources.ApplyResources(this.label10, "label10"); this.label10.Name = "label10"; // // label11 // resources.ApplyResources(this.label11, "label11"); this.label11.Name = "label11"; // // label12 // resources.ApplyResources(this.label12, "label12"); this.label12.Name = "label12"; // // RDIO_TimeOffset // resources.ApplyResources(this.RDIO_TimeOffset, "RDIO_TimeOffset"); this.RDIO_TimeOffset.Name = "RDIO_TimeOffset"; this.RDIO_TimeOffset.UseVisualStyleBackColor = true; this.RDIO_TimeOffset.CheckedChanged += new System.EventHandler(this.ProcessType_CheckedChanged); // // RDIO_CAMMsgSynchro // resources.ApplyResources(this.RDIO_CAMMsgSynchro, "RDIO_CAMMsgSynchro"); this.RDIO_CAMMsgSynchro.Checked = true; this.RDIO_CAMMsgSynchro.Name = "RDIO_CAMMsgSynchro"; this.RDIO_CAMMsgSynchro.TabStop = true; this.RDIO_CAMMsgSynchro.UseVisualStyleBackColor = true; this.RDIO_CAMMsgSynchro.CheckedChanged += new System.EventHandler(this.ProcessType_CheckedChanged); // // PANEL_TIME_OFFSET // this.PANEL_TIME_OFFSET.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.PANEL_TIME_OFFSET.Controls.Add(this.BUT_estoffset); this.PANEL_TIME_OFFSET.Controls.Add(this.TXT_offsetseconds); this.PANEL_TIME_OFFSET.Controls.Add(this.label1); resources.ApplyResources(this.PANEL_TIME_OFFSET, "PANEL_TIME_OFFSET"); this.PANEL_TIME_OFFSET.Name = "PANEL_TIME_OFFSET"; // // label13 // resources.ApplyResources(this.label13, "label13"); this.label13.Name = "label13"; // // label14 // resources.ApplyResources(this.label14, "label14"); this.label14.Name = "label14"; // // NUM_CAM_Alt // resources.ApplyResources(this.NUM_CAM_Alt, "NUM_CAM_Alt"); this.NUM_CAM_Alt.Name = "NUM_CAM_Alt"; this.NUM_CAM_Alt.Value = new decimal(new int[] { 5, 0, 0, 0}); this.NUM_CAM_Alt.ValueChanged += new System.EventHandler(this.NUM_CAM_Alt_ValueChanged); // // label15 // resources.ApplyResources(this.label15, "label15"); this.label15.Name = "label15"; // // NUM_CAM_Lon // resources.ApplyResources(this.NUM_CAM_Lon, "NUM_CAM_Lon"); this.NUM_CAM_Lon.Name = "NUM_CAM_Lon"; this.NUM_CAM_Lon.Value = new decimal(new int[] { 4, 0, 0, 0}); this.NUM_CAM_Lon.ValueChanged += new System.EventHandler(this.NUM_CAM_Lon_ValueChanged); // // NUM_CAM_Lat // resources.ApplyResources(this.NUM_CAM_Lat, "NUM_CAM_Lat"); this.NUM_CAM_Lat.Name = "NUM_CAM_Lat"; this.NUM_CAM_Lat.Value = new decimal(new int[] { 3, 0, 0, 0}); this.NUM_CAM_Lat.ValueChanged += new System.EventHandler(this.NUM_CAM_Lat_ValueChanged); // // label16 // resources.ApplyResources(this.label16, "label16"); this.label16.Name = "label16"; // // PANEL_CAM // this.PANEL_CAM.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.PANEL_CAM.Controls.Add(this.NUM_CAM_Week); this.PANEL_CAM.Controls.Add(this.label26); this.PANEL_CAM.Controls.Add(this.panel2); this.PANEL_CAM.Controls.Add(this.NUM_ATT_Roll); this.PANEL_CAM.Controls.Add(this.label25); this.PANEL_CAM.Controls.Add(this.NUM_ATT_Pitch); this.PANEL_CAM.Controls.Add(this.label24); this.PANEL_CAM.Controls.Add(this.label6); this.PANEL_CAM.Controls.Add(this.label23); this.PANEL_CAM.Controls.Add(this.NUM_GPS_Week); this.PANEL_CAM.Controls.Add(this.panel1); this.PANEL_CAM.Controls.Add(this.NUM_latpos); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Time); this.PANEL_CAM.Controls.Add(this.NUM_lngpos); this.PANEL_CAM.Controls.Add(this.label22); this.PANEL_CAM.Controls.Add(this.label10); this.PANEL_CAM.Controls.Add(this.label21); this.PANEL_CAM.Controls.Add(this.NUM_altpos); this.PANEL_CAM.Controls.Add(this.NUM_GPS_AMSL_Alt); this.PANEL_CAM.Controls.Add(this.NUM_time); this.PANEL_CAM.Controls.Add(this.label20); this.PANEL_CAM.Controls.Add(this.NUM_ATT_Heading); this.PANEL_CAM.Controls.Add(this.label2); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Pitch); this.PANEL_CAM.Controls.Add(this.label3); this.PANEL_CAM.Controls.Add(this.label19); this.PANEL_CAM.Controls.Add(this.label4); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Roll); this.PANEL_CAM.Controls.Add(this.label5); this.PANEL_CAM.Controls.Add(this.label18); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Heading); this.PANEL_CAM.Controls.Add(this.label17); this.PANEL_CAM.Controls.Add(this.label16); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Lat); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Lon); this.PANEL_CAM.Controls.Add(this.label15); this.PANEL_CAM.Controls.Add(this.NUM_CAM_Alt); this.PANEL_CAM.Controls.Add(this.label14); this.PANEL_CAM.Controls.Add(this.label13); resources.ApplyResources(this.PANEL_CAM, "PANEL_CAM"); this.PANEL_CAM.Name = "PANEL_CAM"; // // NUM_CAM_Week // resources.ApplyResources(this.NUM_CAM_Week, "NUM_CAM_Week"); this.NUM_CAM_Week.Name = "NUM_CAM_Week"; this.NUM_CAM_Week.Value = new decimal(new int[] { 2, 0, 0, 0}); this.NUM_CAM_Week.ValueChanged += new System.EventHandler(this.NUM_CAM_Week_ValueChanged); // // label26 // resources.ApplyResources(this.label26, "label26"); this.label26.Name = "label26"; // // panel2 // this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; resources.ApplyResources(this.panel2, "panel2"); this.panel2.Name = "panel2"; // // NUM_ATT_Roll // resources.ApplyResources(this.NUM_ATT_Roll, "NUM_ATT_Roll"); this.NUM_ATT_Roll.Name = "NUM_ATT_Roll"; this.NUM_ATT_Roll.Value = new decimal(new int[] { 10, 0, 0, 0}); this.NUM_ATT_Roll.ValueChanged += new System.EventHandler(this.NUM_ATT_Roll_ValueChanged); // // label25 // resources.ApplyResources(this.label25, "label25"); this.label25.Name = "label25"; // // NUM_ATT_Pitch // resources.ApplyResources(this.NUM_ATT_Pitch, "NUM_ATT_Pitch"); this.NUM_ATT_Pitch.Name = "NUM_ATT_Pitch"; this.NUM_ATT_Pitch.Value = new decimal(new int[] { 10, 0, 0, 0}); this.NUM_ATT_Pitch.ValueChanged += new System.EventHandler(this.NUM_ATT_Pitch_ValueChanged); // // label24 // resources.ApplyResources(this.label24, "label24"); this.label24.Name = "label24"; // // label6 // resources.ApplyResources(this.label6, "label6"); this.label6.Name = "label6"; // // label23 // resources.ApplyResources(this.label23, "label23"); this.label23.Name = "label23"; // // NUM_GPS_Week // resources.ApplyResources(this.NUM_GPS_Week, "NUM_GPS_Week"); this.NUM_GPS_Week.Name = "NUM_GPS_Week"; this.NUM_GPS_Week.Value = new decimal(new int[] { 3, 0, 0, 0}); this.NUM_GPS_Week.ValueChanged += new System.EventHandler(this.NUM_GPS_Week_ValueChanged); // // panel1 // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // // NUM_CAM_Time // resources.ApplyResources(this.NUM_CAM_Time, "NUM_CAM_Time"); this.NUM_CAM_Time.Name = "NUM_CAM_Time"; this.NUM_CAM_Time.Value = new decimal(new int[] { 1, 0, 0, 0}); this.NUM_CAM_Time.ValueChanged += new System.EventHandler(this.NUM_CAM_Time_ValueChanged); // // label22 // resources.ApplyResources(this.label22, "label22"); this.label22.Name = "label22"; // // label21 // resources.ApplyResources(this.label21, "label21"); this.label21.Name = "label21"; // // NUM_GPS_AMSL_Alt // resources.ApplyResources(this.NUM_GPS_AMSL_Alt, "NUM_GPS_AMSL_Alt"); this.NUM_GPS_AMSL_Alt.Name = "NUM_GPS_AMSL_Alt"; this.NUM_GPS_AMSL_Alt.Value = new decimal(new int[] { 9, 0, 0, 0}); this.NUM_GPS_AMSL_Alt.ValueChanged += new System.EventHandler(this.NUM_GPS_AMSL_Alt_ValueChanged); // // label20 // resources.ApplyResources(this.label20, "label20"); this.label20.Name = "label20"; // // NUM_CAM_Pitch // resources.ApplyResources(this.NUM_CAM_Pitch, "NUM_CAM_Pitch"); this.NUM_CAM_Pitch.Name = "NUM_CAM_Pitch"; this.NUM_CAM_Pitch.Value = new decimal(new int[] { 8, 0, 0, 0}); this.NUM_CAM_Pitch.ValueChanged += new System.EventHandler(this.NUM_CAM_Pitch_ValueChanged); // // label19 // resources.ApplyResources(this.label19, "label19"); this.label19.Name = "label19"; // // NUM_CAM_Roll // resources.ApplyResources(this.NUM_CAM_Roll, "NUM_CAM_Roll"); this.NUM_CAM_Roll.Name = "NUM_CAM_Roll"; this.NUM_CAM_Roll.Value = new decimal(new int[] { 7, 0, 0, 0}); this.NUM_CAM_Roll.ValueChanged += new System.EventHandler(this.NUM_CAM_Roll_ValueChanged); // // label18 // resources.ApplyResources(this.label18, "label18"); this.label18.Name = "label18"; // // NUM_CAM_Heading // resources.ApplyResources(this.NUM_CAM_Heading, "NUM_CAM_Heading"); this.NUM_CAM_Heading.Name = "NUM_CAM_Heading"; this.NUM_CAM_Heading.Value = new decimal(new int[] { 6, 0, 0, 0}); this.NUM_CAM_Heading.ValueChanged += new System.EventHandler(this.NUM_CAM_Heading_ValueChanged); // // label17 // resources.ApplyResources(this.label17, "label17"); this.label17.Name = "label17"; // // label9 // resources.ApplyResources(this.label9, "label9"); this.label9.Name = "label9"; // // num_camerarotation // resources.ApplyResources(this.num_camerarotation, "num_camerarotation"); this.num_camerarotation.Maximum = new decimal(new int[] { 180, 0, 0, 0}); this.num_camerarotation.Minimum = new decimal(new int[] { 180, 0, 0, -2147483648}); this.num_camerarotation.Name = "num_camerarotation"; this.num_camerarotation.Value = new decimal(new int[] { 90, 0, 0, 0}); // // label8 // resources.ApplyResources(this.label8, "label8"); this.label8.Name = "label8"; // // label7 // resources.ApplyResources(this.label7, "label7"); this.label7.Name = "label7"; // // num_hfov // resources.ApplyResources(this.num_hfov, "num_hfov"); this.num_hfov.Maximum = new decimal(new int[] { 900, 0, 0, 0}); this.num_hfov.Name = "num_hfov"; this.num_hfov.Value = new decimal(new int[] { 200, 0, 0, 0}); // // num_vfov // resources.ApplyResources(this.num_vfov, "num_vfov"); this.num_vfov.Maximum = new decimal(new int[] { 900, 0, 0, 0}); this.num_vfov.Name = "num_vfov"; this.num_vfov.Value = new decimal(new int[] { 130, 0, 0, 0}); // // panel3 // this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel3.Controls.Add(this.CHECK_AMSLAlt_Use); this.panel3.Controls.Add(this.label8); this.panel3.Controls.Add(this.label9); this.panel3.Controls.Add(this.num_vfov); this.panel3.Controls.Add(this.num_camerarotation); this.panel3.Controls.Add(this.num_hfov); this.panel3.Controls.Add(this.label7); resources.ApplyResources(this.panel3, "panel3"); this.panel3.Name = "panel3"; // // CHECK_AMSLAlt_Use // resources.ApplyResources(this.CHECK_AMSLAlt_Use, "CHECK_AMSLAlt_Use"); this.CHECK_AMSLAlt_Use.Checked = true; this.CHECK_AMSLAlt_Use.CheckState = System.Windows.Forms.CheckState.Checked; this.CHECK_AMSLAlt_Use.Name = "CHECK_AMSLAlt_Use"; this.CHECK_AMSLAlt_Use.UseVisualStyleBackColor = true; this.CHECK_AMSLAlt_Use.CheckedChanged += new System.EventHandler(this.CHECK_AMSLAlt_Use_CheckedChanged); // // PANEL_SHUTTER_LAG // this.PANEL_SHUTTER_LAG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.PANEL_SHUTTER_LAG.Controls.Add(this.TXT_shutterLag); this.PANEL_SHUTTER_LAG.Controls.Add(this.label27); resources.ApplyResources(this.PANEL_SHUTTER_LAG, "PANEL_SHUTTER_LAG"); this.PANEL_SHUTTER_LAG.Name = "PANEL_SHUTTER_LAG"; // // TXT_shutterLag // resources.ApplyResources(this.TXT_shutterLag, "TXT_shutterLag"); this.TXT_shutterLag.Name = "TXT_shutterLag"; this.TXT_shutterLag.TextChanged += new System.EventHandler(this.TXT_shutterLag_TextChanged); // // label27 // resources.ApplyResources(this.label27, "label27"); this.label27.Name = "label27"; // // Georefimage // resources.ApplyResources(this, "$this"); this.Controls.Add(this.PANEL_SHUTTER_LAG); this.Controls.Add(this.panel3); this.Controls.Add(this.PANEL_CAM); this.Controls.Add(this.PANEL_TIME_OFFSET); this.Controls.Add(this.RDIO_CAMMsgSynchro); this.Controls.Add(this.RDIO_TimeOffset); this.Controls.Add(this.label12); this.Controls.Add(this.label11); this.Controls.Add(this.BUT_networklinkgeoref); this.Controls.Add(this.BUT_Geotagimages); this.Controls.Add(this.TXT_outputlog); this.Controls.Add(this.BUT_doit); this.Controls.Add(this.TXT_jpgdir); this.Controls.Add(this.TXT_logfile); this.Controls.Add(this.BUT_browsedir); this.Controls.Add(this.BUT_browselog); this.Name = "Georefimage"; ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Heading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).EndInit(); this.PANEL_TIME_OFFSET.ResumeLayout(false); this.PANEL_TIME_OFFSET.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Alt)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Lon)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Lat)).EndInit(); this.PANEL_CAM.ResumeLayout(false); this.PANEL_CAM.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Week)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Roll)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Pitch)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_GPS_Week)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Time)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_GPS_AMSL_Alt)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Pitch)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Roll)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Heading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).EndInit(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); this.PANEL_SHUTTER_LAG.ResumeLayout(false); this.PANEL_SHUTTER_LAG.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
// Main void do_parameters(object sender, EventArgs e) { var new_params = new Dictionary <string, double>(); double prop = 9; double cellcount = 4; double cellmax = 4.2; double cellmin = 3.3; //Add intro and some warnings CustomMessageBox.Show("This plugin will calculate some initial parameters based on battery and prop size for a new copter setup.\r\n\r\n" + "Please make sure that before running this plugin and updating calculated parameters:\r\n" + "ALL INITIAL SETUPS ARE DONE (Calibrations, frame settings, motor tests)\r\n" + "BATTERY VOLTAGE MONITORING IS SET AND WORKING\r\n\r\n" + "Note: INS_GYRO_FILTER with a value other than 20 is optional and probably only for small frames/props " + "At first you can keep it at 20\r\n", "Initial Parameter Calculator"); //Check environment if (!Host.cs.connected) { CustomMessageBox.Show("Please connect first!", "Initial paremeter calculator", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (Host.cs.firmware != ArduPilot.Firmwares.ArduCopter2) { CustomMessageBox.Show("Initial parameter calculation works with Arducopter only!", "Initial paremeter calculator", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } // Get input parameters if (MissionPlanner.Controls.InputBox.Show("Initial parameter calculator", "Enter airscrew size in inch", ref prop) != DialogResult.OK) { return; } if (MissionPlanner.Controls.InputBox.Show("Initial parameter calculator", "Enter battery cellcount", ref cellcount) != DialogResult.OK) { return; } if (MissionPlanner.Controls.InputBox.Show("Initial parameter calculator", "Enter battery cell fully charged voltage\r\nLiPo - 4.2, LipoHV - 4.35, LiIon - 4.1 or 4.2", ref cellmax) != DialogResult.OK) { return; } if (MissionPlanner.Controls.InputBox.Show("Initial parameter calculator", "Enter battery cell fully discharged voltage\r\nLiPo/LipoHV - 3.3, LiIon - 2.8", ref cellmin) != DialogResult.OK) { return; } //Ok we have all input and we are connected to an ArduCopter //Convert for sanity check prop_size = prop.ConvertToDouble(); batt_cells = cellcount.ConvertToDouble(); batt_cell_max_voltage = cellmax.ConvertToDouble(); batt_cell_min_voltage = cellmin.ConvertToDouble(); if (prop_size <= 0 || batt_cells < 1) { CustomMessageBox.Show("Invalid input data!", "Initial paremeter calculator", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } //Do calculation calc_values(); //Fill up the list of params to change new_params.Add("ACRO_YAW_P", acro_yaw_p); new_params.Add("ATC_ACCEL_P_MAX", atc_accel_p_max); new_params.Add("ATC_ACCEL_R_MAX", atc_accel_r_max); new_params.Add("ATC_ACCEL_Y_MAX", atc_accel_y_max); //Filters has different name in 4.x and in 3.x if (Host.cs.version.Major == 4) { new_params.Add("ATC_RAT_PIT_FLTD", atc_rat_pit_fltd); new_params.Add("ATC_RAT_PIT_FLTE", atc_rat_pit_flte); new_params.Add("ATC_RAT_PIT_FLTT", atc_rat_pit_fltt); new_params.Add("ATC_RAT_RLL_FLTD", atc_rat_rll_fltd); new_params.Add("ATC_RAT_RLL_FLTE", atc_rat_rll_flte); new_params.Add("ATC_RAT_RLL_FLTT", atc_rat_rll_fltt); new_params.Add("ATC_RAT_YAW_FLTD", atc_rat_yaw_fltd); new_params.Add("ATC_RAT_YAW_FLTE", atc_rat_yaw_flte); new_params.Add("ATC_RAT_YAW_FLTT", atc_rat_yaw_fltt); } else { new_params.Add("ATC_RAT_PIT_FILT", atc_rat_pit_fltd); new_params.Add("ATC_RAT_RLL_FILT", atc_rat_rll_fltd); new_params.Add("ATC_RAT_YAW_FILT", atc_rat_yaw_flte); } new_params.Add("ATC_THR_MIX_MAN", atc_thr_mix_man); new_params.Add("INS_ACCEL_FILTER", ins_accel_filter); new_params.Add("INS_GYRO_FILTER", ins_gyro_filter); new_params.Add("MOT_THST_EXPO", mot_thst_expo); new_params.Add("MOT_THST_HOVER", mot_thst_hover); new_params.Add("BATT_ARM_VOLT", batt_arm_volt); new_params.Add("BATT_CRT_VOLT", batt_crt_volt); new_params.Add("BATT_LOW_VOLT", batt_low_volt); new_params.Add("MOT_BAT_VOLT_MAX", mot_bat_volt_max); new_params.Add("MOT_BAT_VOLT_MIN", mot_bat_volt_min); Form paramCompareForm = new ParamCompare(null, MainV2.comPort.MAV.param, new_params); ThemeManager.ApplyThemeTo(paramCompareForm); button = paramCompareForm.Controls.Find("BUT_save", true).FirstOrDefault() as MissionPlanner.Controls.MyButton; button.Text = "Write to FC"; paramCompareForm.ShowDialog(); CustomMessageBox.Show("Initial Parameters succesfully updated.\r\nCheck parameters before flight!\r\n\r\nAfter test flight :\r\n\tSet ATC_THR_MIX_MAN to 0.5\r\n\tSet PSC_ACCZ_P to MOT_THST_HOVER\r\n\tSet PSC_ACCZ_I to 2*MOT_THST_HOVER\r\n\r\nHappy flying!", "Initial parameter calculator"); }
void doButtontoUI(string name, int x, int y) { MyLabel lbl = new MyLabel(); ComboBox cmbbutton = new ComboBox(); Controls.MyButton mybut = new Controls.MyButton(); HorizontalProgressBar hbar = new HorizontalProgressBar(); ComboBox cmbaction = new ComboBox(); // do this here so putting in text works this.Controls.AddRange(new Control[] { lbl, cmbbutton, mybut, hbar, cmbaction }); lbl.Location = new Point(x, y); lbl.Size = new Size(47, 13); lbl.Text = "Button " + name; cmbbutton.Location = new Point(72, y); cmbbutton.Size = new Size(70, 21); cmbbutton.DataSource = getButtonNumbers(); cmbbutton.DropDownStyle = ComboBoxStyle.DropDownList; cmbbutton.Name = "cmbbutton" + name; if (MainV2.config["butno" + name] != null) cmbbutton.Text = (MainV2.config["butno" + name].ToString()); cmbbutton.SelectedIndexChanged += new EventHandler(cmbbutton_SelectedIndexChanged); mybut.Location = new Point(BUT_detch1.Left, y); mybut.Size = BUT_detch1.Size; mybut.Text = BUT_detch1.Text; mybut.Name = "mybut" + name; mybut.Click += new EventHandler(BUT_detbutton_Click); hbar.Location = new Point(progressBar1.Left, y); hbar.Size = progressBar1.Size; hbar.Name = "hbar" + name; cmbaction.Location = new Point(hbar.Right + 5, y); cmbaction.Size = new Size(100, 21); cmbaction.DataSource = Common.getModesList(MainV2.comPort.MAV.cs); cmbaction.ValueMember = "Key"; cmbaction.DisplayMember = "Value"; cmbaction.DropDownStyle = ComboBoxStyle.DropDownList; cmbaction.Name = "cmbaction" + name; if (MainV2.config["butaction" + name] != null) cmbaction.Text = MainV2.config["butaction" + name].ToString(); this.Height += 25; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2)); this.MainMenu = new System.Windows.Forms.MenuStrip(); this.CTX_mainmenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.autoHideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fullScreenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.readonlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MenuFlightData = new System.Windows.Forms.ToolStripButton(); this.MenuFlightPlanner = new System.Windows.Forms.ToolStripButton(); this.MenuInitConfig = new System.Windows.Forms.ToolStripButton(); this.MenuConfigTune = new System.Windows.Forms.ToolStripButton(); this.MenuSimulation = new System.Windows.Forms.ToolStripButton(); this.MenuTerminal = new System.Windows.Forms.ToolStripButton(); this.MenuHelp = new System.Windows.Forms.ToolStripButton(); this.MenuConnect = new System.Windows.Forms.ToolStripButton(); this.MenuDonate = new System.Windows.Forms.ToolStripMenuItem(); this.menu = new MissionPlanner.Controls.MyButton(); this.panel1 = new System.Windows.Forms.Panel(); this.connectionOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.CTX_mainmenu.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // MainMenu // this.MainMenu.ContextMenuStrip = this.CTX_mainmenu; this.MainMenu.GripMargin = new System.Windows.Forms.Padding(0); this.MainMenu.ImageScalingSize = new System.Drawing.Size(0, 0); this.MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.MenuFlightData, this.MenuFlightPlanner, this.MenuInitConfig, this.MenuConfigTune, this.MenuSimulation, this.MenuTerminal, this.MenuHelp, this.MenuConnect, this.MenuDonate}); resources.ApplyResources(this.MainMenu, "MainMenu"); this.MainMenu.Name = "MainMenu"; this.MainMenu.Stretch = false; this.MainMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.MainMenu_ItemClicked); this.MainMenu.MouseLeave += new System.EventHandler(this.MainMenu_MouseLeave); // // CTX_mainmenu // this.CTX_mainmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.autoHideToolStripMenuItem, this.fullScreenToolStripMenuItem, this.readonlyToolStripMenuItem, this.connectionOptionsToolStripMenuItem}); this.CTX_mainmenu.Name = "CTX_mainmenu"; resources.ApplyResources(this.CTX_mainmenu, "CTX_mainmenu"); // // autoHideToolStripMenuItem // this.autoHideToolStripMenuItem.CheckOnClick = true; this.autoHideToolStripMenuItem.Name = "autoHideToolStripMenuItem"; resources.ApplyResources(this.autoHideToolStripMenuItem, "autoHideToolStripMenuItem"); this.autoHideToolStripMenuItem.Click += new System.EventHandler(this.autoHideToolStripMenuItem_Click); // // fullScreenToolStripMenuItem // this.fullScreenToolStripMenuItem.CheckOnClick = true; this.fullScreenToolStripMenuItem.Name = "fullScreenToolStripMenuItem"; resources.ApplyResources(this.fullScreenToolStripMenuItem, "fullScreenToolStripMenuItem"); this.fullScreenToolStripMenuItem.Click += new System.EventHandler(this.fullScreenToolStripMenuItem_Click); // // readonlyToolStripMenuItem // this.readonlyToolStripMenuItem.CheckOnClick = true; this.readonlyToolStripMenuItem.Name = "readonlyToolStripMenuItem"; resources.ApplyResources(this.readonlyToolStripMenuItem, "readonlyToolStripMenuItem"); this.readonlyToolStripMenuItem.Click += new System.EventHandler(this.readonlyToolStripMenuItem_Click); // // MenuFlightData // resources.ApplyResources(this.MenuFlightData, "MenuFlightData"); this.MenuFlightData.ForeColor = System.Drawing.Color.White; this.MenuFlightData.Margin = new System.Windows.Forms.Padding(0); this.MenuFlightData.Name = "MenuFlightData"; this.MenuFlightData.Click += new System.EventHandler(this.MenuFlightData_Click); // // MenuFlightPlanner // resources.ApplyResources(this.MenuFlightPlanner, "MenuFlightPlanner"); this.MenuFlightPlanner.ForeColor = System.Drawing.Color.White; this.MenuFlightPlanner.Margin = new System.Windows.Forms.Padding(0); this.MenuFlightPlanner.Name = "MenuFlightPlanner"; this.MenuFlightPlanner.Click += new System.EventHandler(this.MenuFlightPlanner_Click); // // MenuInitConfig // resources.ApplyResources(this.MenuInitConfig, "MenuInitConfig"); this.MenuInitConfig.ForeColor = System.Drawing.Color.White; this.MenuInitConfig.Margin = new System.Windows.Forms.Padding(0); this.MenuInitConfig.Name = "MenuInitConfig"; this.MenuInitConfig.Click += new System.EventHandler(this.MenuSetup_Click); // // MenuConfigTune // resources.ApplyResources(this.MenuConfigTune, "MenuConfigTune"); this.MenuConfigTune.ForeColor = System.Drawing.Color.White; this.MenuConfigTune.Margin = new System.Windows.Forms.Padding(0); this.MenuConfigTune.Name = "MenuConfigTune"; this.MenuConfigTune.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0); this.MenuConfigTune.Click += new System.EventHandler(this.MenuTuning_Click); // // MenuSimulation // resources.ApplyResources(this.MenuSimulation, "MenuSimulation"); this.MenuSimulation.ForeColor = System.Drawing.Color.White; this.MenuSimulation.Margin = new System.Windows.Forms.Padding(0); this.MenuSimulation.Name = "MenuSimulation"; this.MenuSimulation.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); this.MenuSimulation.Click += new System.EventHandler(this.MenuSimulation_Click); // // MenuTerminal // resources.ApplyResources(this.MenuTerminal, "MenuTerminal"); this.MenuTerminal.ForeColor = System.Drawing.Color.White; this.MenuTerminal.Margin = new System.Windows.Forms.Padding(0); this.MenuTerminal.Name = "MenuTerminal"; this.MenuTerminal.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); this.MenuTerminal.Click += new System.EventHandler(this.MenuTerminal_Click); // // MenuHelp // resources.ApplyResources(this.MenuHelp, "MenuHelp"); this.MenuHelp.ForeColor = System.Drawing.Color.White; this.MenuHelp.Margin = new System.Windows.Forms.Padding(0); this.MenuHelp.Name = "MenuHelp"; this.MenuHelp.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); // // MenuConnect // this.MenuConnect.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; resources.ApplyResources(this.MenuConnect, "MenuConnect"); this.MenuConnect.ForeColor = System.Drawing.Color.White; this.MenuConnect.Margin = new System.Windows.Forms.Padding(0); this.MenuConnect.Name = "MenuConnect"; this.MenuConnect.Click += new System.EventHandler(this.MenuConnect_Click); // // toolStripConnectionControl // // // MenuDonate // resources.ApplyResources(this.MenuDonate, "MenuDonate"); this.MenuDonate.ForeColor = System.Drawing.Color.White; this.MenuDonate.Name = "MenuDonate"; this.MenuDonate.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); this.MenuDonate.Click += new System.EventHandler(this.toolStripMenuItem1_Click); // // menu // resources.ApplyResources(this.menu, "menu"); this.menu.Name = "menu"; this.menu.UseVisualStyleBackColor = true; this.menu.MouseEnter += new System.EventHandler(this.menu_MouseEnter); // // panel1 // this.panel1.BackColor = System.Drawing.Color.White; this.panel1.Controls.Add(this.MainMenu); resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; this.panel1.MouseLeave += new System.EventHandler(this.MainMenu_MouseLeave); // // connectionOptionsToolStripMenuItem // this.connectionOptionsToolStripMenuItem.Name = "connectionOptionsToolStripMenuItem"; resources.ApplyResources(this.connectionOptionsToolStripMenuItem, "connectionOptionsToolStripMenuItem"); this.connectionOptionsToolStripMenuItem.Click += new System.EventHandler(this.connectionOptionsToolStripMenuItem_Click); // // MainV2 // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; resources.ApplyResources(this, "$this"); this.Controls.Add(this.panel1); this.Controls.Add(this.menu); this.KeyPreview = true; this.MainMenuStrip = this.MainMenu; this.Name = "MainV2"; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainV2_KeyDown); this.MainMenu.ResumeLayout(false); this.MainMenu.PerformLayout(); this.CTX_mainmenu.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.ResumeLayout(false); }