コード例 #1
0
 //Makes sure, that every thread is being closed
 protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 {
     if (hasLicense)
     {
         buyMessage.Text = "Writing players to database...";
         PokerStarsMain.updatePlayersInDatabaseFromCache();
         EightPokerMain.updatePlayersInDatabaseFromCache();
     }
     Environment.Exit(Environment.ExitCode);
     base.OnClosing(e);
 }
コード例 #2
0
        // Close every thread and write cached players to database
        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            //buyMessage.Text = "Writing players to database";
            PokerStarsMain.updatePlayersInDatabaseFromCache();
            EightPokerMain.updatePlayersInDatabaseFromCache();


            try
            {
                Environment.Exit(Environment.ExitCode);
            } catch (Exception p)
            {
                Console.WriteLine("Block 1");
                Console.WriteLine(p.Message);
            }
        }