Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 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;
 }