예제 #1
0
        public ProgressDialog(CushWindow owningWindow, ProgressDialogSettings settings)
            : base(owningWindow, settings)
        {
            InitializeComponent();

            if (settings == null)
                settings = ProgressDialogSettings.Cancellable;

            CancelButton.Visibility = settings.ShowCancelButton ? Visibility.Visible : Visibility.Collapsed;
        }
예제 #2
0
        internal static ProgressDialogResult ExecuteInternal(CushWindow owner, string title, object operation,
            ProgressDialogSettings settings)
        {
            var dialog = new ProgressDialog(owner, settings);

            if (!string.IsNullOrEmpty(title))
                dialog.Title = title;

            return dialog.Execute(operation);
        }
예제 #3
0
 internal static ProgressDialogResult Execute(CushWindow owner, string label,
     Action<BackgroundWorker, DoWorkEventArgs> operation, ProgressDialogSettings settings)
 {
     return ExecuteInternal(owner, label, operation, settings);
 }