Beispiel #1
0
        /// <summary>
        /// 提交已出的价格
        /// </summary>
        public void SubmitOfferedPrice()
        {
            // TODO: 为了尽快的点击到确定按钮,提供3种模式
            if (conf.IsConfirmModeNormal())
            {
                actionManager.ClickButtonAtPoint(actionManager.AddDelta(554, 506), false, "第二阶段提交#1");
            }
            else if (conf.IsConfirmModeMixed())
            {
                actionManager.ClickButtonAtPoint(actionManager.AddDelta(554, 506), false, "第二阶段提交#1");
                actionManager.ClickButtonByFenceWayLToR(actionManager.AddDelta(553, 500));
            }
            else if (conf.IsConfirmModeFence())
            {
                actionManager.ClickButtonByFenceWayLToR(actionManager.AddDelta(553, 500));
            }
            else
            {
                actionManager.ClickButtonByFenceWayLToR(actionManager.AddDelta(553, 500));
            }

            // TODO: 等待, 点击完成验证码确认按钮, 会弹出 出价有效
            // TODO: 应该检测 区域 是否有 出价有效
            KK.Sleep(600);

            // 尝试得到提交的结果截图, 0.6s 1.6s 2.6s
            ThreadUtils.StartNewBackgroudThread(() => {
                for (int i = 0; i < 3; i++)
                {
                    try
                    {
                        string imgPath = actionManager.CaptureFlashScreen();
                        logger.InfoFormat("result of phase2-act is {0}", imgPath);
                        KK.Sleep((i + 1) * 1000);
                    }
                    catch (Exception e)
                    {
                        logger.Error("act2 background CaptureFlashScreen error", e);
                    }
                }
            });


            actionManager.ClickButtonAtPoint(actionManager.AddDelta(661, 478), false, "第二阶段提交#确定");

            // 清除以前输入的价格
            actionManager.CleanTextAtPoint(actionManager.AddDelta(676, 417), 6, true, "第二阶段提交");
        }
Beispiel #2
0
        /// <summary>
        /// 提交已出的价格
        /// </summary>
        public void SubmitOfferedPrice()
        {
            actionManager.ClickButtonByFenceWayLToR(actionManager.AddDelta(553, 500));

            // TODO: 等待, 点击完成验证码确认按钮, 会弹出 出价有效
            // TODO: 应该检测 区域 是否有 出价有效
            KK.Sleep(600);
            actionManager.ClickButtonAtPoint(actionManager.AddDelta(661, 478), false, "第一阶段提交#确定");

            // 清除以前输入的价格
            actionManager.CleanTextAtPoint(actionManager.AddDelta(676, 417), 6, true, "第一阶段提交");
        }