private static void HandleTakeoff() { CurrentFlightReport = new FlightReport(); Mission.FlightReports.AddLast(CurrentFlightReport); if (NextMissionBattery.HasValue) { CurrentFlightReport.BatteryFlown = NextMissionBattery.Value; } TakeoffTimestamp = DateTime.Now; OnTakeoff?.Invoke(null, null); }
private static void HandleLand() { int landingTime = (int)FlightTime.Value.TotalSeconds; if (CurrentFlightReport.BatteryFlown == Battery.UNASSIGNED) { CurrentFlightReport.BatteryFlown = new GetBatteryForm().GetBattery(); } CurrentFlightReport.FlightTime = landingTime; CurrentFlightReport.FinishFlight(); OnLand?.Invoke(null, null); CurrentFlightReport = null; Mission.SaveReport(GetPossibleWords); }