示例#1
0
 internal static void ShowTrainSettings()
 {
     if (FormTrainTask == null || FormTrainTask.IsCompleted)
     {
         FormTrainTask = Task.Factory.StartNew(() =>
         {
             formTrain dialog = new formTrain();
             dialog.ShowDialog();
         });
     }
 }
示例#2
0
文件: formTrain.cs 项目: s520/OpenBVE
 internal static void ShowTrainSettings()
 {
     if (FormTrainTask == null || FormTrainTask.IsCompleted)
     {
         FormTrainTask = Task.Run(() =>
         {
             Instance = new formTrain();
             Instance.ShowDialog();
             Instance.Dispose();
         });
     }
     else
     {
         Instance?.ActivateUI_Async();
     }
 }