public KACAlarm(String NewName, double UT, AlarmTypeEnum atype, AlarmActions aAction) : this(UT) { Name = NewName; TypeOfAlarm = atype; this.Actions = aAction.Duplicate(); }
public KACAlarm(String NewName, double UT, AlarmTypeEnum atype, AlarmActionEnum aAction) : this(UT) { Name = NewName; TypeOfAlarm = atype; AlarmAction = aAction; }
public bool Equals(AlarmTypeEnum obj) { if ((object)obj == null) { return(false); } return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value)); }
public Result <string, string> CreateAlarm(string alarmType, string name, double UT) { if (createAlarmMethod == null) { return(Result.Err <string, string>("KerbalAlarmClock addon not available")); } try { AlarmTypeEnum newAlarmType = (AlarmTypeEnum)Enum.Parse(typeof(AlarmTypeEnum), alarmType); return(Result.Ok <string, string>((string)createAlarmMethod.Invoke(actualKAC, new object[] { (Int32)newAlarmType, name, UT }))); } catch (ArgumentException) { return(Result.Err <string, string>($"Invalid alarm type {alarmType}")); } }
/// <summary> /// Create a new Alarm /// </summary> /// <param name="AlarmType">What type of alarm are we creating</param> /// <param name="Name">Name of the Alarm for the display</param> /// <param name="UT">Universal Time for the alarm</param> /// <returns>ID of the newly created alarm</returns> public String CreateAlarm(AlarmTypeEnum AlarmType, String Name, Double UT) { // Is KaC Ready? if (!this.APIReady()) { return(String.Empty); } var result = this.invoke(new System.Object[] { (Int32)AlarmType, Name, UT }); if (result != null) { return((String)result); } return(String.Empty); }
/// <summary> /// Create a new Alarm /// </summary> /// <param name="AlarmType">What type of alarm are we creating</param> /// <param name="Name">Name of the Alarm for the display</param> /// <param name="UT">Universal Time for the alarm</param> /// <returns>ID of the newly created alarm</returns> internal String CreateAlarm(AlarmTypeEnum AlarmType, String Name, Double UT) { return((String)CreateAlarmMethod.Invoke(actualKAC, new System.Object[] { (Int32)AlarmType, Name, UT })); }
public KACAlarm(String vID, String NewName, String NewNotes, double UT, Double Margin, AlarmTypeEnum atype, AlarmActions aAction, ITargetable NewTarget) : this(vID, NewName, NewNotes, UT, Margin, atype, aAction) { //Set the ITargetable proerty TargetObject = NewTarget; }
public KACAlarm(String vID, String NewName, String NewNotes, double UT, Double Margin, AlarmTypeEnum atype, AlarmActions aAction, KACXFerTarget NewTarget) : this(vID, NewName, NewNotes, UT, Margin, atype, aAction) { //Set target details XferOriginBodyName = NewTarget.Origin.bodyName; XferTargetBodyName = NewTarget.Target.bodyName; }
public KACAlarm(String vID, String NewName, String NewNotes, double UT, Double Margin, AlarmTypeEnum atype, AlarmActions aAction, List <ManeuverNode> NewManeuvers) : this(vID, NewName, NewNotes, UT, Margin, atype, aAction) { //set maneuver node ManNodes = NewManeuvers; }
public KACAlarm(String vID, String NewName, String NewNotes, double UT, Double Margin, AlarmTypeEnum atype, AlarmActions aAction) : this(vID, NewName, UT, atype, aAction) { Notes = NewNotes; AlarmMarginSecs = Margin; }
public KACAlarm(String vID, String NewName, double UT, AlarmTypeEnum atype, AlarmActions aAction) : this(NewName, UT, atype, aAction) { VesselID = vID; }
/// <summary> /// Create a new Alarm /// </summary> /// <param name="AlarmType">What type of alarm are we creating</param> /// <param name="Name">Name of the Alarm for the display</param> /// <param name="UT">Universal Time for the alarm</param> /// <returns>ID of the newly created alarm</returns> internal string CreateAlarm(AlarmTypeEnum AlarmType, string Name, double UT) { return((string)CreateAlarmMethod.Invoke(actualKAC, new object[] { (int)AlarmType, Name, UT })); }