当前位置: 首页>>代码示例>>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;未经允许,请勿转载。