private void Planner_TabIndexChanged(object sender, EventArgs e) { if (ConfigTabs.SelectedTab == TabSetup) { if (!MainV2.comPort.BaseStream.IsOpen) { MessageBox.Show("Please Connect First"); ConfigTabs.SelectedIndex = 0; } else { Setup.Setup temp = new Setup.Setup(); temp.Configuration = this; MainV2.fixtheme(temp); temp.ShowDialog(); startup = true; processToScreen(); startup = false; } } }
private void BUT_Joystick_Click(object sender, EventArgs e) { Form joy = new JoystickSetup(); MainV2.fixtheme(joy); joy.Show(); }
private void BUT_logbrowse_Click(object sender, EventArgs e) { Form logbrowse = new LogBrowse(); MainV2.fixtheme(logbrowse); logbrowse.ShowDialog(); }
private void BUT_setup_Click(object sender, EventArgs e) { Form temp = new Setup.Setup(); MainV2.fixtheme(temp); temp.ShowDialog(); }
private void BUT_compare_Click(object sender, EventArgs e) { Hashtable param2 = new Hashtable(); OpenFileDialog ofd = new OpenFileDialog(); ofd.AddExtension = true; ofd.DefaultExt = ".param"; ofd.RestoreDirectory = true; ofd.Filter = "Param List|*.param;*.parm"; DialogResult dr = ofd.ShowDialog(); if (dr == DialogResult.OK) { StreamReader sr = new StreamReader(ofd.OpenFile()); while (!sr.EndOfStream) { string line = sr.ReadLine(); if (line.Contains("NOTE:")) { MessageBox.Show(line, "Saved Note"); } int index = line.IndexOf(','); if (index == -1) { continue; } string name = line.Substring(0, index); float value = float.Parse(line.Substring(index + 1), new System.Globalization.CultureInfo("en-US")); MAVLink.modifyParamForDisplay(true, name, ref value); if (name == "SYSID_SW_MREV") { continue; } if (name == "WP_TOTAL") { continue; } if (name == "CMD_TOTAL") { continue; } param2[name] = value; } sr.Close(); ParamCompare temp = new ParamCompare(this, param, param2); MainV2.fixtheme(temp); temp.ShowDialog(); } }
private void Logs_Click(object sender, EventArgs e) { Form Log = new Log(); MainV2.fixtheme(Log); inlogview = true; Log.ShowDialog(); inlogview = false; }