コード例 #1
0
 public FlightPlanViewModelDesign()
 {
     PlanPointsViewModel = new PlanPointsPartViewModelDesign(false);
     PlanPointsViewModel.ParentFlightPlan = this;
     FlightPlan = new Model.FlightPlanModel();
     HasError   = false;
 }
コード例 #2
0
ファイル: FlightPlanModel.cs プロジェクト: em7/PlgToFp
        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);
        }