/// <summary>
        /// Opens and shows the progress dialog.
        /// </summary>
        /// <param name="caption">The caption to use for the dialog.</param>
        /// <param name="message">The message to use in the dialog.</param>
        /// <param name="progressMessage">The progress message to show.</param>
        /// <param name="operations">The list of operations to track.</param>
        /// <param name="cancellationTokenSource">The <seealso cref="CancellationTokenSource"/> to be used to cancel the operations.</param>
        public static void PromptUser(
            string caption,
            string message,
            string progressMessage,
            IEnumerable <GcsOperation> operations,
            CancellationTokenSource cancellationTokenSource)
        {
            var dialog = new GcsFileProgressDialogWindow(caption, message, progressMessage, operations, cancellationTokenSource);

            dialog.ShowModal();
        }
        public GcsFileProgressDialogViewModel(
            string message,
            string progressMessage,
            GcsFileProgressDialogWindow owner,
            IEnumerable <GcsOperation> operations,
            CancellationTokenSource tokenSource)
        {
            _owner           = owner;
            _tokenSource     = tokenSource;
            _progressMessage = progressMessage;

            Message    = message;
            Operations = new ObservableCollection <GcsOperation>(operations);
            foreach (var operation in Operations)
            {
                operation.Completed += OnOperationCompleted;
                operation.Started   += OnOperationStarted;
            }

            _owner.IsCloseButtonEnabled = false;
            Caption       = Resources.UiStopButtonCaption;
            ActionCommand = new ProtectedCommand(OnActionCommand);
            ExpandCollapseDetailsCommand = new ProtectedCommand(OnExpandCollapseDetailsCommand);
        }