예제 #1
0
 private void CompareDrivingWay(DrivingWayElement expectedDrivingWayElement, DrivingWayElement drivingWayElement)
 {
     Assert.AreEqual <DrivingWay>(expectedDrivingWayElement.DrivingWay, drivingWayElement.DrivingWay);
     Assert.AreEqual <DrivingWayFunction>(expectedDrivingWayElement.Function, drivingWayElement.Function);
     Assert.AreEqual <Direction>(expectedDrivingWayElement.Arrival, drivingWayElement.Arrival);
     Assert.AreEqual <Direction>(expectedDrivingWayElement.Departure, drivingWayElement.Departure);
 }
        public DrivingWaySettingsForm(DrivingWayElement drivingWayElement)
        {
            InitializeComponent();
            this.DrivingWay         = drivingWayElement.DrivingWay;
            this.DrivingWayFunction = drivingWayElement.Function;
            this.DirectionArrival   = drivingWayElement.Arrival;
            this.DirectionDeparture = drivingWayElement.Departure;

            this.typeComboBox.SelectedIndex               = (int)DrivingWay;
            this.arrivalComboBox.SelectedIndex            = (int)DirectionArrival;
            this.departureComboBox.SelectedIndex          = (int)DirectionDeparture;
            this.additionalFunctionComboBox.SelectedIndex = ((int)DrivingWayFunction) & (int)~BahnLib.DrivingWayFunction.Crossing;
            this.crossingCheckBox.Checked = ((int)DrivingWayFunction & (1 << 7)) != 0;
        }