コード例 #1
0
ファイル: OptionsForm.cs プロジェクト: pedro2555/QSimPlanner
        private async Task TryUpdateWptAndAirportsAndSaveOptions()
        {
            var wptList = TryLoadWpts();

            if (wptList != null)
            {
                var airportList = TryLoadAirports();

                if (airportList != null && TrySaveOptions())
                {
                    // Successful
                    await tracksForm.Update(wptList, airportList);

                    Close();
                }
            }
        }
コード例 #2
0
        // 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();
                }
            }
        }