private void EditStation(bool message = true) { if (gridView.SelectedItems.Count() > 0) { Station station = (Station)gridView.SelectedItem; using (var nsf = new EditStationForm(station, route)) nsf.ShowModal(this); UpdateStations(); } else if (message) { MessageBox.Show("Zuerst muss eine Station ausgewählt werden!", "Station bearbeiten"); } }
private void EditStation(bool message = true) { if (gridView.SelectedItems.Any()) { var station = (Station)gridView.SelectedItem; using (var nsf = new EditStationForm(pluginInterface, station, route)) nsf.ShowModal(this); UpdateStations(); } else if (message) { MessageBox.Show(T._("Zuerst muss eine Station ausgewählt werden!"), T._("Station bearbeiten")); } }
private void NewStation() { using (var nsf = new EditStationForm(pluginInterface, pluginInterface.Timetable, route)) { if (nsf.ShowModal(this) == DialogResult.Ok) { var sta = nsf.Station; if (pluginInterface.Timetable.Type == TimetableType.Network) { var handler = new StationCanvasPositionHandler(); handler.SetMiddlePos(route, sta, pluginInterface.Timetable); } pluginInterface.Timetable.AddStation(sta, route); UpdateStations(); } } }
private void NewStation() { using (EditStationForm nsf = new EditStationForm(tt, route)) { if (nsf.ShowModal(this) == DialogResult.Ok) { Station sta = nsf.Station; if (info.Timetable.Type == TimetableType.Network) { var handler = new StaPosHandler(); handler.SetMiddlePos(route, sta, info.Timetable); var r = sta.Routes.ToList(); r.Add(route); sta.Routes = r.ToArray(); } tt.AddStation(sta, route); UpdateStations(); } } }