public static CategoryEditorSet GetEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); foreach (CategoryEditorFactory categoryEditorFactory in CategoryEditorInstanceFactory.CategoryEditorFactories) { categoryEditorSet = categoryEditorSet.Union(categoryEditorFactory.GetCategoryEditors(selectedType, category)); } return(categoryEditorSet); }
public override CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { bool flag = PlatformTypes.TextElement.IsAssignableFrom(selectedType) || PlatformTypes.Inline.IsAssignableFrom(selectedType); CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (flag || PlatformTypes.FrameworkElement.IsAssignableFrom(selectedType) || ProjectNeutralTypes.DataGridTextColumn.IsAssignableFrom(selectedType)) { categoryEditorSet.AddCategoryEditor((CategoryEditor) new TextCategoryEditor()); } return(categoryEditorSet); }
public override CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (!(category is ConditionalExpressionBehaviorCategory)) { return(categoryEditorSet); } categoryEditorSet.AddCategoryEditor((CategoryEditor) new ConditionalExpressionBehaviorCategoryEditor(category.CategoryName), (object)category.CategoryName); return(categoryEditorSet); }
public override CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (!ProjectNeutralTypes.PathListBox.IsAssignableFrom(selectedType) && !ProjectNeutralTypes.PathPanel.IsAssignableFrom(selectedType)) { return(categoryEditorSet); } categoryEditorSet.AddCategoryEditor((CategoryEditor) new PathLayoutCategoryCategoryEditor(), (object)category.CategoryName); return(categoryEditorSet); }
public CategoryEditorSet Union(CategoryEditorSet categoryEditorSet) { CategoryEditorSet categoryEditorSet1 = new CategoryEditorSet(new Dictionary <CategoryEditorSet.UniqueTypeToken, CategoryEditor>((IDictionary <CategoryEditorSet.UniqueTypeToken, CategoryEditor>) this.editors)); foreach (KeyValuePair <CategoryEditorSet.UniqueTypeToken, CategoryEditor> keyValuePair in categoryEditorSet.editors) { if (!categoryEditorSet1.editors.ContainsKey(keyValuePair.Key)) { categoryEditorSet1.editors.Add(keyValuePair.Key, keyValuePair.Value); } } return(categoryEditorSet1); }
public CategoryEditorSet Complement(CategoryEditorSet otherSet) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); foreach (KeyValuePair <CategoryEditorSet.UniqueTypeToken, CategoryEditor> keyValuePair in this.editors) { if (!otherSet.editors.ContainsKey(keyValuePair.Key)) { categoryEditorSet.editors.Add(keyValuePair.Key, keyValuePair.Value); } } return(categoryEditorSet); }
public override sealed CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (this.EditableType == null || this.EditableType.IsAssignableFrom(selectedType)) { foreach (CategoryEditor editor in this.GetCategoryEditors()) { categoryEditorSet.AddCategoryEditor(editor); } } return(categoryEditorSet); }
public override sealed CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (this.EditableType == null || this.EditableType.IsAssignableFrom(selectedType)) { using (IEnumerator <CategoryEditor> enumerator = this.GetCategoryEditors().GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { CategoryEditor current = enumerator.Current; categoryEditorSet.AddCategoryEditor(current); } } } return(categoryEditorSet); }
public CategoryEditorSet Union(CategoryEditorSet categoryEditorSet) { CategoryEditorSet categoryEditorSet1 = new CategoryEditorSet(new Dictionary <CategoryEditorSet.UniqueTypeToken, CategoryEditor>((IDictionary <CategoryEditorSet.UniqueTypeToken, CategoryEditor>) this.editors)); using (Dictionary <CategoryEditorSet.UniqueTypeToken, CategoryEditor> .Enumerator enumerator = categoryEditorSet.editors.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <CategoryEditorSet.UniqueTypeToken, CategoryEditor> current = enumerator.Current; if (!categoryEditorSet1.editors.ContainsKey(current.Key)) { categoryEditorSet1.editors.Add(current.Key, current.Value); } } } return(categoryEditorSet1); }
public CategoryEditorSet Complement(CategoryEditorSet otherSet) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); using (Dictionary <CategoryEditorSet.UniqueTypeToken, CategoryEditor> .Enumerator enumerator = this.editors.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <CategoryEditorSet.UniqueTypeToken, CategoryEditor> current = enumerator.Current; if (!otherSet.editors.ContainsKey(current.Key)) { categoryEditorSet.editors.Add(current.Key, current.Value); } } } return(categoryEditorSet); }
private CategoryBase CreateCategory(string name, Type selectedType) { CategoryLocalizationHelper.CategoryName canonicalCategoryName = CategoryLocalizationHelper.GetCanonicalCategoryName(name); CategoryBase categoryBase = (CategoryBase)CategoryFactory.GetCustomCategorySelector(canonicalCategoryName).CreateSceneNodeCategory(canonicalCategoryName, name, this.SceneNodeObjectSet.DesignerContext.MessageLoggingService); ITypeResolver typeResolver = (ITypeResolver)this.SceneNodeObjectSet.ProjectContext; CategoryEditorSet categoryEditorsList = new CategoryEditorSet(); IType type = typeResolver.GetType(selectedType); PropertyInspectorModel.GetCategoryEditors(type, categoryEditorsList, this.MessageLoggingService); foreach (CategoryEditor categoryEditor in categoryEditorsList.Union(CategoryEditorInstanceFactory.GetEditors((ITypeId)type, categoryBase as SceneNodeCategory))) { if (categoryEditor.TargetCategory == categoryBase.CategoryName) { categoryBase.CategoryEditors.Add(categoryEditor); } } return(categoryBase); }
public override CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (ProjectNeutralTypes.Behavior.IsAssignableFrom(selectedType)) { foreach (SceneNodeProperty sceneNodeProperty in category.Properties) { if (PlatformTypes.ICommand.IsAssignableFrom((ITypeId)sceneNodeProperty.PropertyTypeId)) { categoryEditorSet.AddCategoryEditor((CategoryEditor) new BehaviorCommandCategoryEditor(category.CategoryName), (object)category.CategoryName); categoryEditorSet.AddCategoryEditor((CategoryEditor) new BehaviorCommandAdvancedCategoryEditor(category.CategoryName), (object)category.CategoryName); break; } } } return(categoryEditorSet); }
private CategoryBase CreateCategory(string name, Type selectedType) { CategoryLocalizationHelper.CategoryName canonicalCategoryName = CategoryLocalizationHelper.GetCanonicalCategoryName(name); CategoryBase categoryBase = (CategoryBase)CategoryFactory.GetCustomCategorySelector(canonicalCategoryName).CreateSceneNodeCategory(canonicalCategoryName, name, this.SceneNodeObjectSet.DesignerContext.MessageLoggingService); ITypeResolver typeResolver = (ITypeResolver)this.SceneNodeObjectSet.ProjectContext; CategoryEditorSet categoryEditorsList = new CategoryEditorSet(); IType type = typeResolver.GetType(selectedType); PropertyInspectorModel.GetCategoryEditors(type, categoryEditorsList, this.MessageLoggingService); using (IEnumerator <CategoryEditor> enumerator = categoryEditorsList.Union(CategoryEditorInstanceFactory.GetEditors((ITypeId)type, categoryBase as SceneNodeCategory)).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { CategoryEditor current = enumerator.Current; if (current.get_TargetCategory() == categoryBase.get_CategoryName()) { categoryBase.CategoryEditors.Add(current); } } } return(categoryBase); }
public override CategoryEditorSet GetCategoryEditors(ITypeId selectedType, SceneNodeCategory category) { CategoryEditorSet categoryEditorSet = new CategoryEditorSet(); if (ProjectNeutralTypes.Behavior.IsAssignableFrom(selectedType)) { using (IEnumerator <PropertyEntry> enumerator = ((CategoryEntry)category).get_Properties().GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { SceneNodeProperty sceneNodeProperty = (SceneNodeProperty)enumerator.Current; if (PlatformTypes.ICommand.IsAssignableFrom((ITypeId)sceneNodeProperty.PropertyTypeId)) { categoryEditorSet.AddCategoryEditor((CategoryEditor) new BehaviorCommandCategoryEditor(category.get_CategoryName()), category.get_CategoryName()); categoryEditorSet.AddCategoryEditor((CategoryEditor) new BehaviorCommandAdvancedCategoryEditor(category.get_CategoryName()), category.get_CategoryName()); break; } } } } return(categoryEditorSet); }