コード例 #1
0
                        public GroupingTypeData(ElementGroupingType groupingTypeInstance, DomainClassInfo groupingTypeClassInfo)
                        {
                            GroupingTypeInstance  = groupingTypeInstance;
                            GroupingTypeClassInfo = groupingTypeClassInfo;
                            Type groupingTypeClass = groupingTypeClassInfo.ImplementationClass;

                            DisplayName    = DomainTypeDescriptor.GetDisplayName(groupingTypeClass);
                            Description    = DomainTypeDescriptor.GetDescription(groupingTypeClass);
                            SelectionState = (groupingTypeInstance != null) ? (GroupingTypeSelectionState.InitiallySelected | GroupingTypeSelectionState.CurrentlySelected) : 0;
                        }
コード例 #2
0
ファイル: ExtensionManager.cs プロジェクト: ozialien/NORMA
        /// <summary>
        /// This method adds the passed in ExtensionModelBinding to the ListView on the ExtensionManager dialogue.
        /// </summary>
        /// <param name="extensionBinding">The extension you want to add.</param>
        private void AddItemToListView(ExtensionModelBinding extensionBinding)
        {
            Type         type = extensionBinding.Type;
            ListViewItem lvi  = new ListViewItem();

            lvi.Tag = extensionBinding.NamespaceUri;
            if (null != myStore.FindDomainModel(extensionBinding.DomainModelId))
            {
                lvi.Checked = true;
            }

            //Add the DisplayName
            lvi.SubItems.Add(DomainTypeDescriptor.GetDisplayName(type));

            //Add the Description
            lvi.SubItems.Add(DomainTypeDescriptor.GetDescription(type));

            lvExtensions.Items.Add(lvi);
        }