private void installDB() { try { Locale locale = (Locale)cbLang.SelectedItem; Localization.Instance.ResourcesLoad(locale); } catch { } //DBInstallManager dbInstaller = new DBInstallManager("SERVER\\BAUMAX", "BauMax_Test", teUserName.Text, tePassword.Text); DBInstallManager dbInstaller = new DBInstallManager("SERVER\\BAUMAX", "BauMax_Test"); dbInstaller.OnMessage += new Baumax.DBInstaller.MessageEventHandler(onDbInstallMessage); dbInstaller.OnInstallProgressChanged += new InstallProgressEventHangler(onDbInstallProgress); dbInstaller.OnDbInstallComplete += new InstallCompleteEventHandler(onDbInstallComplete); dbInstaller.OnInstallBatchProgressChanged += new InstallProgressEventHangler(onDbInstallBatchProgress); dbInstaller.OnInstallBatchComplete += new InstallCompleteEventHandler(onDbInstallBatchComplete); memoEdit.Text = ""; dbInstaller.InstallDB(); }
private void installDB() { try { DBInstallManager dbInstaller; if (cbIntegratedSecurity.Checked) dbInstaller = new DBInstallManager(tbServerName.Text, tbDBName.Text); else dbInstaller = new DBInstallManager(tbServerName.Text, tbDBName.Text, tbUserName.Text, tbPassword.Text); dbInstaller.OnMessage += new MessageEventHandler(onDbInstallMessage); dbInstaller.OnInstallProgressChanged += new InstallProgressEventHangler(onDbInstallProgress); dbInstaller.OnDbInstallComplete += new InstallCompleteEventHandler(onDbInstallComplete); dbInstaller.OnInstallBatchProgressChanged += new InstallProgressEventHangler(onDbInstallBatchProgress); dbInstaller.OnInstallBatchComplete += new InstallCompleteEventHandler(onDbInstallBatchComplete); dbInstaller.InstallDB(); } catch (Exception ex) { memoEdit.Text = ex.Message; onDbInstallComplete(this, new InstallCompleteEventArgs(false)); } }