10using System.Web.UI.Design;
11using System.ComponentModel;
12using System.Windows.Forms.Design;
23 private DataSourceControl _control =
null;
33 base.Initialize(component);
34 _control = (DataSourceControl)component;
37 internal System.ComponentModel.ISite Site
52 public override DesignerDataSourceView
GetView(
string viewName)
69 return new string[] {
"Default" };
79 this.OnSchemaRefreshed(EventArgs.Empty);
100 InvokeTransactedChange(_control, ConfigureCallback,
null,
"ConfigureDataSource");
103 private bool ConfigureCallback(
object context)
108 if (
string.IsNullOrEmpty(((
CslaDataSource)DataSourceControl).TypeAssemblyName))
111 oldTypeName =
string.Format(
"{0}, {1}",
114 IUIService uiService = (IUIService)_control.Site.GetService(typeof(IUIService));
116 if (uiService.ShowDialog(cfg) == System.Windows.Forms.DialogResult.OK)
118 SuppressDataSourceEvents();
121 ((
CslaDataSource)DataSourceControl).TypeAssemblyName =
string.Empty;
123 OnDataSourceChanged(EventArgs.Empty);
128 ResumeDataSourceEvents();
A Web Forms data binding control designed to support CSLA .NET business objects as data sources.
CslaDataSource configuration form.
string TypeName
Gets the type name entered by the user.
override void Dispose(bool disposing)
Clean up any resources being used.
Implements designer support for CslaDataSource.
override bool CanRefreshSchema
Get a value indicating whether the control can refresh its schema.
override void RefreshSchema(bool preferSilent)
Refreshes the schema for the data.
override bool AllowResize
Get a value indicating whether the control can be resized.
override string[] GetViewNames()
Return a list of available views.
override void Configure()
Invoke the design time configuration support provided by the control.
override bool CanConfigure
Get a value indicating whether this control supports design time configuration.
override void Initialize(IComponent component)
Initialize the designer component.
override DesignerDataSourceView GetView(string viewName)
Returns the default view for this designer.
Object responsible for providing details about data binding to a specific CSLA .NET object.