コード例 #1
0
 public void btnAuto_Click(object sender, RoutedEventArgs e)
 {
     if (!DataUtil.Game.isOnline)
     {
         return;
     }
     if (webHandle == IntPtr.Zero)
     {
         webHandle = mainWeb.Handle;
         webHandle = CordCol.GetWebHandle(webHandle);
         //独立出的获取句柄
         //StringBuilder className = new StringBuilder(100);
         //while (className.ToString() != "Internet Explorer_Server") // 浏览器组件类获取
         //{
         //    webHandle = GetWindow(webHandle, 5); // 获取子窗口的句柄
         //    GetClassName(webHandle, className, className.Capacity);
         //}
     }
     if (DataUtil.Game.isAuto)
     {
         MiscHelper.SetAutoGo(false);
     }
     else if (DataUtil.Game.canAuto)
     {
         MiscHelper.SetAutoGo(true);
     }
 }
コード例 #2
0
ファイル: CordWindow.xaml.cs プロジェクト: 5thYL/FlowerMaster
        /// <summary>
        /// 启动坐标与颜色窗口
        /// </summary>
        /// <param name="TopHandle">整个助理Handle</param>
        public CordWindow(IntPtr TopHandle)
        {
            InitializeComponent();
            IntPtr Handle = CordCol.GetWebHandle(TopHandle);

            System.Timers.Timer aTimer = new System.Timers.Timer(100);

            XBox.Text = "0";
            YBox.Text = "0";

            aTimer.Elapsed += (s, e) => GetCord(Handle);
            aTimer.Enabled  = true;
        }