Changeset 2200
- Timestamp:
- 6/19/2010 2:19:50 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/eraser/Eraser.Util/ProgressManager.cs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Util/ProgressManager.cs
r2160 r2200 58 58 /// Gets the percentage of the operation completed. 59 59 /// </summary> 60 /// <remarks>If the <see cref="ProgressIndeterminate"/> property is true, this 61 /// property will return <see cref="System.Float.NaN"/>.</remarks> 60 62 public abstract float Progress 63 { 64 get; 65 } 66 67 /// <summary> 68 /// Gets whether the current progress is undefined. 69 /// </summary> 70 public abstract bool ProgressIndeterminate 61 71 { 62 72 get; … … 137 147 { 138 148 /// <summary> 149 /// Marks this task's progress as indeterminate. 150 /// </summary> 151 public void MarkIndeterminate() 152 { 153 progressIndeterminate = true; 154 } 155 156 /// <summary> 139 157 /// Marks this task as complete. 140 158 /// </summary> … … 193 211 if (Total == 0) 194 212 return 0.0f; 213 else if (ProgressIndeterminate) 214 return float.NaN; 195 215 196 216 return (float)((double)Completed / Total); 197 217 } 198 218 } 219 220 public override bool ProgressIndeterminate 221 { 222 get 223 { 224 return progressIndeterminate; 225 } 226 } 227 228 /// <summary> 229 /// Stores whether the progress of the current task cannot be determined. 230 /// </summary> 231 /// <see cref="ProgressIndeterminate"/> 232 private bool progressIndeterminate; 199 233 200 234 public override float Speed … … 482 516 } 483 517 518 public override bool ProgressIndeterminate 519 { 520 get 521 { 522 lock (ListLock) 523 return Steps.Any(x => x.Progress.ProgressIndeterminate); 524 } 525 } 526 484 527 public override float Speed 485 528 { … … 832 875 } 833 876 877 public override bool ProgressIndeterminate 878 { 879 get 880 { 881 lock (TaskLock) 882 return Tasks.Any(x => x.ProgressIndeterminate); 883 } 884 } 885 834 886 public override float Speed 835 887 {
Note: See TracChangeset
for help on using the changeset viewer.
