Storage for button content value information.
Inheritance: Storage
 /// <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;
 }
示例#2
0
        /// <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;
        }
示例#3
0
        /// <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;
        }
示例#4
0
        /// <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);
        }
        /// <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);
        }
示例#6
0
 /// <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;
 }