Example #1
0
 public FlightPlanViewModelDesign()
 {
     PlanPointsViewModel = new PlanPointsPartViewModelDesign(false);
     PlanPointsViewModel.ParentFlightPlan = this;
     FlightPlan = new Model.FlightPlanModel();
     HasError   = false;
 }
Example #2
0
        public static FlightPlanModel FromCoreFlightPlan(Core.FlightPlan flightPlan)
        {
            var model = new FlightPlanModel();

            model._flightPlan  = flightPlan;
            model._origin      = flightPlan.Origin;
            model._destination = flightPlan.Destination;

            if (flightPlan.Waipoints != null)
            {
                var waypoints = flightPlan.Waipoints.Select(wp => WaypointModel.FromCoreWaypoint(wp));
                model._waypoints = new ObservableCollection <WaypointModel>(waypoints);
            }

            return(model);
        }