Example #1
0
        private void BtnStart_Click(object sender, EventArgs e)
        {
            WindowState = FormWindowState.Normal;
            Size        = new Size(800, 600);
            if (!Config.Instance().Read(SiteInfo.Instance().GetConfigFileName(mainSite, subSite)))
            {
                MessageBox.Show("请先设置参数", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            switch (mainSite)
            {
            case ESite.SIET_JINSHA:
                switch (subSite)
                {
                case ESubSite.AG_SITE:
                    Operator = new JinShaAgOperator(this);
                    break;
                }
                break;

            default:
                break;
            }
            if (Operator != null)
            {
                Operator.Start();
                ImageCapTimer.Start();
                btnStart.Enabled   = false;
                btnStop.Enabled    = true;
                btnSetting.Enabled = false;
                cbSubSite.Enabled  = false;
            }
        }
Example #2
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            switch (SiteLoader.GetInstance().GetSupplierType(cbSupplier.Text))
            {
            case SupplierType.SUPPLIER_AG:
                gamer = new GamerAG(this);
                break;

            default:
                break;
            }
            if (gamer != null)
            {
                WindowState = FormWindowState.Normal;
                Size        = new Size(1024, 768);
                ImageCapTimer.Start();
                gamer.Start();
                btnStart.Enabled = false;
                btnStop.Enabled  = true;
            }
        }