public Table(String handHistoryFilePath, Window window, PokerClient pokerClient, PlayerDatabase playerDatabase) { this.handHistoryFilePath = handHistoryFilePath; this.window = window; this.pokerClient = pokerClient; this.playerDatabase = playerDatabase; this.Game = PokerGame.Unknown; this.maxSeatingCapacity = 0; // We don't know yet this.TableId = String.Empty; // We don't know yet this.GameID = String.Empty; // We don't know yet this.currentHeroName = String.Empty; this.currentHeroSeat = 0; this.gameType = pokerClient.GetPokerGameTypeFromWindowTitle(WindowTitle); this.statistics = new TableStatistics(this); // We don't know what specific kind this.Hud = new Hud(this); this.visualRecognitionManager = null; // Not all tables have a visual recognition manager this.displayWindow = PokerMuck.TableDisplayWindow.CreateForTable(this); // By default we use the universal parser handHistoryParser = new UniversalHHParser(pokerClient, System.IO.Path.GetFileName(handHistoryFilePath)); // But as soon as we find what kind of game we're using, we're going to update our parser */ ((UniversalHHParser)handHistoryParser).GameDiscovered += new UniversalHHParser.GameDiscoveredHandler(handHistoryParser_GameDiscovered); playerList = new List <Player>(10); //Usually no more than 10 players per table // Init hand history monitor hhMonitor = new HHMonitor(handHistoryFilePath, this); hhMonitor.StartMonitoring(); }
public Table(String handHistoryFilePath, Window window, PokerClient pokerClient, PlayerDatabase playerDatabase) { this.handHistoryFilePath = handHistoryFilePath; this.window = window; this.pokerClient = pokerClient; this.playerDatabase = playerDatabase; this.Game = PokerGame.Unknown; this.maxSeatingCapacity = 0; // We don't know yet this.TableId = String.Empty; // We don't know yet this.GameID = String.Empty; // We don't know yet this.currentHeroName = String.Empty; this.currentHeroSeat = 0; this.gameType = pokerClient.GetPokerGameTypeFromWindowTitle(WindowTitle); this.statistics = new TableStatistics(this); // We don't know what specific kind this.Hud = new Hud(this); this.visualRecognitionManager = null; // Not all tables have a visual recognition manager this.displayWindow = PokerMuck.TableDisplayWindow.CreateForTable(this); // By default we use the universal parser handHistoryParser = new UniversalHHParser(pokerClient, System.IO.Path.GetFileName(handHistoryFilePath)); // But as soon as we find what kind of game we're using, we're going to update our parser */ ((UniversalHHParser)handHistoryParser).GameDiscovered += new UniversalHHParser.GameDiscoveredHandler(handHistoryParser_GameDiscovered); playerList = new List<Player>(10); //Usually no more than 10 players per table // Init hand history monitor hhMonitor = new HHMonitor(handHistoryFilePath, this); hhMonitor.StartMonitoring(); }
private Object createTableLock = new Object(); // Used for thread safety synchronization public PokerMuckDirector() { StartDebugging(); InitializeSupportedPokerClientList(); // Initialize the list of tables (no more than 20 concurrent games to begin with right?) tables = new List <Table>(20); // Initialize the database playerDatabase = new PlayerDatabase(); // Initialize the user configuration Globals.UserSettings = new PokerMuckUserSettings(); string path = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath; WriteDebug(WRITE_DEBUG, "PerUserRoamingAndLocal: " + path); path = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath; WriteDebug(WRITE_DEBUG, "None: " + path); path = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoaming).FilePath; WriteDebug(WRITE_DEBUG, "PerUserRoaming: " + path); // First execution? if (Globals.UserSettings.FirstExecution) { ShowFirstExecutionWizard(); // Reload settings Globals.UserSettings = new PokerMuckUserSettings(); Globals.UserSettings.FirstExecution = false; // Save Globals.UserSettings.Save(); } // Get the poker client from the user settings ChangePokerClient(Globals.UserSettings.CurrentPokerClient); // Init windows listener windowsListener = new WindowsListener(this); windowsListener.ListenInterval = 200; windowsListener.StartListening(); // Init new files monitor newFilesMonitor = new NewFilesMonitor(Globals.UserSettings.HandHistoryDirectory, this); newFilesMonitor.StartMonitoring(); }
private Object createTableLock = new Object(); // Used for thread safety synchronization public PokerMuckDirector() { InitializeSupportedPokerClientList(); // Initialize the list of tables (no more than 20 concurrent games to begin with right?) tables = new List <Table>(20); // Initialize the database playerDatabase = new PlayerDatabase(); // Initialize the user configuration Globals.UserSettings = new PokerMuckUserSettings(); // First execution? if (Globals.UserSettings.FirstExecution) { ShowFirstExecutionWizard(); // Reload settings Globals.UserSettings = new PokerMuckUserSettings(); Globals.UserSettings.FirstExecution = false; // Save Globals.UserSettings.Save(); } // Get the poker client from the user settings ChangePokerClient(Globals.UserSettings.CurrentPokerClient); // Init windows listener windowsListener = new WindowsListener(this); windowsListener.ListenInterval = 200; windowsListener.StartListening(); // Init new files monitor newFilesMonitor = new NewFilesMonitor(Globals.UserSettings.HandHistoryDirectory, this); newFilesMonitor.StartMonitoring(); }