コード例 #1
0
ファイル: ToolProgress.cs プロジェクト: yangkf1985/DotSpatial
 /// <summary>
 /// Handles the progress method necessary to implement IProgress
 /// </summary>
 /// <param name="key">This a message with no percentage information..this is ignored</param>
 /// <param name="percent">The integer percentage from 0 to 100 that is used to control the progress bar</param>
 /// <param name="message">The actual complete message to show..this is also ignored</param>
 public void Progress(string key, int percent, string message)
 {
     if (InvokeRequired)
     {
         UpdateProg prg = UpdateProgress;
         BeginInvoke(prg, new object[] { key, percent, message });
     }
     else
     {
         UpdateProgress(key, percent, message);
     }
 }
コード例 #2
0
 /// <summary>
 /// Handles the progress method necessary to implement IProgress.
 /// </summary>
 /// <param name="percent">The integer percentage from 0 to 100 that is used to control the progress bar</param>
 /// <param name="message">The actual complete message to show..this is also ignored</param>
 public void Progress(int percent, string message)
 {
     if (InvokeRequired)
     {
         UpdateProg prg = UpdateProgress;
         BeginInvoke(prg, percent, message);
     }
     else
     {
         UpdateProgress(percent, message);
     }
 }