public void UpdateProgress(int value) { if (this.OnProgressUpdated != null) { if (IsCancelled()) { value = 100; } this.OnProgressUpdated(value); } }