当前位置: 首页>>代码示例>>C#>>正文


C# ProgressBar.Update方法代码示例

本文整理汇总了C#中System.Windows.Forms.ProgressBar.Update方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressBar.Update方法的具体用法?C# ProgressBar.Update怎么用?C# ProgressBar.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.ProgressBar的用法示例。


在下文中一共展示了ProgressBar.Update方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateProgressBar

 private void UpdateProgressBar(ProgressBar bar, int maxValue, int current)
 {
     if (bar.InvokeRequired)
     {
         bar.BeginInvoke(new Action<ProgressBar, int, int>(UpdateProgressBar), bar, maxValue, current);
     }
     else
     {
         bar.Maximum = maxValue;
         bar.Value = current;
         bar.Update();
         bar.Parent.Update();
     }
 }
开发者ID:hmanjarawala,项目名称:GitRepo,代码行数:14,代码来源:Form1.cs

示例2: SetProgressNoAnimation

 /// <summary>
 /// Used to circumvent the animations used on progress bars in Windows 7 and up.
 /// Includes a Update() call to take care of redraw.
 /// </summary>
 /// <param name="pb">The progress bar to be updated</param>
 /// <param name="value">Value from 0 to 100 for the progress bar</param>
 public static void SetProgressNoAnimation(ProgressBar pb, int value)
 {
     // To get around the progressive animation, we need to move the
     // progress bar backwards.
     if (value == pb.Maximum)
     {
         // Special case as value can't be set greater than Maximum.
         pb.Maximum = value + 1;     // Temporarily Increase Maximum
         pb.Value = value + 1;       // Move past
         pb.Maximum = value;         // Reset maximum
     }
     else
     {
         pb.Value = value + 1;       // Move past
     }
     pb.Value = value;               // Move to correct value
     pb.Update();
 }
开发者ID:Xercodo,项目名称:XUnpack,代码行数:24,代码来源:RunWindow.cs

示例3: InvokeProgressBarUpdate2

 private void InvokeProgressBarUpdate2(ProgressBar Object)
 {
     Object.Update();
 }
开发者ID:Sajaki,项目名称:uniuploader,代码行数:4,代码来源:Windows.cs

示例4: progressBarVerificacao

 /* INICIO DA VERIFICAÇÃO E LIMPEZA */
 public void progressBarVerificacao(int valor, ProgressBar a)
 {
     a.Value = 0;
     a.Update();
     a.Visible = true;
     a.Maximum = valor;
 }
开发者ID:gabrielsolucoesvip,项目名称:atualizador,代码行数:8,代码来源:Atualizador.cs


注:本文中的System.Windows.Forms.ProgressBar.Update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。