private void btnGetDataFromServer_Click(object sender, EventArgs e)
 {
     //GetBrands();
     if (MessageBox.Show("获取数据需要较长时间,与您所处网络环境很大关系\n点击\"确定\"继续", "提示", MessageBoxButtons.OKCancel
         ).Equals(DialogResult.Cancel))
     {
         return;
     }
     Thread tGetBrands = new Thread(new ThreadStart(GetBrands));
     tGetBrands.IsBackground = true;
     tGetBrands.Start();
     btnGetDataFromServer.Enabled = false;
     ProgressForm pf = new ProgressForm();
     Datas.ProgresBarStyle = ProgressBarStyle.Marquee;
     pf.ShowDialog();
 }
 private void btnDownloadHTML_Click(object sender, EventArgs e)
 {
     Thread tGetBrands = new Thread(new ThreadStart(doGetHTML));
     tGetBrands.IsBackground = true;
     tGetBrands.Start();
     ProgressForm pf = new ProgressForm();
     Datas.ProgresBarStyle = ProgressBarStyle.Marquee;
     pf.ShowDialog();
 }
Exemple #3
0
        private void BtnRight_Click(object sender, EventArgs e)
        {
            FlowLayoutPanelFreqVisible = false;
            FlowLayoutPanelSetKindVisible = false;
            if (DisplayEmotion)
            {
                FlowLayoutPanelEmojVisible = true;
                return;
            }
            DisplayEmotion = true;

            ProgressForm progressForm = new ProgressForm();
            progressForm.ShowDialog();

            FlowLayoutPanelEmojVisible = true;
        }
 private void btnAnaLocalHTML_Click(object sender, EventArgs e)
 {
     listBoxBrand.Items.Clear();
     Thread tGetBrands = new Thread(new ThreadStart(doAnaLocalHtml));
     tGetBrands.IsBackground = true;
     tGetBrands.Start();
     ProgressForm pf = new ProgressForm();
     Datas.ProgresBarStyle = ProgressBarStyle.Marquee;
     pf.ShowDialog();
     autoResetEvent.WaitOne();
     for (int i = 0; i < listBrands.Count; i++)
     {
         listBoxBrand.Items.Add(listBrands[i].BrandName);
     }
 }
Exemple #5
0
 private void btnAutoAna_Click(object sender, EventArgs e)
 {
     Thread threadAutoAna = new Thread(new ThreadStart(doAutoAna));
     threadAutoAna.IsBackground = true;
     threadAutoAna.Start();
     ProgressForm pf = new ProgressForm();
     Datas.ProgresBarStyle = ProgressBarStyle.Marquee;
     pf.ShowDialog();
     (sender as Button).Enabled = false;
 }