示例#1
0
        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;
            }
        }
示例#2
0
        /* 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;
        }
示例#3
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();
        }
示例#4
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();
        }
示例#5
0
        /* 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;
        }
示例#6
0
        private void cmbPokerClientTheme_SelectionChangeCommitted(object sender, EventArgs e)
        {
            PokerClient client = userSettings.CurrentPokerClient;

            client.SetTheme(cmbPokerClientTheme.Text);

            userSettings.CurrentPokerClient = client;
        }
示例#7
0
        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);
        }
示例#8
0
        public VisualMatcher(PokerClient client)
        {
            this.client = client;
            this.cardMatchFiles = new List<String>();
            this.cardMatchDialogSpawnLocation = new Point(200, 200);

            ReplicateCommonCardsForCurrentClient();
            LoadCardMatchFilesList();
        }
示例#9
0
        public VisualMatcher(PokerClient client)
        {
            this.client         = client;
            this.cardMatchFiles = new List <String>();
            this.cardMatchDialogSpawnLocation = new Point(200, 200);

            ReplicateCommonCardsForCurrentClient();
            LoadCardMatchFilesList();
        }
示例#10
0
        /* 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;
        }
示例#11
0
        /* 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);
        }
示例#12
0
        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);
            }
        }
示例#13
0
        /* 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;
        }
示例#14
0
 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;
     }
 }
示例#15
0
        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();
        }
示例#16
0
        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();
        }
示例#17
0
 public void SetHandHistoryDirectoryFor(PokerClient client, String directory)
 {
     String key = client.XmlName + "_hand_history_directory";
     SetSetting(key, directory);
 }
示例#18
0
 /* Adds a poker client to the list of supported clients */
 public static void Add(PokerClient client)
 {
     clientList.Add(client.Name, client);
 }
示例#19
0
 public static void SetDefault(PokerClient client)
 {
     defaultClient = client;
 }
示例#20
0
 public UniversalHHParser(PokerClient pokerClient, String handhistoryFilename)
     : base(pokerClient, handhistoryFilename)
 {
     reGameType = pokerClient.GetRegex("hand_history_game_token");
 }
示例#21
0
 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;
 }
示例#22
0
 public UniversalHHParser(PokerClient pokerClient, String handhistoryFilename)
     : base(pokerClient, handhistoryFilename)
 {
     reGameType = pokerClient.GetRegex("hand_history_game_token");
 }
示例#23
0
 public static void SetDefault(PokerClient client)
 {
     defaultClient = client;
 }
示例#24
0
 /* Adds a poker client to the list of supported clients */
 public static void Add(PokerClient client)
 {
     clientList.Add(client.Name, client);
 }
示例#25
0
 /* Loads the languages available for a specific client */
 private void LoadPokerClientLanguages(PokerClient client)
 {
     cmbPokerClientLanguage.DataSource = client.SupportedLanguages;
 }
 /* Loads the languages available for a specific client */
 private void LoadPokerClientLanguages(PokerClient client)
 {
     cmbPokerClientLanguage.DataSource = client.SupportedLanguages;
 }
示例#27
0
        public void SetHandHistoryDirectoryFor(PokerClient client, String directory)
        {
            String key = client.XmlName + "_hand_history_directory";

            SetSetting(key, directory);
        }
 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;
     }
 }
示例#29
0
        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;
            }
        }