private void ClientEvent_Update(ClientEvent.Types Type, object Args) { try { if (Main_Logger.InvokeRequired) { BeginInvoke(new ClientEvent_Safe(ClientEvent_Update), Type, Args); } else { if (Type == ClientEvent.Types.Logger) { Main_Logger.AppendText(Args + Functions.vbNewLine); if (Main_Logger.Lines.Length > 1000) { Main_Logger.Lines = Main_Logger.Lines.Skip(1).ToArray(); } } else if (Type == ClientEvent.Types.Restart) { ApplicationRestart = true; Application.Exit(); } else if (Type == ClientEvent.Types.Stop) { ApplicationRestart = false; Application.Exit(); } } } catch (Exception ex) { ex.CatchError(); } }
private void ClientEvent_Update(ClientEvent.Types Type) { try { if (Main_Logger.InvokeRequired) { BeginInvoke(new ClientEvent_Safe(ClientEvent_Update), Type); } else { if (Type == ClientEvent.Types.Restart) { ApplicationRestart = true; Application.Exit(); } else if (Type == ClientEvent.Types.Stop) { Application.Exit(); } else if (Type == ClientEvent.Types.Update) { ApplicationUpdate = true; Application.Exit(); } } } catch (Exception ex) { ex.CatchError(); } }