public static string GetImageName(SDTreeNode treeNode) { SDNodeType nodeType = treeNode.GetNodeType(); switch (nodeType) { case SDNodeType.Resource: return(Images.IconResource); case SDNodeType.PrimitiveType: return(Images.IconPrimitive); case SDNodeType.ComplexType: return(Images.IconDatatype); case SDNodeType.Reference: return(Images.IconReference); case SDNodeType.SimpleExtension: return(Images.IconExtensionSimple); case SDNodeType.ComplexExtension: return(Images.IconExtensionComplex); case SDNodeType.SetupSlice: return(Images.IconSlice); case SDNodeType.Element: return(Images.IconElement); case SDNodeType.Choice: return(Images.IconChoice); case SDNodeType.ReferenceToAnotherElement: return(Images.IconReuse); case SDNodeType.Unknown: return(Images.IconBlank); default: throw new NotSupportedException("SDNodeType"); } }
public static bool IsExtension(this SDNodeType value) { return((value == SDNodeType.SimpleExtension) || (value == SDNodeType.ComplexExtension)); }