protected override AsyncAction CreateAction(out bool cancelled)
 {
     cancelled = false;
     return new DelegatedAsyncAction(Pool.Connection, Messages.HELP_MESSAGE_DISABLE_WLB, "", "",
                                     ss =>
                                         {
                                             var action = new DisableWLBAction(Pool, true);
                                             action.RunExternal(ss);
                                             int count = 0;
                                             while (Helpers.WlbEnabled(Pool.Connection) && count < 10)
                                             {
                                                 Thread.Sleep(500);
                                                 count++;
                                             }
                                         }, true);
 }
示例#2
0
 private void DisableWLB(bool deconfigure)
 {
     DisableWLBAction action = new DisableWLBAction(_pool, deconfigure);
     action.Completed += Program.MainWindow.action_Completed;
     action.Completed += this.action_Completed;
     action.RunAsync();
     Program.MainWindow.UpdateToolbars();
 }