internal static void CreateAspSite(IConfigurator configurator, Microsoft.ManagementConsole.Advanced.Console console, SyncStatus status) { // Check Sql Settings ISqlServerSettings sqlSettings = configurator.SqlSettings; bool sqlSettingsOK = !string.IsNullOrEmpty(sqlSettings.Server); if (!sqlSettingsOK) { // TODO: Show Warning EditSqlServerSettingsForm editSqlSettinnsForm = new EditSqlServerSettingsForm(configurator); if (console.ShowDialog(editSqlSettinnsForm) == DialogResult.OK) { configurator.ChangeSqlServerSettings( editSqlSettinnsForm.SqlServerName, editSqlSettinnsForm.UseWindowsAuth ? AuthenticationType.Windows : AuthenticationType.SqlServer, editSqlSettinnsForm.SqlServerUser, editSqlSettinnsForm.SqlServerPassword, editSqlSettinnsForm.IbnUserName, editSqlSettinnsForm.IbnUserPassword); sqlSettingsOK = true; } } if (sqlSettingsOK) { CreateAspForm createAspForm = new CreateAspForm(configurator); if (console.ShowDialog(createAspForm) == DialogResult.OK) { if (status != null) { status.ReportProgress(0, 0, SnapInResources.ServerFormView_Action_AspCreate_Progress); } configurator.CreateAspSite(createAspForm.textBoxHost.Text , createAspForm.IisIPAddress , int.Parse(createAspForm.textBoxIisPort.Text) , createAspForm.IisPool ); } } }
internal static void CreateAspSite(IConfigurator configurator, Microsoft.ManagementConsole.Advanced.Console console, SyncStatus status) { // Check Sql Settings ISqlServerSettings sqlSettings = configurator.SqlSettings; bool sqlSettingsOK = !string.IsNullOrEmpty(sqlSettings.Server); if (!sqlSettingsOK) { // TODO: Show Warning EditSqlServerSettingsForm editSqlSettinnsForm = new EditSqlServerSettingsForm(configurator); if (console.ShowDialog(editSqlSettinnsForm) == DialogResult.OK) { configurator.ChangeSqlServerSettings( editSqlSettinnsForm.SqlServerName, editSqlSettinnsForm.UseWindowsAuth ? AuthenticationType.Windows : AuthenticationType.SqlServer, editSqlSettinnsForm.SqlServerUser, editSqlSettinnsForm.SqlServerPassword, editSqlSettinnsForm.IbnUserName, editSqlSettinnsForm.IbnUserPassword); sqlSettingsOK = true; } } if (sqlSettingsOK) { CreateAspForm createAspForm = new CreateAspForm(configurator); if (console.ShowDialog(createAspForm) == DialogResult.OK) { if (status != null) status.ReportProgress(0, 0, SnapInResources.ServerFormView_Action_AspCreate_Progress); configurator.CreateAspSite(createAspForm.textBoxHost.Text , createAspForm.IisIPAddress , int.Parse(createAspForm.textBoxIisPort.Text) , createAspForm.IisPool ); } } }