Exemplo n.º 1
0
 public void Merge(DialogUpdateArguments argsToMerge)
 {
     if (!string.IsNullOrEmpty(argsToMerge.WaitMessage))
     {
         WaitMessage = argsToMerge.WaitMessage;
     }
     ProgressMessage  = argsToMerge.ProgressMessage ?? ProgressMessage;
     IsCancellable    = argsToMerge.IsCancellable;
     CurrentStepCount = argsToMerge.CurrentStepCount;
     TotalStepCount   = argsToMerge.TotalStepCount;
 }
 public void UpdateDialog(DialogUpdateArguments updateArguments)
 {
     if (_disposed)
     {
         return;
     }
     if (!_isDialogActive)
     {
         _dialogArguments?.Merge(updateArguments);
     }
     _provider.Update(updateArguments);
 }
 internal void Update(DialogUpdateArguments args)
 {
     if (_disposed)
     {
         throw new ObjectDisposedException(nameof(Close));
     }
     if (!_isDialogAcquired || _dataSource == null)
     {
         return;
     }
     if (!string.IsNullOrEmpty(args.WaitMessage))
     {
         _dataSource.WaitMessage = args.WaitMessage;
     }
     _dataSource.ProgressMessage     = args.ProgressMessage;
     _dataSource.IsCancellable       = args.IsCancellable;
     _dataSource.ShowMarqueeProgress = args.ShowMarqueeProgress;
     if (!_dataSource.IsProgressVisible || _dataSource.ShowMarqueeProgress)
     {
         return;
     }
     _dataSource.CurrentStep = args.CurrentStepCount;
     _dataSource.TotalSteps  = args.TotalStepCount;
 }