2 // System.Drawing.ToolboxBitmapAttribute.cs
5 // Dennis Hayes (dennish@Raytek.com)
6 // Andreas Nahr (ClassDevelopment@A-SoftTech.com)
8 // (C) 2002 Ximian, Inc
13 namespace System.Drawing
15 [AttributeUsage (AttributeTargets.Class)]
16 public class ToolboxBitmapAttribute : Attribute
18 private Image smallImage;
19 private Image bigImage;
20 public static readonly ToolboxBitmapAttribute Default = new ToolboxBitmapAttribute();
22 private ToolboxBitmapAttribute ()
26 [MonoTODO ("implement")]
27 public ToolboxBitmapAttribute (string imageFile)
30 // TODO: Add constructor logic here
34 [MonoTODO ("implement")]
35 public ToolboxBitmapAttribute (Type t)
38 // TODO: Add constructor logic here
42 [MonoTODO ("implement")]
43 public ToolboxBitmapAttribute (Type t, string name)
46 // TODO: Add constructor logic here
50 public override bool Equals (object value)
52 if (!(value is ToolboxBitmapAttribute))
56 return ((ToolboxBitmapAttribute) value).smallImage == this.smallImage;
59 public override int GetHashCode ()
61 return (smallImage.GetHashCode () ^ bigImage.GetHashCode ());
64 public Image GetImage (object component)
66 return GetImage (component.GetType(), null, false);
69 public Image GetImage (object component, bool large)
71 return GetImage (component.GetType(), null, large);
74 public Image GetImage (Type type)
76 return GetImage (type, null, false);
79 public Image GetImage (Type type, bool large)
81 return GetImage (type, null, large);
84 [MonoTODO ("implement")]
85 public Image GetImage (Type type, string imgName, bool large)
90 [MonoTODO ("implement")]
91 public static Image GetImageFromResource (Type t, string imageName, bool large)