Ejemplo n.º 1
0
        private bool InitializeWLB()
        {
            //combine url and port
            string wlbHost = textboxWlbUrl.Text;
            string wlbPort = textboxWLBPort.Text;
            IPAddress address;
            string wlbUrl = (IPAddress.TryParse(wlbHost, out address) && address.AddressFamily == AddressFamily.InterNetworkV6) ?
                ("[" + wlbHost + "]:" + wlbPort) : (wlbHost + ":" + wlbPort);

            //handle the wlb creds
            string wlbUserName = textboxWlbUserName.Text;
            string wlbPassword = textboxWlbPassword.Text;

            //handle the xenserver creds
            string xsUserName = textboxXSUserName.Text;
            string xsPassword = textboxXSPassword.Text;

            InitializeWLBAction action = new InitializeWLBAction(_pool, wlbUrl, wlbUserName, wlbPassword, xsUserName, xsPassword);
            using (var dialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks))
            {
                dialog.ShowCancel = true;
                dialog.ShowDialog(this);
            }

            Program.MainWindow.UpdateToolbars();
            return action.Succeeded;
        }
Ejemplo n.º 2
0
        private bool InitializeWLB()
        {
            //combine url and port
            string wlbUrl = textboxWlbUrl.Text + ":" + textboxWLBPort.Text;

            //handle the wlb creds
            string wlbUserName = textboxWlbUserName.Text;
            string wlbPassword = textboxWlbPassword.Text;

            //handle the xenserver creds
            string xsUserName = textboxXSUserName.Text;
            string xsPassword = textboxXSPassword.Text;

            InitializeWLBAction action = new InitializeWLBAction(_pool, wlbUrl, wlbUserName, wlbPassword, xsUserName, xsPassword);
            ActionProgressDialog dialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks);
            dialog.ShowCancel = true;
            dialog.ShowDialog(this);

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