示例#1
0
 public void CancelProgress()
 {
     FirstPBar.BackColor  = Color.Red;
     SecondPBar.BackColor = Color.Red;
     FirstPBar.Invalidate();
     SecondPBar.Invalidate();
 }
示例#2
0
 public void SetProgress2(string Prefix, double Now, double Target, string Suffix)
 {
     SecondLabel.Text = Prefix + Now.ToString() + "/" + Target.ToString() + Suffix;
     SecondPBar.Value = (((int)(Now * 100.0 / Target)) > 100) ? 100 : ((((int)(Now * 100.0 / Target)) < 0) ? 0 : (int)(Now * 100.0 / Target));
     SecondLabel.Invalidate();
     SecondPBar.Invalidate();
 }