예제 #1
0
 public async static Task<FlightPlanViewModel> CreateAsync(FlightPlan flightPlan)
 {
     var fpvm = new FlightPlanViewModel(App.DataSourceManager);
     fpvm.flightPlan = flightPlan;
     await fpvm.LoadWaypoints();
     
     return fpvm;
 }
예제 #2
0
        public async static Task <FlightPlanViewModel> CreateAsync(FlightPlan flightPlan)
        {
            var fpvm = new FlightPlanViewModel(App.DataSourceManager);

            fpvm.flightPlan = flightPlan;
            await fpvm.LoadWaypoints();

            return(fpvm);
        }
        private async void LoadFlightPlans()
        {
            var fpSource = this.SourceManager.DataSources[DataSourceContentType.FlightPlans] as FlightPlanSource;
            await fpSource.LoadAsync();

            this.FlightPlans = new ObservableCollection <FlightPlanViewModel>();

            foreach (var fp in fpSource.FlightPlans)
            {
                this.FlightPlans.Add(await FlightPlanViewModel.CreateAsync(fp));
            }
        }