private void FrmSetPlaneParam_Load(object sender, EventArgs e) { //this.comboBoxEdit2.SelectedIndex = 0; //this.comboBoxEdit3.SelectedIndex = 0; try { //相对高度 _Position61 = dynamicObj.Position; pRouteWaypoints61 = dynamicObj.Waypoints;//路点 IRouteWaypoint61 pRouteWaypoint = this.pRouteWaypoints61[0] as IRouteWaypoint61; spinEdit2.Value = Convert.ToDecimal(pRouteWaypoint.Speed); spinEdit1.Value = Convert.ToDecimal(dynamicObj.TurnSpeed); this.spinEdit4.Value = Convert.ToDecimal(pRouteWaypoint.Altitude); if (this.dynamicObj.DynamicType == DynamicObjectType.DYNAMIC_VIRTUAL) { this.comboBoxEdit2.SelectedIndex = 0; this.Model = false; comboBoxEdit3.Enabled = false; } else { this.comboBoxEdit2.SelectedIndex = 1; this.Model = true; comboBoxEdit3.Enabled = true; } if (this.dynamicObj.MotionStyle == DynamicMotionStyle.MOTION_AIRPLANE) { this.comboBoxEdit3.SelectedIndex = 1; } else if (this.dynamicObj.MotionStyle == DynamicMotionStyle.MOTION_HELICOPTER) { this.comboBoxEdit3.SelectedIndex = 2; } else if (this.dynamicObj.MotionStyle == DynamicMotionStyle.MOTION_GROUND_VEHICLE) { this.comboBoxEdit3.SelectedIndex = 0; } } catch (Exception) { } }
private void FrmSetPlaneParam_Load(object sender, EventArgs e) { //this.comboBoxEdit2.SelectedIndex = 0; //this.comboBoxEdit3.SelectedIndex = 0; try { //相对高度 _Position61 = dynamicObj.Position; pRouteWaypoints61 = dynamicObj.Waypoints;//路点 IRouteWaypoint61 pRouteWaypoint = this.pRouteWaypoints61[0] as IRouteWaypoint61; spinEdit2.Value = Convert.ToDecimal(pRouteWaypoint.Speed); spinEdit1.Value = Convert.ToDecimal(dynamicObj.TurnSpeed); this.spinEdit4.Value = Convert.ToDecimal(pRouteWaypoint.Altitude); if (this.dynamicObj.DynamicType == DynamicObjectType.DYNAMIC_VIRTUAL) { this.comboBoxEdit2.SelectedIndex = 0; this.Model = false; comboBoxEdit3.Enabled = false; } else { this.comboBoxEdit2.SelectedIndex = 1; this.Model = true; comboBoxEdit3.Enabled = true; } if (this.dynamicObj.MotionStyle == DynamicMotionStyle.MOTION_AIRPLANE) { this.comboBoxEdit3.SelectedIndex = 1; } else if (this.dynamicObj.MotionStyle == DynamicMotionStyle.MOTION_HELICOPTER) { this.comboBoxEdit3.SelectedIndex = 2; } else if (this.dynamicObj.MotionStyle == DynamicMotionStyle.MOTION_GROUND_VEHICLE) { this.comboBoxEdit3.SelectedIndex = 0; } } catch (Exception) { } }