/// <summary> /// Открытие окна с данными конкретного поезда для их редактирования /// </summary> private void EditTrain() { if (TrainSelectedIndex >= 0) { var selectedTrainId = TrainList[TrainSelectedIndex].Id; var trainInfoWin = new TrainInfoWindow(); trainInfoWin.Show(); trainInfoWin.Closing += new System.ComponentModel.CancelEventHandler((a, b) => RefreshTrainList()); Messenger.Default.Send(new TrainInfoMessage(selectedTrainId)); } }
/// <summary> /// Добавление поезда /// </summary> private void AddTrain() { var trainInfoWin = new TrainInfoWindow(); trainInfoWin.Show(); trainInfoWin.Closing += new System.ComponentModel.CancelEventHandler((a,b) => RefreshTrainList()); }