Ejemplo n.º 1
0
 /// <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));
     }         
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Добавление поезда
 /// </summary>
 private void AddTrain()
 {
     var trainInfoWin = new TrainInfoWindow();
     trainInfoWin.Show();
     trainInfoWin.Closing += new System.ComponentModel.CancelEventHandler((a,b) => RefreshTrainList());
 }