Exemple #1
0
        private static bool Handler(CtrlType sig)
        {
            _botClient?.Disconnect();

            // Allow main to run off
            exitSystem = true;

            // Shutdown right away so there are no lingering threads
            Environment.Exit(-1);

            return(true);
        }
Exemple #2
0
 private void MainFrame_FormClosing(object sender, FormClosingEventArgs e)
 {
     _bot?.Disconnect();
 }
 public void Close()
 {
     botClient.Disconnect();
 }