Пример #1
0
 private void tick(object sender, EventArgs e)
 {
     try
     {
         Win32Native.ClearMemory(base.Handle);
         IntPtr hWnd = Win32Native.FindWindow("地下城与勇士", "地下城与勇士");
         if (hWnd != IntPtr.Zero)
         {
             if (Win32Native.FindWindow("DNF_WND_CHAT", null) != IntPtr.Zero)
             {
                 Win32Native.RECT lpRect = new Win32Native.RECT();
                 Win32Native.GetWindowRect(hWnd, ref lpRect);
                 try
                 {
                     base.WindowState = FormWindowState.Maximized;
                     Win32Native.SetWindowPos(base.Handle, (int)hWnd, lpRect.Left + this.p.X, lpRect.Top + this.p.Y, this.s.Width, this.s.Height, 0x40);
                 }
                 catch
                 {
                 }
             }
         }
         else
         {
             this.timer.Stop();
             base.Close();
         }
     }
     catch
     {
     }
 }
Пример #2
0
        private void Func(object sender, EventArgs e)
        {
            Win32Native.ClearMemory(base.Handle);
            if (!this.isThread)
            {
                this.CheckColor();
                this.isThread = true;
                IntPtr hWND = Win32Native.FindWindow("地下城与勇士", "地下城与勇士");
                IntPtr ptr2 = Win32Native.FindWindow("vguiPopupWindow", "Steam");
                foreach (UserForm form in UrlManage.__FormsList)
                {
                    IntPtr ptr3 = Win32Native.FindWindow(form.ClassName, form.WindowName);
                    switch (form.WindowName)
                    {
                    case "League of Legends":
                        this.SetLoLForm(form, ptr3);
                        break;

                    case "WeGame":
                        this.SetWeGameForm(form, ptr3);
                        break;

                    default:
                        this.SetOtherParnetForm(form, ptr3);
                        break;
                    }
                }
                this.SetDNFForm(hWND);
                this.SetSteamShow(ptr2);
                this.isThread = false;
            }
        }