private void LoadPokerClientThemes(PokerClient client) { if (client.SupportedVisualRecognitionThemes.Count > 0) { cmbPokerClientTheme.DataSource = client.SupportedVisualRecognitionThemes; cmbPokerClientTheme.Enabled = true; // If a colormap became available during the last update, CurrentTheme needs to be changed if (client.CurrentTheme == "") { client.SetTheme(client.SupportedVisualRecognitionThemes[0].ToString()); // Force save settings Globals.UserSettings.CurrentPokerClient = client; // Commit Globals.UserSettings.Save(); } } else { ArrayList list = new ArrayList(); list.Add("Feature not yet supported"); cmbPokerClientTheme.DataSource = list; cmbPokerClientTheme.Enabled = false; } }
/* This will force subclasses to have a PokerClient in their constructor as well */ public HHParser(PokerClient pokerClient, String handhistoryFilename) { this.pokerClient = pokerClient; this.handhistoryFilename = handhistoryFilename; endOfRoundTokensDetected = 0; }
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(); }
/* Pokerclient language has changed, initialize the new config */ private void cmbPokerClientLanguage_SelectionChangeCommitted(object sender, EventArgs e) { PokerClient client = userSettings.CurrentPokerClient; client.InitializeLanguage(cmbPokerClientLanguage.Text); userSettings.CurrentPokerClient = client; }
private void cmbPokerClientTheme_SelectionChangeCommitted(object sender, EventArgs e) { PokerClient client = userSettings.CurrentPokerClient; client.SetTheme(cmbPokerClientTheme.Text); userSettings.CurrentPokerClient = client; }
private void cmbPokerClientTheme_SelectionChangeCommitted(object sender, EventArgs e) { PokerClient client = Globals.UserSettings.CurrentPokerClient; client.SetTheme(cmbPokerClientTheme.Text); // Tell directory that we have changed the client Globals.Director.ChangePokerClient(client); }
public VisualMatcher(PokerClient client) { this.client = client; this.cardMatchFiles = new List<String>(); this.cardMatchDialogSpawnLocation = new Point(200, 200); ReplicateCommonCardsForCurrentClient(); LoadCardMatchFilesList(); }
public VisualMatcher(PokerClient client) { this.client = client; this.cardMatchFiles = new List <String>(); this.cardMatchDialogSpawnLocation = new Point(200, 200); ReplicateCommonCardsForCurrentClient(); LoadCardMatchFilesList(); }
/* Pokerclient has changed, store in config and load available languages */ private void cmbPokerClient_SelectionChangeCommitted(object sender, EventArgs e) { PokerClient client = PokerClientsList.Find(cmbPokerClient.Text); client.InitializeLanguage(client.DefaultLanguage); LoadPokerClientLanguages(client); LoadPokerClientThemes(client); userSettings.CurrentPokerClient = client; }
/* Change the poker client */ public void ChangePokerClient(PokerClient client) { Globals.UserSettings.CurrentPokerClient = client; pokerClient = client; // Also change directory ChangeHandHistoryDirectory(Globals.UserSettings.StoredHandHistoryDirectory); // On load certain operations might need to be done by the client Globals.UserSettings.CurrentPokerClient.DoStartupProcessing(Globals.UserSettings.StoredHandHistoryDirectory); }
public String GetHandHistoryDirectoryFor(PokerClient client) { String key = client.XmlName + "_hand_history_directory"; // Has the user ever specified a directory for this client? if (HasSetting(key)) { return((String)GetSetting(key)); } else { return(String.Empty); } }
/* Pokerclient has changed, store in config and load available languages */ private void cmbPokerClient_SelectionChangeCommitted(object sender, EventArgs e) { PokerClient client = PokerClientsList.Find(cmbPokerClient.Text); client.InitializeLanguage(client.DefaultLanguage); LoadPokerClientLanguages(client); LoadPokerClientThemes(client); client.SetTheme(cmbPokerClientTheme.Text); Globals.Director.ChangePokerClient(client); // Refresh hand history directory txtHandHistoryDirectory.Text = Globals.UserSettings.StoredHandHistoryDirectory; }
private void LoadPokerClientThemes(PokerClient client) { if (client.SupportedVisualRecognitionThemes.Count > 0) { cmbPokerClientTheme.DataSource = client.SupportedVisualRecognitionThemes; cmbPokerClientTheme.Enabled = true; } else { ArrayList list = new ArrayList(); list.Add("Feature not yet supported"); cmbPokerClientTheme.DataSource = list; cmbPokerClientTheme.Enabled = false; } }
public HoldemHHParser(PokerClient pokerClient, String handhistoryFilename) : base(pokerClient, handhistoryFilename) { // Initialize vars PlayerHasShowedThisRound = false; ShowdownEventRaised = false; boardCards = new List <Card>(5); playerSeats = new Hashtable(); lastButtonSeatNumber = 0; // Setup handler from parent class that detects the end of a round base.RoundHasTerminated += new RoundHasTerminatedHandler(HoldemHHParser_RoundHasTerminated); // Also call it the first time from here SetupNewRound(); }
public HoldemHHParser(PokerClient pokerClient, String handhistoryFilename) : base(pokerClient, handhistoryFilename) { // Initialize vars PlayerHasShowedThisRound = false; ShowdownEventRaised = false; boardCards = new List<Card>(5); playerSeats = new Hashtable(); lastButtonSeatNumber = 0; // Setup handler from parent class that detects the end of a round base.RoundHasTerminated += new RoundHasTerminatedHandler(HoldemHHParser_RoundHasTerminated); // Also call it the first time from here SetupNewRound(); }
public void SetHandHistoryDirectoryFor(PokerClient client, String directory) { String key = client.XmlName + "_hand_history_directory"; SetSetting(key, directory); }
/* Adds a poker client to the list of supported clients */ public static void Add(PokerClient client) { clientList.Add(client.Name, client); }
public static void SetDefault(PokerClient client) { defaultClient = client; }
public UniversalHHParser(PokerClient pokerClient, String handhistoryFilename) : base(pokerClient, handhistoryFilename) { reGameType = pokerClient.GetRegex("hand_history_game_token"); }
public String GetHandHistoryDirectoryFor(PokerClient client) { String key = client.XmlName + "_hand_history_directory"; // Has the user ever specified a directory for this client? if (HasSetting(key)) { return (String)GetSetting(key); } else return String.Empty; }
/* Loads the languages available for a specific client */ private void LoadPokerClientLanguages(PokerClient client) { cmbPokerClientLanguage.DataSource = client.SupportedLanguages; }