Ejemplo n.º 1
0
 public void getClipboard(OperationWindow ow2, Boolean down, Boolean zoom, String vm, String drive)
 {
     ow = ow2;
     newcopyhand = GetText();
     if (newcopyhand != oldcopyhand)
     {
         if(newcopyhand.StartsWith("PokerStars Hand #") && !newcopyhand.Contains("hulkric59"))
         {
             String can = "cancelled";
             if (!newcopyhand.ToLower().Contains(can.ToLower()))
             {
                 if (!handarray.Contains(newcopyhand))
                 {
                     handarray.Add(newcopyhand);
                     String date = getDate();
                     file.AppendToFileDT(newcopyhand, date, down, zoom, vm, drive);
                     ow.addToList(newcopyhand, false);
                     oldcopyhand = newcopyhand;
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        public void Dt()
        {
            RecupClipboard handcopy = new RecupClipboard();
            OperationWindow ow = new OperationWindow();
            if (checkBoxLogin.Checked)
            {
                loginsend = "PokerStars Lobby - Logged in as " + textBoxLogin.Text.ToString();
            }
            else
            {
                loginsend = "PokerStars Lobby";
            }
            if (checkBoxDown.Checked)
            {
                down = true;
            }
            if (checkBoxZoom.Checked)
            {
                zoom = true;
            }
            ow.selectLobby(loginsend, down, zoom);
            int cincominuto = 0;
            int vpnminute = 0;
            //int vpnnumber = 1;
            while (true)
            {
                while (continueDt)
                {

                    try
                    {
                        if (!zoom)
                        {
                            if (cincominuto == 700)
                            //if (cincominuto == 1)
                            {
                                Cursor.Position = new Point(initial_x, initial_y);
                                mouse_event(MOUSEEVENTF_LEFTDOWN, initial_x, initial_y, 0, 0);
                                mouse_event(MOUSEEVENTF_LEFTUP, initial_x, initial_y, 0, 0);

                                for (int i = 0; i < 100; i++)
                                {
                                    keybd_event(VK_UP, 0, 0, 0);
                                    keybd_event(VK_UP, 0, KEYEVENTF_KEYUP, 0);
                                    System.Threading.Thread.Sleep(400);
                                }

                                ow.closetable();
                                cincominuto = 0;
                            }
                        }

                        Cursor.Position = new Point(initial_x, initial_y);
                        mouse_event(MOUSEEVENTF_LEFTDOWN, initial_x, initial_y, 0, 0);
                        mouse_event(MOUSEEVENTF_LEFTUP, initial_x, initial_y, 0, 0);

                        Cursor.Position = new Point(hand_x, hand_y);
                        mouse_event(MOUSEEVENTF_LEFTDOWN, hand_x, hand_y, 0, 0);
                        mouse_event(MOUSEEVENTF_LEFTUP, hand_x, hand_y, 0, 0);

                        // Hold Control down and press A
                        keybd_event(VK_LCONTROL, 0, 0, 0);
                        keybd_event(A, 0, 0, 0);
                        keybd_event(A, 0, KEYEVENTF_KEYUP, 0);
                        keybd_event(VK_LCONTROL, 0, KEYEVENTF_KEYUP, 0);

                        // Hold Control down and press C
                        keybd_event(VK_LCONTROL, 0, 0, 0);
                        keybd_event(C, 0, 0, 0);
                        keybd_event(C, 0, KEYEVENTF_KEYUP, 0);
                        keybd_event(VK_LCONTROL, 0, KEYEVENTF_KEYUP, 0);

                        //coller
                        handcopy.getClipboard(ow, down, zoom, textBoxVm.Text, textBoxDrive.Text);

                        cincominuto = cincominuto + 1;
                        vpnminute++;

                        System.Threading.Thread.Sleep(700);
                        //System.Threading.Thread.Sleep(1500);

                        //agora vejo se o ip for igual
                        //if (ipinicial.Equals(new Utils().getipinternet2()))
                        //{
                        //    new Utils().detectApps("PokerStars");
                        //}

                        //aqui o ciclo de antes
                        //if (vpnminute >= 5)
                        //{
                        //    vpnminute = 0;
                        //    int tentative = 1;
                        //    while (!vpn.TestConnection())
                        //    {
                        //        vpn.Manage();
                        //        if (tentative > 5)
                        //        {
                        //            if (vpnnumber == 1)
                        //            {
                        //                vpn.VPNConnectionName = textBoxVpn2.Text;
                        //                textBoxVpn1.ForeColor = Color.Red;
                        //                vpnnumber++;
                        //                tentative = 1;
                        //            }
                        //            else
                        //            {
                        //                if (vpnnumber == 2)
                        //                {
                        //                    vpn.VPNConnectionName = textBoxVpn3.Text;
                        //                    textBoxVpn2.ForeColor = Color.Red;
                        //                    vpnnumber++;
                        //                    tentative = 1;
                        //                }
                        //                else
                        //                {
                        //                    //shutdown the machine
                        //                    Process.Start("shutdown", "/s /t 0");
                        //                }
                        //            }
                        //        }
                        //        tentative++;
                        //    }
                        //}
                        //ici je vais mettre une exception au cas ou
                    }
                    catch (Exception ex)
                    {
                        new Debug().LogMessage(ex.ToString());
                    }
                }
            }
        }