private void buttonDeleteConfigure_Click(object sender, EventArgs e) { if (new ThreeButtonDialog( new ThreeButtonDialog.Details(null, Messages.MESSAGEBOX_OVSC_DELETE, Messages.MESSAGEBOX_OVSC_DELETE_TITLE), ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo).ShowDialog(this) == DialogResult.Yes) { OVSCConfigurationAction action = new OVSCConfigurationAction(this._pool.Connection, this._pool); if (action != null) { ActionProgressDialog dialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks); dialog.ShowCancel = true; dialog.ShowDialog(this); } } this.Rebuild(); }
private void buttonSave_Click(object sender, EventArgs e) { Pool pool = this._xenObject as Pool; if (pool == null) { return; } Dictionary <string, string> args = new Dictionary <string, string>(); args.Add("protocol", this.radioButtonTCPIP.Checked ? this.radioButtonTCPIP.Tag.ToString() : this.radioButtonSSL.Tag.ToString()); args.Add("controller_ip", this.textBoxvSwitchControllerIP.Text); args.Add("controller_port", this.textBoxPort.Text); if (checkBoxRegister.Checked) { args.Add("controller_username", textBoxUserName.Text); args.Add("controller_password", textBoxPassword.Text); args.Add("vgate_username", this._xenConnection.Username); args.Add("vgate_password", this._xenConnection.Password); args.Add("master_address", GetMasterAddress(pool)); } OVSCConfigurationAction action = new OVSCConfigurationAction(_xenConnection, pool, args, checkBoxRegister.Checked, 0); if (action != null) { ActionProgressDialog dialog = new ActionProgressDialog(action, ProgressBarStyle.Blocks); dialog.ShowCancel = true; dialog.ShowDialog(this); this.SaveButtonClick(sender, e); if (action.Exception == null) { this.Close(); } } }