public TrainCopyDialog(Train t, Timetable tt) { Eto.Serialization.Xaml.XamlReader.Load(this); diffValidator = new NumberValidator(diffTextBox, false, true, errorMessage: T._("Bitte die Verschiebung als Zahl in Minuten angeben!")); countValidator = new NumberValidator(countTextBox, false, true, allowNegative: false, errorMessage: T._("Bitte eine gültige Anzahl >0 neuer Züge eingeben!")); changeValidator = new NumberValidator(changeTextBox, false, true, errorMessage: T._("Bitte eine gültige Veränderung der Zugnummer eingeben!")); train = t; this.tt = tt; nameTextBox.Text = t.TName; diffTextBox.Text = "+20"; countTextBox.Text = "1"; changeTextBox.Text = "2"; modeSelect = new SelectionUI <CopySelectionMode>(mode => UpdateVisibility(), selectStack); linkSelect = new SelectionUI <LinkTypeMode>(linkType => UpdateVisibility(), linkTypeStack); if (tt.Type == TimetableType.Network && tt.Version.CompareTo(TimetableVersion.Extended_FPL2) < 0) { modeSelect.DisableOption(CopySelectionMode.Link); } specialNameGridView.AddColumn((SpecialNameEntry spn) => spn.RowNumber.ToString(), ""); specialNameGridView.AddColumn((SpecialNameEntry spn) => spn.Name, T._("Zugname"), true); specialNameGridView.DataStore = new[] { new SpecialNameEntry(1, "") }; }
public TrainSortDialog(TrainDirection dir, Timetable tt) { Eto.Serialization.Xaml.XamlReader.Load(this); direction = dir; this.tt = tt; sortSelection = new SelectionUI <SortSelectionType>(SelectMode, sortSelectionStack); stationsComboBox.ItemTextBinding = Binding.Delegate <Station, string>(s => s.SName); stationsComboBox.DataStore = tt.Stations; if (dir == TrainDirection.tr) // Netzwerk-Fahrplan { // deaktiviert "von unten nach oben", "von oben nach unten" in Netzwerk-Fahrplänen sortSelection.DisableOption(SortSelectionType.TimeDown); sortSelection.DisableOption(SortSelectionType.TimeUp); } }
public EditPatternForm(string property, FilterTarget target) { Eto.Serialization.Xaml.XamlReader.Load(this); propertyLabel.Text = property; typeSelection = new SelectionUI <PatternSelectionType>(null, typeSelectionStack); if (target == FilterTarget.Train) { typeSelection.DisableOption(PatternSelectionType.StationType); } }