public EntityPropertiesControl(EntityMetadata emd, ListViewColumnsSettings lvcSettings, ConnectionDetail connectionDetail) { InitializeComponent(); if (new Version(connectionDetail.OrganizationVersion) < new Version(7, 1)) { // Hide Keys tab if under CRM 2015 Update 1 tabControl1.TabPages.Remove(tabPage7); } this.emd = emd; this.connectionDetail = connectionDetail; this.lvcSettings = (ListViewColumnsSettings)lvcSettings.Clone(); ListViewColumnHelper.AddColumnsHeader(attributeListView, typeof(AttributeMetadataInfo), ListViewColumnsSettings.AttributeFirstColumns, this.lvcSettings.AttributeSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(OneToManyListView, typeof(OneToManyRelationshipMetadataInfo), ListViewColumnsSettings.RelFirstColumns, this.lvcSettings.OtmRelSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(manyToOneListView, typeof(OneToManyRelationshipMetadataInfo), ListViewColumnsSettings.RelFirstColumns, this.lvcSettings.OtmRelSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(manyToManyListView, typeof(ManyToManyRelationshipMetadataInfo), ListViewColumnsSettings.RelFirstColumns, this.lvcSettings.MtmRelSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(privilegeListView, typeof(SecurityPrivilegeInfo), ListViewColumnsSettings.PrivFirstColumns, this.lvcSettings.PrivSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(keyListView, typeof(KeyMetadataInfo), ListViewColumnsSettings.KeyFirstColumns, this.lvcSettings.KeySelectedAttributes, new string[] { }); attributesSplitContainer.Panel2Collapsed = true; manyToManySplitContainer.Panel2Collapsed = true; manyToOneSplitContainer.Panel2Collapsed = true; oneToManySplitContainer.Panel2Collapsed = true; privilegeSplitContainer.Panel2Collapsed = true; keySplitContainer.Panel2Collapsed = true; RefreshContent(emd); }
public EntityPropertiesControl(EntityMetadata emd, ListViewColumnsSettings lvcSettings) { InitializeComponent(); this.emd = emd; this.lvcSettings = (ListViewColumnsSettings)lvcSettings.Clone(); ListViewColumnHelper.AddColumnsHeader(attributeListView, typeof(AttributeMetadataInfo), ListViewColumnsSettings.AttributeFirstColumns, this.lvcSettings.AttributeSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(OneToManyListView, typeof(OneToManyRelationshipMetadataInfo), ListViewColumnsSettings.RelFirstColumns, this.lvcSettings.OtmRelSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(manyToOneListView, typeof(OneToManyRelationshipMetadataInfo), ListViewColumnsSettings.RelFirstColumns, this.lvcSettings.OtmRelSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(manyToManyListView, typeof(ManyToManyRelationshipMetadataInfo), ListViewColumnsSettings.RelFirstColumns, this.lvcSettings.MtmRelSelectedAttributes, new string[] { }); ListViewColumnHelper.AddColumnsHeader(privilegeListView, typeof(SecurityPrivilegeInfo), ListViewColumnsSettings.PrivFirstColumns, this.lvcSettings.PrivSelectedAttributes, new string[] { }); attributesSplitContainer.Panel2Collapsed = true; manyToManySplitContainer.Panel2Collapsed = true; manyToOneSplitContainer.Panel2Collapsed = true; oneToManySplitContainer.Panel2Collapsed = true; privilegeSplitContainer.Panel2Collapsed = true; RefreshContent(emd); }