9using System.Collections;
11using System.ComponentModel.Design;
12using System.Windows.Forms;
21 private DataSourceControl _control;
28 InitializeComponent();
41 this.TypeComboBox.Text = oldTypeName;
49 get {
return this.TypeComboBox.Text; }
52 private void DiscoverTypes()
55 ITypeDiscoveryService discovery =
null;
56 if (_control.Site !=
null)
57 discovery = (ITypeDiscoveryService)_control.Site.GetService(typeof(ITypeDiscoveryService));
59 if (discovery !=
null)
62 Cursor previousCursor = Cursor.Current;
63 Cursor.Current = Cursors.WaitCursor;
67 ICollection types = discovery.GetTypes(typeof(
object),
true);
68 TypeComboBox.BeginUpdate();
69 TypeComboBox.Items.Clear();
71 foreach (Type type
in types)
73 if (type.Assembly.FullName.Substring(0, type.Assembly.FullName.IndexOf(
",")) !=
"Csla" &&
76 string name = type.AssemblyQualifiedName;
77 if (name.Substring(name.Length - 19, 19) ==
"PublicKeyToken=null")
78 name = name.Substring(0, name.IndexOf(
",", name.IndexOf(
",") + 1));
79 TypeComboBox.Items.Add(name);
85 Cursor.Current = previousCursor;
86 TypeComboBox.EndUpdate();
CslaDataSource configuration form.
CslaDataSourceConfiguration(DataSourceControl control, string oldTypeName)
Create instance of object.
string TypeName
Gets the type name entered by the user.
CslaDataSourceConfiguration()
Create instance of object.
This is the core interface implemented by all CSLA .NET base classes.