private async Task TryUpdateWptAndAirportsAndSaveOptions() { var wptList = TryLoadWpts(); if (wptList != null) { var airportList = TryLoadAirports(); if (airportList != null && TrySaveOptions()) { // Successful await tracksForm.Update(wptList, airportList); Close(); } } }
// Only called when nav data path changes. private async Task TryUpdateWptAndAirportsAndSaveOptions() { var wptList = TryLoadWpts(); if (wptList != null) { var airportList = TryLoadAirports(); if (airportList != null && TrySaveOptions()) { // Successful await tracksForm.Update(wptList, airportList); NavDataLocationChanged?.Invoke(this, EventArgs.Empty); Close(); } } }