private void AddProjectDataMember(TreeNodeCollection nodes, DataSourceDescriptor dsd, PropertyDescriptor pd, object dataSourceInstance, bool isList)
 {
     System.Type type = this.GetType(dsd.TypeName, true, true);
     if ((type == null) || (type.GetType() == runtimeType))
     {
         DataMemberNode node = new ProjectDataMemberNode(this, dsd, pd.Name, pd.Name, isList);
         nodes.Add(node);
         this.AddProjectDataMemberContents(node, dsd, pd, dataSourceInstance);
     }
 }
 private void AddProjectDataMemberContents(TreeNodeCollection nodes, DataMemberNode projectDataMemberNode, DataSourceDescriptor dsd, PropertyDescriptor propDesc, object dataSourceInstance)
 {
     if ((!this.selectListMembers && projectDataMemberNode.IsList) && (dataSourceInstance != null))
     {
         PropertyDescriptorCollection listItemProperties = ListBindingHelper.GetListItemProperties(dataSourceInstance, new PropertyDescriptor[] { propDesc });
         if (listItemProperties != null)
         {
             foreach (PropertyDescriptor descriptor in listItemProperties)
             {
                 if (this.IsBindableDataMember(descriptor) && descriptor.IsBrowsable)
                 {
                     bool isList = this.IsListMember(descriptor);
                     if (!isList)
                     {
                         this.AddProjectDataMember(nodes, dsd, descriptor, dataSourceInstance, isList);
                     }
                 }
             }
         }
     }
 }
		public void CopyTo (DataSourceDescriptor [] array, int index)
		{
			throw new NotImplementedException ();
		}
		public void Insert (int index, DataSourceDescriptor value)
		{
			throw new NotImplementedException ();
		}
 public void Insert(int index, DataSourceDescriptor value)
 {
     base.List.Insert(index, value);
 }
 public int Add(DataSourceDescriptor value)
 {
     return base.List.Add(value);
 }
 public void Insert(int index, DataSourceDescriptor value)
 {
     throw new NotImplementedException();
 }
Example #8
0
 public int IndexOf(DataSourceDescriptor value)
 {
     throw null;
 }
 public bool Contains(DataSourceDescriptor value)
 {
     throw new NotImplementedException();
 }
 public int IndexOf(DataSourceDescriptor value)
 {
     throw new NotImplementedException();
 }
Example #11
0
 public void Remove(DataSourceDescriptor value)
 {
     throw null;
 }
Example #12
0
 public bool Contains(DataSourceDescriptor value)
 {
     throw null;
 }
Example #13
0
 public void Insert(int index, DataSourceDescriptor value)
 {
     throw null;
 }
 private BindingSource CreateNewBindingSource(DataSourceDescriptor dataSourceDescriptor, string dataMember)
 {
     if ((this.hostSvc == null) || (this.dspSvc == null))
     {
         return null;
     }
     object projectDataSourceInstance = this.GetProjectDataSourceInstance(dataSourceDescriptor);
     if (projectDataSourceInstance == null)
     {
         return null;
     }
     return this.CreateNewBindingSource(projectDataSourceInstance, dataMember);
 }
 public void Remove(DataSourceDescriptor value)
 {
     throw new NotImplementedException();
 }
Example #16
0
 public abstract object AddDataSourceInstance(IDesignerHost host, DataSourceDescriptor dataSourceDescriptor);
 public bool Contains(DataSourceDescriptor value)
 {
     return(base.List.Contains(value));
 }
 public int IndexOf(DataSourceDescriptor value)
 {
     return base.List.IndexOf(value);
 }
 public int IndexOf(DataSourceDescriptor value)
 {
     return(base.List.IndexOf(value));
 }
 public void Remove(DataSourceDescriptor value)
 {
     base.List.Remove(value);
 }
 public void Insert(int index, DataSourceDescriptor value)
 {
     base.List.Insert(index, value);
 }
		public bool Contains (DataSourceDescriptor value)
		{
			throw new NotImplementedException ();
		}
 public void Remove(DataSourceDescriptor value)
 {
     base.List.Remove(value);
 }
		public int IndexOf (DataSourceDescriptor value)
		{
			throw new NotImplementedException ();
		}
 public int Add(DataSourceDescriptor value)
 {
     return(base.List.Add(value));
 }
		public void Remove (DataSourceDescriptor value)
		{
			throw new NotImplementedException ();
		}
 public abstract object AddDataSourceInstance(IDesignerHost host, DataSourceDescriptor dataSourceDescriptor);
 private void AddProjectDataMemberContents(DataMemberNode projectDataMemberNode, DataSourceDescriptor dsd, PropertyDescriptor pd, object dataSourceInstance)
 {
     this.AddProjectDataMemberContents(projectDataMemberNode.Nodes, projectDataMemberNode, dsd, pd, dataSourceInstance);
 }
 public abstract bool InvokeConfigureDataSource(IWin32Window parentWindow, FormStartPosition startPosition, DataSourceDescriptor dataSourceDescriptor);
 private void AddProjectDataSource(TreeNodeCollection nodes, DataSourceDescriptor dsd)
 {
     System.Type type = this.GetType(dsd.TypeName, true, true);
     if ((type == null) || (type.GetType() == runtimeType))
     {
         ProjectDataSourceNode node = new ProjectDataSourceNode(this, dsd, dsd.Name, dsd.Image);
         nodes.Add(node);
         if ((this.selectedItem != null) && string.IsNullOrEmpty(this.selectedItem.DataMember))
         {
             if ((this.selectedItem.DataSource is DataSourceDescriptor) && string.Equals(dsd.Name, (this.selectedItem.DataSource as DataSourceDescriptor).Name, StringComparison.OrdinalIgnoreCase))
             {
                 this.selectedNode = node;
             }
             else if ((this.selectedItem.DataSource is System.Type) && string.Equals(dsd.TypeName, (this.selectedItem.DataSource as System.Type).FullName, StringComparison.OrdinalIgnoreCase))
             {
                 this.selectedNode = node;
             }
         }
     }
 }
 public bool Contains(DataSourceDescriptor value)
 {
     return base.List.Contains(value);
 }
 private object GetProjectDataSourceInstance(DataSourceDescriptor dataSourceDescriptor)
 {
     System.Type type = this.GetType(dataSourceDescriptor.TypeName, true, true);
     if (!dataSourceDescriptor.IsDesignable)
     {
         return type;
     }
     foreach (IComponent component in this.hostSvc.Container.Components)
     {
         if (type.Equals(component.GetType()))
         {
             return component;
         }
     }
     try
     {
         return this.dspSvc.AddDataSourceInstance(this.hostSvc, dataSourceDescriptor);
     }
     catch (InvalidOperationException exception)
     {
         IUIService uiService = this.serviceProvider.GetService(typeof(IUIService)) as IUIService;
         DataGridViewDesigner.ShowErrorDialog(uiService, exception, this);
         return null;
     }
     catch (CheckoutException exception2)
     {
         IUIService service = this.serviceProvider.GetService(typeof(IUIService)) as IUIService;
         DataGridViewDesigner.ShowErrorDialog(service, exception2, this);
         return null;
     }
 }
 public void CopyTo(DataSourceDescriptor[] array, int index)
 {
     base.List.CopyTo(array, index);
 }
Example #34
0
 public abstract bool InvokeConfigureDataSource(IWin32Window parentWindow, FormStartPosition startPosition, DataSourceDescriptor dataSourceDescriptor);
Example #35
0
 public int Add(DataSourceDescriptor value)
 {
     throw null;
 }