Пример #1
0
        private bool EnumWindowCallBack(IntPtr hwnd, IntPtr lparam)
        {
            StringBuilder builder = new StringBuilder(250);

            User32.GetWindowText(hwnd, builder, 200);
            string tableName = builder.ToString();

            IntPtr windowprocess = new IntPtr(0);

            User32.GetWindowThreadProcessId(hwnd, ref windowprocess);

            Int64 hwndvalue = hwnd.ToInt64();

            //Party window
            if (tableName.Contains("Good Luck") && !tableName.Contains("Poker Lobby"))
            {
                if (!foundtables[partystr].ContainsKey(hwndvalue))
                {
                    //List<BlindInfo> blinds = iCasinoBlinds[partystr];
                    foundtables[partystr][hwndvalue] = new partyTableReader(null, hwnd);
                }
            }

            if (tableName.StartsWith("PokerStars Lobby - Logged in as"))
            {
                StarsProcess = windowprocess;
            }

            if (tableName.StartsWith("Full Tilt Poker"))
            {
                FulltiltProcess = windowprocess;
            }

            if (windowprocess.ToInt64() == StarsProcess.ToInt64() && tableName.Contains("Table ") && tableName.Contains("Hold"))
            {
                if (!foundtables[starsstr].ContainsKey(hwndvalue))
                {
                    //List<BlindInfo> blinds = iCasinoBlinds[starsstr];
                    foundtables[starsstr][hwndvalue] = new StarsTable(null, hwnd);
                }
            }

            else if (windowprocess.ToInt64() == FulltiltProcess.ToInt64() && ((tableName.Contains("Sit & Go") || tableName.Contains("Sit&Go")) && tableName.Contains("Hold'em")) && !tableName.Contains("Chat"))
            {
                if (!foundtables[fulltiltstr].ContainsKey(hwndvalue))
                {
                    foundtables[fulltiltstr][hwndvalue] = new FullTiltTable(null, hwnd);
                }
            }

            return(true);
        }
Пример #2
0
        private bool EnumWindowCallBack(IntPtr hwnd, IntPtr lparam)
        {
            StringBuilder builder = new StringBuilder(250);
            User32.GetWindowText(hwnd, builder, 200);
            string tableName = builder.ToString();

            IntPtr windowprocess = new IntPtr(0);
            User32.GetWindowThreadProcessId(hwnd, ref windowprocess);

            Int64 hwndvalue = hwnd.ToInt64();
          
            //Party window
            if (tableName.Contains("Good Luck") && !tableName.Contains("Poker Lobby"))
            {
                if (!foundtables[partystr].ContainsKey(hwndvalue))
                {
                    //List<BlindInfo> blinds = iCasinoBlinds[partystr];
                    foundtables[partystr][hwndvalue] = new partyTableReader(null, hwnd);
                }
            }            

            if (tableName.StartsWith("PokerStars Lobby - Logged in as"))
                StarsProcess = windowprocess;
            
            if (tableName.StartsWith("Full Tilt Poker"))
                FulltiltProcess = windowprocess;            

            if (windowprocess.ToInt64() == StarsProcess.ToInt64() && tableName.Contains("Table ") && tableName.Contains("Hold"))
            {
                if (!foundtables[starsstr].ContainsKey(hwndvalue))
                {
                    //List<BlindInfo> blinds = iCasinoBlinds[starsstr];
                    foundtables[starsstr][hwndvalue] = new StarsTable(null, hwnd);
                }
            }

            else if (windowprocess.ToInt64() == FulltiltProcess.ToInt64() && ((tableName.Contains("Sit & Go") || tableName.Contains("Sit&Go")) && tableName.Contains("Hold'em")) && !tableName.Contains("Chat") ) 
            {
                if (!foundtables[fulltiltstr].ContainsKey(hwndvalue))
                {
                    foundtables[fulltiltstr][hwndvalue] = new FullTiltTable(null, hwnd);
                }
            }
            
            return true;
        }