public void Initialize() { Answer ans = Database.SendGetAnswer("INFO"); if (ans.Info != Inf.OK) { PermissionDenied.Visible = true; PermissionDenied.Text = ans.Message; return; } PermissionDenied.Visible = false; TimerUpdate.Stop(); CPUChart.Series[0].Points.Clear(); RAMChart.Series[0].Points.Clear(); QueryChart.Series[0].Points.Clear(); if (MainForm.ServerInformation.Count != 0) { info = MainForm.ServerInformation.Last(); RAMChart.ChartAreas[0].AxisY.Maximum = info.TotalMemory; TimeStart.Text = DateTime.Now.AddSeconds(-info.UpTime).ToString("yyyy/MM/dd hh:mm:ss"); } TimerUpdate.Start(); foreach (InfoClass inf in MainForm.ServerInformation) { AddToCharts(inf); if (inf.TotalMemory > RAMChart.ChartAreas[0].AxisY.Maximum) { RAMChart.ChartAreas[0].AxisY.Maximum = inf.TotalMemory; } } }
private void progStart() { TimerVerif.Stop(); writeAllowed = true; UpdateNumBox(); TimerUpdate.Start(); if (doBeep) { sndGameFound.PlaySync(); } }
//----------------------------------------------------------------------------- public void Start() { if (StartupHealthCheck()) { MasterManager.Load(0); //EmojiManager.Instance.LoadAll(); WvsLogin.Start(); WvsGames.ToList().ForEach(x => x.Start()); MasterManager.SetEventManager(WvsGames[0]); WvsShop.Start(); TimerUpdate = WvsLogin.CreateTimer(); //Temp TimerUpdate.Interval = Constants.GlobalUpdateDelay; TimerUpdate.Elapsed = GlobalUpdater; TimerUpdate.Start(); TimerPing = WvsLogin.CreateTimer(); //Temp TimerPing.Interval = Constants.KeepAliveDelay; TimerPing.Elapsed = PingUpdater; TimerPing.Start(); //FetchLastDailyQuestRecordReset(); Log.Info("[WvsCenter] Started"); if (Constants.AllowAccountLoginOverride) { Log.Info("[WARNING] Be advised, account login override is enabled."); } } else { Log.Error("[WvsCenter] Failed startup health check."); } }