public override bool OnNext() { if (this._saveCheckBox.Checked) { ICollection connections = this._dataEnvironment.Connections; StringDictionary dictionary = new StringDictionary(); foreach (DesignerDataConnection connection in connections) { if (connection.IsConfigured) { dictionary.Add(connection.Name, null); } } if (dictionary.ContainsKey(this._nameTextBox.Text)) { UIServiceHelper.ShowError(base.ServiceProvider, System.Design.SR.GetString("SqlDataSourceSaveConfiguredConnectionPanel_DuplicateName", new object[] { this._nameTextBox.Text })); this._nameTextBox.Focus(); return(false); } } WizardPanel panel = SqlDataSourceConnectionPanel.CreateCommandPanel((SqlDataSourceWizardForm)base.ParentWizard, this._dataConnection, base.NextPanel); if (panel == null) { return(false); } base.NextPanel = panel; return(true); }
public SqlDataSourceWizardForm(IServiceProvider serviceProvider, System.Web.UI.Design.WebControls.SqlDataSourceDesigner sqlDataSourceDesigner, IDataEnvironment dataEnvironment) : base(serviceProvider) { base.Glyph = new Bitmap(typeof(SqlDataSourceWizardForm), "datasourcewizard.bmp"); this._dataEnvironment = dataEnvironment; this._sqlDataSource = (SqlDataSource)sqlDataSourceDesigner.Component; this._sqlDataSourceDesigner = sqlDataSourceDesigner; this.Text = System.Design.SR.GetString("ConfigureDataSource_Title", new object[] { this._sqlDataSource.ID }); this._connectionPanel = this.CreateConnectionPanel(); base.SetPanels(new WizardPanel[] { this._connectionPanel }); this._saveConfiguredConnectionPanel = new SqlDataSourceSaveConfiguredConnectionPanel(this._sqlDataSourceDesigner, this._dataEnvironment); base.RegisterPanel(this._saveConfiguredConnectionPanel); this._configureParametersPanel = new SqlDataSourceConfigureParametersPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._configureParametersPanel); this._configureSelectPanel = new SqlDataSourceConfigureSelectPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._configureSelectPanel); this._customCommandPanel = new SqlDataSourceCustomCommandPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._customCommandPanel); this._summaryPanel = new SqlDataSourceSummaryPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._summaryPanel); base.Size += new Size(0, 40); this.MinimumSize = base.Size; }
public SqlDataSourceWizardForm(IServiceProvider serviceProvider, System.Web.UI.Design.WebControls.SqlDataSourceDesigner sqlDataSourceDesigner, IDataEnvironment dataEnvironment) : base(serviceProvider) { base.Glyph = new Bitmap(typeof(SqlDataSourceWizardForm), "datasourcewizard.bmp"); this._dataEnvironment = dataEnvironment; this._sqlDataSource = (SqlDataSource) sqlDataSourceDesigner.Component; this._sqlDataSourceDesigner = sqlDataSourceDesigner; this.Text = System.Design.SR.GetString("ConfigureDataSource_Title", new object[] { this._sqlDataSource.ID }); this._connectionPanel = this.CreateConnectionPanel(); base.SetPanels(new WizardPanel[] { this._connectionPanel }); this._saveConfiguredConnectionPanel = new SqlDataSourceSaveConfiguredConnectionPanel(this._sqlDataSourceDesigner, this._dataEnvironment); base.RegisterPanel(this._saveConfiguredConnectionPanel); this._configureParametersPanel = new SqlDataSourceConfigureParametersPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._configureParametersPanel); this._configureSelectPanel = new SqlDataSourceConfigureSelectPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._configureSelectPanel); this._customCommandPanel = new SqlDataSourceCustomCommandPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._customCommandPanel); this._summaryPanel = new SqlDataSourceSummaryPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._summaryPanel); base.Size += new Size(0, 40); this.MinimumSize = base.Size; }