public void outerhandle() { fi = di.GetFiles(); foreach (var value in fi) { nw_Text += value.Name; } var tss = ""; try { tss = nw_Text.Remove(0, od_Text.Length); } catch { } nw_Text = ""; od_Text = ""; OutPutLog = tss; if (File.Exists(ProcessCheckStatus.data.ServerFileLocation + "\\crash-reports\\" + tss)) { Type = ServerType.Crash; ProcessCheckStatus.ServerAutoHandler(tss); ProcessCheckStatus.ServerCrash = true; ProcessCheckStatus.SCE.CheckServerCrash(); } else { } Win.Dispatcher.Invoke(() => { Lab.Content = "Last Crash: " + tss; }); Win.Dispatcher.Invoke(() => { var _color = new Color(); _color = Color.FromRgb(189, 189, 189); mp.timer1.Enabled = false; mp.Arc1.Fill = new SolidColorBrush(_color); mp.Arc2.Fill = new SolidColorBrush(_color); mp.Arc3.Fill = new SolidColorBrush(_color); mp.Arc4.Fill = new SolidColorBrush(_color); mp.Arc5.Fill = new SolidColorBrush(_color); }); Global.GlobalSigh.Tk = null; Global.GlobalSigh.CloseServerNull(this); }
private void Dt_Tick(object sender, EventArgs e) { if (Global.GlobalSigh.AcServerType == ServerType.Stopped) { StoppedOut.Content = DateTime.Now + "\n" + "Server Stopped! Will Restart At " + Server_Restart_Countdown / 10; Server_Restart_Countdown--; ProcessCheckStatus.serverRestartCount = 0; if (Server_Restart_Countdown < 10) { Server_Restart_Countdown = 100; Global.GlobalSigh.AcServerType = ServerType.Starting; ProcessCheckStatus.RestartServer(); } } else { StoppedOut.Content = DateTime.Now + "\n"; } }