コード例 #1
0
        private void DoConnect()
        {
            Cursor cur = Cursor.Current;

            Cursor.Current = Cursors.WaitCursor;

            objXen.LogFile        = textLogFile.Text;
            objXen.Server         = textHost.Text;
            objXen.ServerAccount  = textAccount.Text;
            objXen.ServerPassword = textPassword.Text;

            objXen.Connect();

            textResult.Text = objXen.LastError.ToString() + ": " + objXen.GetErrorDescription(objXen.LastError);

            bConnected = objXen.LastError == 0;

            if (objXen.LastError == 0)
            {
                LoadVirtualMachines();
            }

            UpdateControls();
            Cursor.Current = cur;
        }