當前位置: 首頁>>代碼示例>>C#>>正文


C# ComponentModel.ProgressChangedEventArgs類代碼示例

本文整理匯總了C#中System.ComponentModel.ProgressChangedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ProgressChangedEventArgs類的具體用法?C# ProgressChangedEventArgs怎麽用?C# ProgressChangedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ProgressChangedEventArgs類屬於System.ComponentModel命名空間,在下文中一共展示了ProgressChangedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: applyProgress

        protected void applyProgress(ProgressBar progress, ProgressChangedEventArgs e)
        {
            if(e.message!=null)
                progress.Text = e.message;
            progress.Sensitive = e.state== ProgressState.None;
            //progress.
            //progress.IsIndeterminate = e.state== ProgressState.Indeterminate;
            switch(e.state) {
                case ProgressState.Normal:
                    //progress.Foreground = default_progress_color;
                    break;
                case ProgressState.Error:
                    //progress.Foreground = Brushes.Red;
                    break;
                case ProgressState.Wait:
                    //progress.Foreground = Brushes.Yellow;
                    break;
            }

            progress.Visible = true;
            if(e.max==0)
                progress.Fraction = 0;
            else {
                progress.Fraction = (double)e.max/(double)e.value;
            }
        }
開發者ID:elkine,項目名稱:MASGAU,代碼行數:26,代碼來源:Window.cs

示例2: bw_ProgressChanged

 void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     progressBar1.Maximum = 100;
     progressBar1.Value = e.ProgressPercentage;
     // show downloading message
     SetLabel(line1, string.Format(Properties.Resources.ID_DOWNLOADINGFILE, downloadFile, e.ProgressPercentage));
 }
開發者ID:TimVelo,項目名稱:StackBuilder,代碼行數:7,代碼來源:FormUpdate.cs

示例3: backgroundWorker1_ProgressChanged

 private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     // Change the value of the ProgressBar to the BackgroundWorker progress.
     progressBar1.Value = e.ProgressPercentage;
     // Set the text.
     this.Text = e.ProgressPercentage.ToString();
 }
開發者ID:henkall,項目名稱:proccess-bar,代碼行數:7,代碼來源:Form1.cs

示例4: backgroundWorker_ProgressChanged

        //void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        //{
        //    this.Close();//執行完之後,直接關閉頁麵
        //}

        void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            this.progressBar.Value = e.ProgressPercentage;
            this.labelText.Text = (null != e.UserState) ? e.UserState.ToString() : "";
            //this.progressBar1.Value = e.ProgressPercentage;
            //this.textBox1.AppendText(e.UserState.ToString());//主窗體傳過來的值,通過e.UserState.ToString()來接受
        }
開發者ID:wsrf2009,項目名稱:KnxUiEditor,代碼行數:12,代碼來源:FrmProgress.cs

示例5: bg_ProgressChanged

      void bg_ProgressChanged(object sender, ProgressChangedEventArgs e)
      {
         progressBar1.Value = e.ProgressPercentage;

         GPoint p = (GPoint)e.UserState;
         this.Text = "Static Map maker: Downloading[" + p + "]: " + tileArea.IndexOf(p) + " of " + tileArea.Count;
      }
開發者ID:Saroko-dnd,項目名稱:My_DZ,代碼行數:7,代碼來源:StaticImage.cs

示例6: backgroundWorker_ProgressChanged

 private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if (UploadFileProgressChangedToDo != null)
     {
         UploadFileProgressChangedToDo(null, new AltProgressChangedEventArgs(e.ProgressPercentage / 2));
     }
 }
開發者ID:GHubgenius,項目名稱:Altman,代碼行數:7,代碼來源:FileUploadOrDownload.cs

示例7: backgroundWorker1_ProgressChanged

 private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     progressBar1.Value = e.ProgressPercentage;
     PedigreeSymbolRow psr = (PedigreeSymbolRow)e.UserState;
     flowLayoutPanel1.Controls.Add(psr);
     label1.Text = flowLayoutPanel1.Controls.Count.ToString();
 }
開發者ID:mahitosh,項目名稱:HRA4,代碼行數:7,代碼來源:PedigreeSymbolEditor.cs

