Exemple #1
0
		public static ImageSource GetIcon(IField field)
		{
			if (field.DeclaringType.Kind == TypeKind.Enum && field.ReturnType.Kind == TypeKind.Enum)
				return Images.GetIcon(MemberIcon.EnumValue, MethodTreeNode.GetOverlayIcon(field.Accessibility), false);

			if (field.IsConst)
				return Images.GetIcon(MemberIcon.Literal, MethodTreeNode.GetOverlayIcon(field.Accessibility), false);

			if (field.IsReadOnly)
				return Images.GetIcon(MemberIcon.FieldReadOnly, MethodTreeNode.GetOverlayIcon(field.Accessibility), field.IsStatic);

			return Images.GetIcon(MemberIcon.Field, MethodTreeNode.GetOverlayIcon(field.Accessibility), field.IsStatic);
		}
Exemple #2
0
 public static ImageSource GetIcon(IEvent @event)
 {
     return(Images.GetIcon(MemberIcon.Event, MethodTreeNode.GetOverlayIcon(@event.Accessibility), @event.IsStatic));
 }
Exemple #3
0
 public static IBitmap GetIcon(IProperty property)
 {
     return(Images.GetIcon(property.IsIndexer ? MemberIcon.Indexer : MemberIcon.Property,
                           MethodTreeNode.GetOverlayIcon(property.Accessibility), property.IsStatic));
 }