本文整理汇总了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");
}
}
示例2: dowork1
private void dowork1(object sender, ProgressChangedEventArgs e)
{
MessageBox.Show(e.ToString());
}
示例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;
}
}