Exemple #1
0
        public ProgressWindow(ProgressDialogSettings settings)
        {
            InitializeComponent();

            //Cristhian|08/02/2018|FEI2-587
            /*Aqui se define si se muestra el texto o el botón de cancelar*/
            /*INICIO MODIFICACIóN*/
            if (settings == null)
            {
                settings = ProgressDialogSettings.WithLabelOnly;
                //settings = ProgressDialogSettings.WithLabelOnly;
                //Aqui se seleciona si debe aparecer o no el boton de cancel
            }
            /*FIN MODIFICACIóN*/

            if (settings.ShowSubLabel)
            {
                Height    = 140;
                MinHeight = 140;
                SubTextLabel.Visibility = Visibility.Visible;
            }
            else
            {
                Height    = 110;
                MinHeight = 110;
                SubTextLabel.Visibility = Visibility.Collapsed;
            }

            CancelButton.Visibility = settings.ShowCancelButton ? Visibility.Visible : Visibility.Collapsed;

            ProgressBar.IsIndeterminate = settings.ShowProgressBarIndeterminate;
        }
Exemple #2
0
        internal static ProgressDialogResult ExecuteInternal(Window owner, string label, object operation, ProgressDialogSettings settings)
        {
            ProgressWindow dialog = new ProgressWindow(settings);

            dialog.Owner = owner;

            if (!string.IsNullOrEmpty(label))
            {
                dialog.Label = label;
            }

            return(dialog.Execute(operation));
        }
Exemple #3
0
 internal static ProgressDialogResult Execute(Window owner, string label, Func <object> operationWithResult, ProgressDialogSettings settings)
 {
     return(ExecuteInternal(owner, label, (object)operationWithResult, settings));
 }