示例8: ProgressChanged

    public void ProgressChanged(object sender, ProgressChangedEventArgs e)
    {
      if (e.UserState is WorkerProgressUserState)
      {
        var eState = (WorkerProgressUserState)e.UserState;
        if (eState.IsProgress)
        {
          int progressBarIndex = Math.Min(eState.ProgressBarIndex, this.progressBars.Length - 1);
          var pb = this.progressBars[progressBarIndex];
          if (eState.ProgressValue >= 100)
          {
            pb.Value = 100;
          }
          else
          {
            pb.Value = (int)eState.ProgressValue;
          }
        }
        else
        {
          AddLine(eState.LabelText);
        }
      }

      if (e.UserState is string)
      {
        AddLine((string)e.UserState);
      }

      this.progressBars[0].Value = e.ProgressPercentage;
    }
開發者ID:shengqh,項目名稱:RCPA.Core,代碼行數:31,代碼來源:WorkerProgressChangedTextBoxProxy.cs

示例9: OnUploadProgressChanged

 private void OnUploadProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if (ProgressChanged != null)
     {
         ProgressChanged(sender, e);
     }
 }
開發者ID:chris-tomich,項目名稱:Glyma,代碼行數:7,代碼來源:DroppedFileProcessor.cs

示例10: backgroundWorker1_ProgressChanged

 private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     progressBar1.Value = e.ProgressPercentage;
     ActiveSurveyRow asr = (ActiveSurveyRow)e.UserState;
     flowLayoutPanel1.Controls.Add(asr);
     loadCountLabel.Text = flowLayoutPanel1.Controls.Count.ToString();
 }
開發者ID:mahitosh,項目名稱:HRA4,代碼行數:7,代碼來源:ActiveSurveyEditor.cs

示例11: backgroundWorker1_ProgressChanged

        private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            curDiv += 1;

            string s = (string)e.UserState;
            label5.Text = curDiv.ToString() + " / " + divCount.ToString() + " : " +  s;
        }
開發者ID:mahitosh,項目名稱:HRA4,代碼行數:7,代碼來源:Reporting.cs

示例12: backgroundWorker_ProgressChanged

 private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if(progressBar.Value != e.ProgressPercentage)
         progressBar.Value = e.ProgressPercentage;
     if (e.UserState != null)
         label.Text = string.Format(MessageFormat, e.UserState);
 }
開發者ID:fizikci,項目名稱:Cinar,代碼行數:7,代碼來源:BackgroundWorkerDialog.cs

示例13: GetDevieBackgroundWorkerOnProgressChanged

        public static void GetDevieBackgroundWorkerOnProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            CheckedListBox c = (CheckedListBox)_o[0];
            Button stb = (Button)_o[1];

            if (Device.Count == 0)
            {
                c.Items.Clear();
                stb.Enabled = false;
            }
            else
            {
                foreach (string de in Device)
                {
                    if (!c.Items.Contains(de))
                        c.Items.Add(de);
                }
                List<string> del = (from string s in c.Items where !Device.Contains(s) select s).ToList();
                // ReSharper disable once ForCanBeConvertedToForeach
                for (int i = 0; i < del.Count; i++)
                {
                    c.Items.Remove(del[i]);
                }
                stb.Enabled = true;
            }
        }
開發者ID:narzul,項目名稱:ADCFTDI,代碼行數:26,代碼來源:DeviceBackGroundWorker.cs

示例14: OnProcessingProgress

 private void OnProcessingProgress(ProgressChangedEventArgs e)
 {
     if (Progress != null)
     {
         Progress(this, e);
     }
 }
開發者ID:Kontrast,項目名稱:PBS,代碼行數:7,代碼來源:AudioProcessor.cs

示例15: downBackgroundWorker_ProgressChanged

 void downBackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if (ProgressChanged != null)
     {
         ProgressChanged(e.ProgressPercentage);
     }
 }
開發者ID:csq12345,項目名稱:c_sharp,代碼行數:7,代碼來源:AMapWorker.cs


注:本文中的System.ComponentModel.ProgressChangedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。