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


C# ProgressChangedEventArgs.ToString方法代码示例

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


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

示例1: bgWorker_Process_ProgressChanged

 private void bgWorker_Process_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     try
     {
         lblCurrentFile.Text = ProcessedFileCount.ToString() + " /  " + _RawFilesList.Count.ToString();
         if (ProcessingFile[0] != "0")
         {
             lblFileName1.Text = "FileName:" + Path.GetFileName(ProcessingFile[0]);
             lblStatus1.Text = ProcessingStatus[0];
             try
             {
                 progressBar1.Value = Convert.ToInt32(ProgressUpdate[ProcessingFile[0]] / (float)TotalScanNum[ProcessingFile[0]] * 100);
                 lblPercentage1.Text = (ProgressUpdate[ProcessingFile[0]] / (float)TotalScanNum[ProcessingFile[0]] * 100).ToString("00") + "%";
             }
             catch (Exception)
             {
                 progressBar1.Value = 0;
                 lblPercentage1.Text = "0%";
             }
         }
         else
         {
             lblFileName1.Text = "FileName:";
             lblStatus1.Text = "Status: Ready";
             progressBar1.Value = 0;
             lblPercentage1.Text = "0%";
         }
         if (ProcessingFile[1] != "0")
         {
             lblFileName2.Text = "FileName:" + Path.GetFileName(ProcessingFile[1]);
             lblStatus2.Text = ProcessingStatus[1];
             try
             {
                 progressBar2.Value = Convert.ToInt32(ProgressUpdate[ProcessingFile[1]] / (float)TotalScanNum[ProcessingFile[1]] * 100);
                 lblPercentage2.Text = (ProgressUpdate[ProcessingFile[1]] / (float)TotalScanNum[ProcessingFile[1]] * 100).ToString("00") + "%";
             }
             catch (Exception)
             {
                 progressBar2.Value = 0;
                 lblPercentage2.Text = "0%";
             }
         }
         else
         {
             lblFileName2.Text = "FileName:";
             lblStatus2.Text = "Status: Ready";
             progressBar2.Value = 0;
             lblPercentage2.Text = "0%";
         }
         if (ProcessingFile[2] != "0")
         {
             lblFileName3.Text = "FileName:" + Path.GetFileName(ProcessingFile[2]);
             lblStatus3.Text = ProcessingStatus[2];
             try
             {
                 progressBar3.Value = Convert.ToInt32(ProgressUpdate[ProcessingFile[2]] / (float)TotalScanNum[ProcessingFile[2]] * 100);
                 lblPercentage3.Text = (ProgressUpdate[ProcessingFile[2]] / (float)TotalScanNum[ProcessingFile[2]] * 100).ToString("00") + "%";
             }
             catch (Exception)
             {
                 progressBar3.Value = 0;
                 lblPercentage3.Text = "0%";
             }
         }
         else
         {
             lblFileName3.Text = "FileName:";
             lblStatus3.Text = "Status: Ready";
             progressBar3.Value = 0;
             lblPercentage3.Text = "0%";
         }
     }
     catch (Exception)
     {
         ErrMsg = ErrMsg + ("ErrMSG:" + e.ToString() + "\n");
     }
 }
开发者ID:chpaul,项目名称:MultiGlycan,代码行数:77,代码来源:frmBatchProcessing.cs

示例2: dowork1

 private void dowork1(object sender, ProgressChangedEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
开发者ID:kaushikwavhal,项目名称:UtilityApp,代码行数:4,代码来源:Form2.cs

示例3: bwUpdateFiles_ProgressChanged

 private void bwUpdateFiles_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     e.ToString();
     switch (e.ProgressPercentage)
     {
         case 1:
             sstriplblStatus.Text = e.UserState + ": Unpackaging the .zip update file.";
             break;
         case 2:
             sstriplblStatus.Text = e.UserState + ": Finding common directories.";
             break;
         case 3:
             sstriplblStatus.Text = e.UserState + ": Replacing files.";
             break;
         case 4:
             sstriplblStatus.Text = e.UserState + ": Replacing Windows only files";
             break;
         case 5:
             sstriplblStatus.Text = e.UserState + ": Compressing the backup files.";
             break;
         default:
             sstriplblStatus.Text = "Idle";
             break;
     }
 }
开发者ID:Gambini,项目名称:Overgrowth-Update,代码行数:25,代码来源:Form1.cs


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