Exemple #1
0
 private void EnableWLB()
 {
     // Enable WLB.
     EnableWLBAction action = new EnableWLBAction(_pool);
     // We will need to re-enable buttons when the action completes
     action.Completed += Program.MainWindow.action_Completed;
     action.Completed += this.action_Completed;
     action.RunAsync();
     Program.MainWindow.UpdateToolbars();
 }
        private bool EnableWlb()
        {
            // Enable WLB.
            EnableWLBAction action = new EnableWLBAction(_pool);
            // We will need to re-enable buttons when the action completes
            action.Completed += Program.MainWindow.action_Completed;
            using (var dialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks))
            {
                dialog.ShowCancel = true;
                dialog.ShowDialog(this);
            }

            Program.MainWindow.UpdateToolbars();
            return action.Succeeded;
        }