internal static void ShowTrainSettings() { if (FormTrainTask == null || FormTrainTask.IsCompleted) { FormTrainTask = Task.Factory.StartNew(() => { formTrain dialog = new formTrain(); dialog.ShowDialog(); }); } }
internal static void ShowTrainSettings() { if (FormTrainTask == null || FormTrainTask.IsCompleted) { FormTrainTask = Task.Run(() => { Instance = new formTrain(); Instance.ShowDialog(); Instance.Dispose(); }); } else { Instance?.ActivateUI_Async(); } }