Beispiel #1
0
        public DashBoard()
        {
            InitializeComponent();
            var gofish = new GoFishingProcess(_dmSoft, Common.FishStart, Common.FishStop);

            textBox1.Text  = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
            timer          = new Timer(10000);//实例化Timer类,设置间隔时间为10000毫秒;
            timer.Elapsed += (sender, args) =>
            {
                if (!executeTime.Equals(DateTime.MinValue) && executeTime - args.SignalTime < new TimeSpan(0, 0, 0, 10))
                {
                    executeTime = DateTime.MinValue;

                    Execute();
                }
            };                      //到达时间的时候执行事件;
            timer.AutoReset = true; //设置是执行一次(false)还是一直执行(true);
            timer.Enabled   = true; //是否执行System.Timers.Timer.Elapsed事件;
            timer.Start();
            //var str = _dmSoft.GetAveRGB(0, 0, Screen.AllScreens[0].Bounds.Width, Screen.AllScreens[0].Bounds.Height);

            // var wowManager = new WowManager(@"C:\Game\wow\黑暗之门登录器.exe", "h e a d l a n d", "D1 D2 D7 D1 D9 D0 D6 D1 D2 D0", _dmSoft);

            //493c20 493d1f
        }
Beispiel #2
0
        private void Execute()
        {
            var gofish = new GoFishingProcess(_dmSoft, Common.None, Common.None);

            gofish.Start();
        }