//Checks which pokerRooms are installed and activates their filewatchers public static void activateFileWatchers() { if (checkIfPokerRoomIsInstalled("PokerStars")) { PokerStarsMain.activateFileWatcher(); } if (checkIfPokerRoomIsInstalled("888poker")) { EightPokerMain.activateFileWatcher(); } }
//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); }
// 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); } }