protected void onAutofill(object sender, EventArgs e) { if (this.AutoFill != null) { int takeoffSpeed = Convert.ToInt32(rblTakeOffSpeed.SelectedValue, CultureInfo.InvariantCulture); AutoFillOptions afo = new AutoFillOptions() { TimeZoneOffset = mfbTimeZone1.TimeZoneOffset, TakeOffSpeed = takeoffSpeed, LandingSpeed = AutoFillOptions.BestLandingSpeedForTakeoffSpeed(takeoffSpeed), IncludeHeliports = ckIncludeHeliports.Checked, AutoSynthesizePath = ckEstimateNight.Checked, Night = (AutoFillOptions.NightCritera)Enum.Parse(typeof(AutoFillOptions.NightCritera), rblNightCriteria.SelectedValue, true), NightLanding = (AutoFillOptions.NightLandingCriteria)Enum.Parse(typeof(AutoFillOptions.NightLandingCriteria), rblNightLandingCriteria.SelectedValue, true), RoundToTenth = ckRoundNearest10th.Checked, IgnoreErrors = true }; afo.ToCookies(Response.Cookies); string szTelemetry = Telemetry; // Load from the DB if needed if (String.IsNullOrEmpty(szTelemetry) && !LogbookEntry.IsNewFlightID(FlightID)) { szTelemetry = new LogbookEntry(FlightID, Page.User.Identity.Name, LogbookEntry.LoadTelemetryOption.LoadAll).FlightData; } this.AutoFill(this, new AutofillEventArgs(afo, szTelemetry)); } }
protected void ProcessImages(int idFlight) { if (!LogbookEntry.IsNewFlightID(idFlight)) { mfbFlightImages.Key = mfbMFUFlightImages.ImageKey = idFlight.ToString(CultureInfo.InvariantCulture); mfbMFUFlightImages.ProcessUploadedImages(); mfbFlightImages.Refresh(); } }
protected void onAutofill(object sender, EventArgs e) { if (this.AutoFill != null) { string szTelemetry = Telemetry; // Load from the DB if needed if (String.IsNullOrEmpty(szTelemetry) && !LogbookEntry.IsNewFlightID(FlightID)) { szTelemetry = new LogbookEntry(FlightID, Page.User.Identity.Name, LogbookEntry.LoadTelemetryOption.LoadAll).FlightData; } afOptions.TimeZoneOffset = mfbTimeZone1.TimeZoneOffset; this.AutoFill(this, new AutofillEventArgs(afOptions.Options, szTelemetry)); afOptions.Options.SaveForUser(Page.User.Identity.Name); } }
public void SetPrevFlight(int idFlight) { if (idFlight == LogbookEntry.idFlightNone) { divUpdatePrev.Visible = false; hdnPrevID.Value = string.Empty; } else { popmenuCommitAndNavigate.Visible = (!LogbookEntry.IsNewFlightID(FlightID) || !String.IsNullOrEmpty(hdnPendingID.Value)); // need to set master visibility so that the next line can work; issue #458 - suppress pop menu for clone/reverse (essentially new flights) divUpdatePrev.Visible = true; hdnPrevID.Value = idFlight.ToString(CultureInfo.InvariantCulture); } popmenuCommitAndNavigate.Visible = divUpdateNext.Visible || divUpdatePrev.Visible; }