Exemple #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //便于并发请求同时进行
            ServicePointManager.MaxServicePoints                  = 512;
            ServicePointManager.DefaultConnectionLimit            = 512;
            System.Net.ServicePointManager.DefaultConnectionLimit = 64;

            //禁用跨线程UI操作检查
            Control.CheckForIllegalCrossThreadCalls = false;

            Config.LoadConfig();

            BaiDuOCR.InitBaiDuOCR(Config.OCR_API_KEY, Config.OCR_SECRET_KEY);

            browserForm = new BrowserForm();
            browserForm.Show();
            MainForm_Move(null, null);

            HotKey.RegisterHotKey(Handle, 100, HotKey.KeyModifiers.None, Keys.F7);
        }
Exemple #2
0
 private void BrowserForm_Load(object sender, EventArgs e)
 {
     browserForm = this;
 }