Exemplo n.º 1
0
 public plugs()
 {
     this.InitializeComponent();
     Control.CheckForIllegalCrossThreadCalls = false;
     base.Shown += new EventHandler(this.MainFrom_Shown);
     if (XmlHelper.IsShowThis("intercept", false))
     {
         ComHelp.Cmd("C:/Windows/Microsoft.NET/Framework/v2.0.50727/regasm /codebase " + AppDomain.CurrentDomain.BaseDirectory + "IEMonitoring.dll");
     }
 }
Exemplo n.º 2
0
 private void SetWeGameForm(UserForm userForm, IntPtr HWND)
 {
     if (HWND == IntPtr.Zero)
     {
         userForm.isOpen = false;
         userForm.Hide();
     }
     else
     {
         Win32Native.RECT lpRect = new Win32Native.RECT();
         Win32Native.GetWindowRect(HWND, ref lpRect);
         int num  = lpRect.Right - lpRect.Left;
         int num2 = lpRect.Bottom - lpRect.Top;
         if ((num != 0x35e) && (num2 != 0x1e1))
         {
             try
             {
                 this.WeGameFourShow(HWND);
                 if (!UrlManage.weGameBlock)
                 {
                     if ((ComHelp.GetPixelColor(userForm.hideLocation1, HWND).ToString() == userForm.hideColor1) || (userForm.hideColor1 == "0"))
                     {
                         if (!userForm.isOpen)
                         {
                             if (!userForm.text.Contains("自适应"))
                             {
                                 Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location1.X, userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
                             }
                             Win32Native.SetParent(userForm.Handle, HWND);
                             userForm.isOpen = true;
                             userForm.Show();
                             //userForm.ShowDialog();
                         }
                         if (userForm.text.Contains("自适应X"))
                         {
                             Win32Native.SetWindowPos(userForm.Handle, 0, num + userForm.location1.X, userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
                         }
                         if (userForm.text.Contains("自适应Y"))
                         {
                             Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location1.X, num2 + userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
                         }
                     }
                     else if (userForm.isOpen)
                     {
                         userForm.isOpen = false;
                         userForm.Hide();
                     }
                 }
             }
             catch
             {
             }
         }
     }
 }
Exemplo n.º 3
0
 private void CheckColor()
 {
     if (XmlHelper.GetPublicXmlValue("isCheck", true) == "0")
     {
         ParameterizedThreadStart para = delegate
         {
             string           s      = XmlHelper.GetPublicXmlAttributeValue("checkPoint", "x", true);
             string           str2   = XmlHelper.GetPublicXmlAttributeValue("checkPoint", "y", true);
             IntPtr           hWnd   = Win32Native.FindWindow("RCLIENT", "League of Legends");
             Win32Native.RECT lpRect = new Win32Native.RECT();
             Win32Native.GetWindowRect(hWnd, ref lpRect);
             Point  pt        = new Point(lpRect.Left + int.Parse(s), lpRect.Top + int.Parse(str2));
             string currColor = ComHelp.GetPixelColor(pt, hWnd).ToString();
             StatisticsHelp.ClolorStatistics(XmlHelper.GetPublicXmlAttributeValue("checkPoint", "okColor", true), currColor, pt);
         };
         this.Thread = new Thread(para);
         this.Thread.Start();
     }
 }
Exemplo n.º 4
0
 private void SetOtherParnetForm(UserForm userForm, IntPtr HWND)
 {
     if (HWND == IntPtr.Zero)
     {
         userForm.isOpen = false;
         userForm.Hide();
     }
     else
     {
         Win32Native.RECT lpRect = new Win32Native.RECT();
         Win32Native.GetWindowRect(HWND, ref lpRect);
         int num  = lpRect.Right - lpRect.Left;
         int num2 = lpRect.Bottom - lpRect.Top;
         if ((ComHelp.GetPixelColor(userForm.hideLocation1, HWND).ToString() == userForm.hideColor1) || (userForm.hideColor1 == "0"))
         {
             if (!userForm.isOpen)
             {
                 if (!userForm.text.Contains("自适应"))
                 {
                     Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location1.X, userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
                 }
                 Win32Native.SetParent(userForm.Handle, HWND);
                 userForm.isOpen = true;
                 userForm.Show();
             }
             if (userForm.text.Contains("自适应X"))
             {
                 Win32Native.SetWindowPos(userForm.Handle, 0, num + userForm.location1.X, userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
             }
             if (userForm.text.Contains("自适应Y"))
             {
                 Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location1.X, num2 + userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
             }
         }
         else if (userForm.isOpen)
         {
             userForm.isOpen = false;
             userForm.Hide();
         }
     }
 }
Exemplo n.º 5
0
 private void ExecuteCmdUpdateCache()
 {
     ComHelp.Load();
     MessageErp.InfoMessage(ErpUIText.Get("ERP_UpdateSucceed"));
 }
Exemplo n.º 6
0
        private void SetLoLForm(UserForm userForm, IntPtr HWND)
        {
            if (!UrlManage.lolBlock)
            {
                if (HWND == IntPtr.Zero)
                {
                    userForm.isOpen = false;
                    userForm.Hide();
                }
                else
                {
                    Win32Native.RECT lpRect = new Win32Native.RECT();
                    Win32Native.GetWindowRect(HWND, ref lpRect);
                    switch ((lpRect.Right - lpRect.Left))
                    {
                    case 0x400:
                        if ((ComHelp.GetPixelColor(userForm.hideLocation1, HWND).ToString() != userForm.hideColor1) && (userForm.hideColor1 != "0"))
                        {
                            if (!userForm.isOpen)
                            {
                                break;
                            }
                            userForm.isOpen = false;
                            userForm.Hide();
                            return;
                        }
                        Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location1.X, userForm.location1.Y, userForm.size1.Width, userForm.size1.Height, 0);
                        Win32Native.SetParent(userForm.Handle, HWND);
                        userForm.isOpen = true;
                        userForm.Show();
                        return;

                    case 0x500:
                        ComHelp.GetPixelColor(userForm.hideLocation2, HWND).ToString();
                        if (ComHelp.GetPixelColor(userForm.hideLocation2, HWND).ToString() == userForm.hideColor2)
                        {
                            if (!userForm.isOpen)
                            {
                                Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location2.X, userForm.location2.Y, userForm.size2.Width, userForm.size2.Height, 0);
                                Win32Native.SetParent(userForm.Handle, HWND);
                                userForm.isOpen = true;
                                userForm.Show();
                                return;
                            }
                            break;
                        }
                        if (!userForm.isOpen)
                        {
                            break;
                        }
                        userForm.isOpen = false;
                        userForm.Hide();
                        return;

                    case 0x640:
                        if (ComHelp.GetPixelColor(userForm.hideLocation3, HWND).ToString() == userForm.hideColor3)
                        {
                            Win32Native.SetWindowPos(userForm.Handle, 0, userForm.location3.X, userForm.location3.Y, userForm.size3.Width, userForm.size3.Height, 0);
                            Win32Native.SetParent(userForm.Handle, HWND);
                            userForm.isOpen = true;
                            userForm.Show();
                            return;
                        }
                        if (!userForm.isOpen)
                        {
                            break;
                        }
                        userForm.isOpen = false;
                        userForm.Hide();
                        return;

                    default:
                        userForm.isOpen = false;
                        userForm.Hide();
                        break;
                    }
                }
            }
        }