Exemplo n.º 1
0
 protected override void FillBlindIndex()
 {
     if (isReadFromWindow)
     {
         User32.EnumChildWindows(hwnd, new User32.PChildCallBack(EnumCallBackBlind), new IntPtr(0));
     }
     else
     {
         {
             BlindSelectionForm joo = new BlindSelectionForm();
             data.BBindex = joo.getindex(blindStruct);
             return;
         }
     }
 }
Exemplo n.º 2
0
 protected override void FillBlindIndex()
 {
     data.BBindex = -1;
     if (isReadFromWindow)
     {
         String[] caps  = iWindowCaption.Split(new Char[] { '-', '/' });
         int      small = Convert.ToInt32(caps[1].Trim());
         int      big   = Convert.ToInt32(caps[2].Trim());
         for (int i = 0; i < blindStruct.Count; i++)
         {
             if (blindStruct[i].Bigblind == big && blindStruct[i].Smallblind == small)
             {
                 data.BBindex = i;
             }
         }
     }
     else
     {
         BlindSelectionForm form = new BlindSelectionForm();
         data.BBindex = form.getindex(blindStruct);
     }
 }
Exemplo n.º 3
0
        protected override void FillBlindIndex()
        {
            if (hwnd.ToInt32() == -1)
            {
                BlindSelectionForm joo = new BlindSelectionForm();
                data.BBindex = joo.getindex(blindStruct);

                return;
            }
            StringBuilder builder = new StringBuilder(255);

            User32.GetWindowText(hwnd, builder, 250);

            Match blindreg = Regex.Match(builder.ToString(), @"Blinds \$?(?<small>\d+)/\$?(?<big>\d+)\s*(Ante \$?(?<ante>\d+))?");

            if (blindreg.Success)
            {
                BlindInfo info;
                int       bigblind   = Convert.ToInt32(blindreg.Groups["big"].Value);
                int       smallblind = Convert.ToInt32(blindreg.Groups["small"].Value);
                int       ante       = 0;
                if (blindreg.Groups["ante"].Value != "")
                {
                    ante = Convert.ToInt32(blindreg.Groups["ante"].Value);
                }

                info = new BlindInfo(smallblind, bigblind, ante);

                for (int i = 0; i < blindStruct.Count; i++)
                {
                    if (blindStruct[i].Equals(info))
                    {
                        data.BBindex = i;
                        return;
                    }
                }
            }
            data.BBindex = -1;
        }
Exemplo n.º 4
0
        protected override void FillBlindIndex()
        {
            if (hwnd.ToInt32() == -1)
            {
                BlindSelectionForm joo = new BlindSelectionForm();
                data.BBindex =  joo.getindex(blindStruct);

                return;
            }
            StringBuilder builder = new StringBuilder(255);
            User32.GetWindowText(hwnd, builder, 250);

            Match blindreg = Regex.Match(builder.ToString(), @"Blinds \$?(?<small>\d+)/\$?(?<big>\d+)\s*(Ante \$?(?<ante>\d+))?");
            if (blindreg.Success)
            {
                BlindInfo info;
                int bigblind = Convert.ToInt32(blindreg.Groups["big"].Value);
                int smallblind = Convert.ToInt32(blindreg.Groups["small"].Value);
                int ante = 0;
                if (blindreg.Groups["ante"].Value != "")
                    ante = Convert.ToInt32(blindreg.Groups["ante"].Value);

                info = new BlindInfo(smallblind,bigblind,ante);

                for (int i = 0; i < blindStruct.Count; i++)
                    if (blindStruct[i].Equals(info))
                    {
                        data.BBindex = i;
                        return;
                    }

            }
            data.BBindex = -1;
        }
Exemplo n.º 5
0
 protected override void FillBlindIndex()
 {
     if (isReadFromWindow)
         User32.EnumChildWindows(hwnd, new User32.PChildCallBack(EnumCallBackBlind), new IntPtr(0));
     else
     {
         {
             BlindSelectionForm joo = new BlindSelectionForm();
             data.BBindex = joo.getindex(blindStruct);
             return;
         }
     }
 }
Exemplo n.º 6
0
        protected override void FillBlindIndex()
        {
            data.BBindex = -1;
            if (isReadFromWindow)
            {
                String[] caps = iWindowCaption.Split(new Char[] { '-', '/' });
                int small = Convert.ToInt32(caps[1].Trim());
                int big = Convert.ToInt32(caps[2].Trim());
                for (int i = 0; i < blindStruct.Count; i++)
                {
                    if (blindStruct[i].Bigblind == big && blindStruct[i].Smallblind == small)
                        data.BBindex = i;
                }

            }
            else
            {
                BlindSelectionForm form = new BlindSelectionForm();
                data.BBindex = form.getindex(blindStruct);
            }
        }