using System; using System.ComponentModel; using System.Drawing; namespace MLV; [Serializable] [DefaultProperty("Text")] [ToolboxItem(false)] [DesignTimeVisible(false)] public abstract class IManagedListViewItem { private string text = ""; private Color color = Color.Black; private int imageIndex; private bool customFontEnabled; private Font font = new Font("Tahoma", 8f, FontStyle.Regular); private ManagedListViewItemDrawMode drawMode; private object tag; [Description("The item text. This used only in Thumbnails view. For details view mode, use subitems.")] [Category("Text")] public virtual string Text { get { return text; } set { text = value; } } [Description("The text color.")] [Category("Style")] public virtual Color Color { get { return color; } set { color = value; } } [Description("The image index within ImageList if used. The draw mode must set to Image or TextAndImage.")] [Category("Style")] public virtual int ImageIndex { get { return imageIndex; } set { imageIndex = value; } } [Description("The draw mode to use for this item")] [Category("Style")] public ManagedListViewItemDrawMode DrawMode { get { return drawMode; } set { drawMode = value; } } [Description("If enabled, the control will use the CustomFont for item text otherwise it used Font property of the control.")] [Category("Style")] public bool CustomFontEnabled { get { return customFontEnabled; } set { customFontEnabled = value; } } [Description("The CustomFont for item text to use when CustomFontEnabled is set. Otherwise it used Font property of the control.")] [Category("Style")] public Font CustomFont { get { return font; } set { font = value; } } [Browsable(false)] public object Tag { get { return tag; } set { tag = value; } } public virtual void OnMouseOver(Point mouseLocation, Size charFontSize) { } public virtual void OnMouseClick(Point mouseLocation, Size charFontSize, int itemIndex) { } public virtual void OnMouseLeave() { } }