public ProgressNotificationId StartProgress(String messageFormat, params Object[] args) { lock (ProgressNotificationSync) { var update = new ProgressNotificationUpdate() { IsVisible = true, IsIndeterminate = false, Message = String.Format(messageFormat, args), Value = 0 }; Updates.Add(update); OnProgressNotificationUpdated(update); return(update.Id); } }
public ProgressNotificationId ShowProgress(String message) { lock (ProgressNotificationSync) { var update = new ProgressNotificationUpdate() { IsVisible = true, IsIndeterminate = true, Message = message, Value = null }; Updates.Add(update); OnProgressNotificationUpdated(update); return(update.Id); } }
public async Task ShowProgressMessageAsync(String message) { var update = new ProgressNotificationUpdate() { IsVisible = true, IsIndeterminate = false, Message = message, Value = null }; lock (ProgressNotificationSync) { Updates.Add(update); OnProgressNotificationUpdated(update); } await Task.Delay(2000); HideProgress(update.Id); }
private void OnProgressNotificationUpdated(ProgressNotificationUpdate value) { ProgressNotification = value; ProgressNotificationUpdated(this, value); }