public async static Task<FlightPlanViewModel> CreateAsync(FlightPlan flightPlan) { var fpvm = new FlightPlanViewModel(App.DataSourceManager); fpvm.flightPlan = flightPlan; await fpvm.LoadWaypoints(); return fpvm; }
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)); } }