Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }