Ejemplo n.º 1
0
 static void ctcOfficeGui_ShowTrain(object sender, ShowTrainEventArgs e)
 {
     var formTrainController = new Form();
     UserControl controlTrainController = null;
     var tc = (TrainController.TrainController)e.TrainModel.TrainController;
     controlTrainController = new TrainControllerUI(tc,env);
     formTrainController.Text = "Terminal Velocity - Train Controller (ID:"+e.TrainModel.TrainID+")";
     formTrainController.Controls.Add(controlTrainController);
     formTrainController.AutoSize = true;
     formTrainController.ShowDialog();
 }
 private void controlCTC_ShowTrain(object sender, ShowTrainEventArgs e)
 {
     var formTrainController = new Form();
     UserControl controlTrainController = null;
     var tc = (TrainController.TrainController) e.TrainModel.TrainController;
     controlTrainController = new TrainControllerUI(tc, _env);
     formTrainController.Text = "Train Controller";
     formTrainController.Controls.Add(controlTrainController);
     formTrainController.AutoSize = true;
     formTrainController.ShowDialog();
 }