public DialogEditWP(Waypoint_Path_Gen wpg, GMAP gmap, int path_index, int wp_index) { _wpg = wpg; _gmap = gmap; _wp_index = wp_index; _path = _wpg.PathAt(path_index); _wp_list = _path.waypoints; _wp = _wp_list.ElementAt(wp_index); InitializeComponent(); txtWPIndex.Text = Convert.ToString(wp_index); txtwplat.Text = Convert.ToString(_wp.lat); txtwplon.Text = Convert.ToString(_wp.lon); txtwpalt.Text = Convert.ToString(_wp.alt); txtwphead.Text = Convert.ToString(_wp.head); txtwpcurvesize.Text = Convert.ToString(_wp.curvesize); txtwprotdirection.Text = Convert.ToString(_wp.rotationdir); txtwpgimblemode.Text = Convert.ToString(_wp.gimblemode); txtgimblepitch.Text = Convert.ToString(_wp.gimblepitch); trkHeading.Value = Convert.ToInt16(_wp.head); trkCurveSize.Value = Convert.ToInt16(_wp.curvesize); for (int i = 0; i < _wpg.ActionCount(); i++) { cmbActions.Items.Add(_wpg.ActionAt(i).name); } cmbActions.SelectedIndex = 0; }
public DialogActions(Waypoint_Path_Gen wpg) { _wpg = wpg; InitializeComponent(); int count = _wpg.ActionCount(); Models.Action action; string name; cmbActionsList.Items.Clear(); //cmbActionsWaypoints.Items.Clear(); for (int i = 0; i < count; i++) { action = _wpg.ActionAt(i); name = action.name; cmbActionsList.Items.Add(name); //cmbActionsWaypoints.Items.Add(name); } txtNewActionName.Text = ""; cmbAction1.SelectedIndex = 0; cmbAction2.SelectedIndex = 0; cmbAction3.SelectedIndex = 0; cmbAction4.SelectedIndex = 0; cmbAction5.SelectedIndex = 0; cmbAction6.SelectedIndex = 0; cmbAction7.SelectedIndex = 0; cmbAction8.SelectedIndex = 0; cmbAction9.SelectedIndex = 0; cmbAction10.SelectedIndex = 0; cmbAction11.SelectedIndex = 0; cmbAction12.SelectedIndex = 0; cmbAction13.SelectedIndex = 0; cmbAction14.SelectedIndex = 0; cmbAction15.SelectedIndex = 0; txtActionParam1.Text = "-1"; txtActionParam2.Text = "-1"; txtActionParam3.Text = "-1"; txtActionParam4.Text = "-1"; txtActionParam5.Text = "-1"; txtActionParam6.Text = "-1"; txtActionParam7.Text = "-1"; txtActionParam8.Text = "-1"; txtActionParam9.Text = "-1"; txtActionParam10.Text = "-1"; txtActionParam11.Text = "-1"; txtActionParam12.Text = "-1"; txtActionParam13.Text = "-1"; txtActionParam14.Text = "-1"; txtActionParam15.Text = "-1"; }
private void Update_Actioncmb() { int count = _wpg.ActionCount(); Models.Action action; string name; cmbActionsWaypoints.Items.Clear(); for (int i = 0; i < count; i++) { action = _wpg.ActionAt(i); name = action.name; cmbActionsWaypoints.Items.Add(name); } //cmbActionsList.SelectedIndex = 0; }