public PlanSchematicViewModel(RoadwayModel_TabVM parentVM)
            : base()
        {
            parentVM_ = parentVM;
             if (parentVM_ == null) return;

             isPortWindowMoving = false;
             startMovingPoint.X = startMovingPoint.Y = 0.0;

             currentCorridor_ = parentVM_.CurrentCorridor;
             ViewScaleFeetPerInch = 100.0;
             currentCorridor_ = parentVM_.CurrentCorridor;
             AdvanceDistance = 20.0;

             AdvanceStationAheadCmd = new RelayCommand(advanceStationAhead, () => canAdvanceAhead);
             canAdvanceAhead = true;

             AdvanceStationBackCmd = new RelayCommand(advanceStationBack, () => canAdvanceBack);
             canAdvanceBack = true;

             WindowCenterY = 2000.0;

             PlanStation = "";
             PlanOffset = "";
             PlanElevation = "";
             PlanCrossSlope = "";
        }
Ejemplo n.º 2
0
        public MainWindowVM()
        {
            theRM21model = new rm21Model();
             theRM21model.allCorridors.Add(new rm21Corridor("C1"));
             theRM21model.allCorridors.Add(new rm21RoadwayCorridor("L"));
             theRM21model.allCorridors.Add(new rm21RoadwayCorridor("Y1"));

             LoadDataCmd = new RelayCommand(loadData, () => canLoadData);
             canLoadData = true;

             RoadwayModelTabVM = new RoadwayModel_TabVM(this);

             loadData();

             CurrentCorridor = theRM21model.allCorridors[1];
        }
        public CrossSectionViewModel(RoadwayModel_TabVM parentVM)
            : base()
        {
            parentVM_ = parentVM;
             if (parentVM_ == null) return;

             isPortWindowMoving = false;
             startMovingPoint.X = startMovingPoint.Y = 0.0;

             currentCorridor_ = parentVM_.CurrentCorridor;
             ViewScaleFeetPerInch = 10.0;
             currentCorridor_ = parentVM_.CurrentCorridor;
             AdvanceDistance = 4.25;

             AdvanceStationAheadCmd = new RelayCommand(advanceStationAhead, () => canAdvanceAhead);
             canAdvanceAhead = true;

             AdvanceStationBackCmd = new RelayCommand(advanceStationBack, () => canAdvanceBack);
             canAdvanceBack = true;
        }