/// <summary> /// Value copy form the provided source to ourself. /// </summary> /// <param name="source">Source instance.</param> public virtual void CopyFrom(ButtonImageStates source) { ImageDisabled = source.ImageDisabled; ImageNormal = source.ImageNormal; ImagePressed = source.ImagePressed; ImageTracking = source.ImageTracking; }
/// <summary> /// Initialize a new instance of the ButtonValues class. /// </summary> /// <param name="needPaint">Delegate for notifying paint requests.</param> public ButtonValues(NeedPaintHandler needPaint) { // Store the provided paint notification delegate NeedPaint = needPaint; // Set initial values _image = null; _transparent = Color.Empty; _text = _defaultText; _extraText = _defaultExtraText; _imageStates = CreateImageStates(); _imageStates.NeedPaint = needPaint; }
/// <summary> /// Initialize a new instance of the ColorButtonValues class. /// </summary> /// <param name="needPaint">Delegate for notifying paint requests.</param> public ColorButtonValues(NeedPaintHandler needPaint) { // Store the provided paint notification delegate NeedPaint = needPaint; // Set initial values _image = _defaultImage; _transparent = Color.Empty; _text = _defaultText; _extraText = _defaultExtraText; _imageStates = CreateImageStates(); _imageStates.NeedPaint = needPaint; _emptyBorderColor = Color.Gray; _selectedColor = Color.Red; _selectedRect = new Rectangle(0, 12, 16, 4); }