コード例 #1
0
        /// <summary>
        /// Apply optimization to a pool
        /// </summary>
        /// <param name="sender">object</param>
        /// <param name="e">EventArgs</param>
        private void ButtonApply_Click(object sender, EventArgs e)
        {
            if (this._pool == null)
            {
                return;
            }

            applyButton.Enabled = false;

            action = HelpersGUI.FindActiveOptAction(_xenObject.Connection);
            if ((action != null && action.GetType() != typeof(WlbOptimizePoolAction)) || action == null)
            {
                new WlbOptimizePoolAction(_pool, _vmOptList, _optId).RunAsync();
                Program.MainWindow.UpdateToolbars();
            }
        }
コード例 #2
0
        /// <summary>
        /// Apply optimization to a pool
        /// </summary>
        /// <param name="sender">object</param>
        /// <param name="e">EventArgs</param>
        private void ButtonApply_Click(object sender, EventArgs e)
        {
            if (this._pool == null)
            {
                return;
            }

            applyButton.Enabled = false;

            action = HelpersGUI.FindActiveOptAction(_xenObject.Connection);
            if ((action != null && action.GetType() != typeof(WlbOptimizePoolAction)) || action == null)
            {
                new WlbOptimizePoolAction(_pool, _vmOptList, _optId).RunAsync();

                // Switch to logs tab, since this action takes a while and there's no feedback on the HA tab
                Program.MainWindow.SwitchToTab(MainWindow.Tab.History);
                Program.MainWindow.UpdateToolbars();
            }
        }