private void buttonInstall_Click(object sender, EventArgs e) { this.buttonInstall.Enabled = false; string strServiceName = this.textBoxInterfaceName.Text.Trim(); if (!CheckInteraceName(strServiceName)) { this.buttonInstall.Enabled = true; return; } if (HL7GatewayInterfaceHelper.InstallInterface(strServiceName , (InterfaceType)Enum.Parse(typeof(InterfaceType), this.comboBoxType.Text) , UpdateProgross)) { this.DialogResult = DialogResult.Yes; this.Close(); } else { MessageBoxHelper.ShowErrorInfomation("Install interface failed.please see log for details."); this.buttonInstall.Enabled = true; this.DialogResult = DialogResult.No; } }
public void UninstallInterface() { HL7InterfaceConfig config = GetSelectedInterface(); if (config == null) { MessageBoxHelper.ShowInformation("Select the interface you want to uninstall."); return; } if (!MessageBoxHelper.ShowConfirmBox("Are you sure to uninstall the selected interface?")) { return; } if (HL7GatewayInterfaceHelper.UninstallInterface(config)) { this.RefreshView(); } }