public ObjectDataSourceWizardForm(IServiceProvider serviceProvider, ObjectDataSourceDesigner objectDataSourceDesigner) : base(serviceProvider) { base.Glyph = new Bitmap(typeof(SqlDataSourceWizardForm), "datasourcewizard.bmp"); this._objectDataSourceDesigner = objectDataSourceDesigner; this._objectDataSource = (ObjectDataSource) this._objectDataSourceDesigner.Component; this.Text = System.Design.SR.GetString("ConfigureDataSource_Title", new object[] { this._objectDataSource.ID }); ObjectDataSourceChooseTypePanel panel = new ObjectDataSourceChooseTypePanel(this._objectDataSourceDesigner); ObjectDataSourceChooseMethodsPanel panel2 = new ObjectDataSourceChooseMethodsPanel(this._objectDataSourceDesigner); base.SetPanels(new WizardPanel[] { panel, panel2 }); this._parametersPanel = new ObjectDataSourceConfigureParametersPanel(this._objectDataSourceDesigner); base.RegisterPanel(this._parametersPanel); base.Size += new Size(0, 40); this.MinimumSize = base.Size; }
public override bool OnNext() { List <System.Type> list = new List <System.Type>(); System.Type deleteMethodDataObjectType = this.DeleteMethodDataObjectType; if (deleteMethodDataObjectType != null) { list.Add(deleteMethodDataObjectType); } System.Type insertMethodDataObjectType = this.InsertMethodDataObjectType; if (insertMethodDataObjectType != null) { list.Add(insertMethodDataObjectType); } System.Type updateMethodDataObjectType = this.UpdateMethodDataObjectType; if (updateMethodDataObjectType != null) { list.Add(updateMethodDataObjectType); } if (list.Count > 1) { System.Type type4 = list[0]; for (int i = 1; i < list.Count; i++) { if (type4 != list[i]) { UIServiceHelper.ShowError(base.ServiceProvider, System.Design.SR.GetString("ObjectDataSourceChooseMethodsPanel_IncompatibleDataObjectTypes")); return(false); } } } MethodInfo selectMethodInfo = this.SelectMethodInfo; if (selectMethodInfo == null) { return(false); } if (selectMethodInfo.GetParameters().Length > 0) { ObjectDataSourceConfigureParametersPanel nextPanel = base.NextPanel as ObjectDataSourceConfigureParametersPanel; if (nextPanel == null) { nextPanel = ((ObjectDataSourceWizardForm)base.ParentWizard).GetParametersPanel(); base.NextPanel = nextPanel; nextPanel.InitializeParameters(this._objectDataSource.SelectParameters); } nextPanel.SetMethod(this.SelectMethodInfo); } return(true); }
public ObjectDataSourceWizardForm(IServiceProvider serviceProvider, ObjectDataSourceDesigner objectDataSourceDesigner) : base(serviceProvider) { base.Glyph = new Bitmap(typeof(SqlDataSourceWizardForm), "datasourcewizard.bmp"); this._objectDataSourceDesigner = objectDataSourceDesigner; this._objectDataSource = (ObjectDataSource)this._objectDataSourceDesigner.Component; this.Text = System.Design.SR.GetString("ConfigureDataSource_Title", new object[] { this._objectDataSource.ID }); ObjectDataSourceChooseTypePanel panel = new ObjectDataSourceChooseTypePanel(this._objectDataSourceDesigner); ObjectDataSourceChooseMethodsPanel panel2 = new ObjectDataSourceChooseMethodsPanel(this._objectDataSourceDesigner); base.SetPanels(new WizardPanel[] { panel, panel2 }); this._parametersPanel = new ObjectDataSourceConfigureParametersPanel(this._objectDataSourceDesigner); base.RegisterPanel(this._parametersPanel); base.Size += new Size(0, 40); this.MinimumSize = base.Size; }