private void Start_Click(object sender, RoutedEventArgs e) { //Core.Setting.WorkInfo = new WorkInfo(); if (btnStart.Header.ToString() == "Начать работу") { //SettingWindow sw = new SettingWindow(Core.Setting.WorkInfo, true, Working); WorkInfoWindow wiw = new WorkInfoWindow(Core.Setting.WorkInfo, true); wiw.Owner = this; if (wiw.ShowDialog() == true) { btnStart.Header = "Остановить работу"; Working = true; miWorkInfo.Visibility = Visibility.Visible; StartInjection(); cbIsSendWeb.IsEnabled = false; Core.Setting.EventLogs.Clear(); } } else { Working = false; miWorkInfo.Visibility = Visibility.Collapsed; Core.Stop(); btnStart.Header = "Начать работу"; cbIsSendWeb.IsEnabled = true; WorkChangeState("GS", 2, "Не запущен"); WorkChangeState("CUDR", 2, "Не запущен"); WorkChangeState("Web", 2, "Не запущен"); InitTableDataParams(); if (Core.Setting.ListStages.Count > 0) { Core.Setting.ListStages[Core.Setting.ListStages.Count - 1].End = DateTime.Now.ToString("HH:mm dd/MM/yy"); } } }
private void WorkInfoSetting_Click(object sender, RoutedEventArgs e) { WorkInfoWindow wiw = new WorkInfoWindow(Core.Setting.WorkInfo, false); wiw.ShowDialog(); }