123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- using System.Drawing;
- namespace Microsoft.Windows.Forms
- {
- public partial class Sprite
- {
- private Image m_Image = null;
- /// <summary>
- /// 正常状态下图片
- /// </summary>
- public Image Image
- {
- get
- {
- return this.m_Image;
- }
- set
- {
- if (value != this.m_Image)
- {
- this.m_Image = value;
- this.Feedback();
- }
- }
- }
- private Image m_ImageHovered = null;
- /// <summary>
- /// 鼠标移上图片
- /// </summary>
- public Image ImageHovered
- {
- get
- {
- return this.m_ImageHovered;
- }
- set
- {
- if (value != this.m_ImageHovered)
- {
- this.m_ImageHovered = value;
- this.Feedback();
- }
- }
- }
- private Image m_ImagePressed = null;
- /// <summary>
- /// 鼠标按下图片
- /// </summary>
- public Image ImagePressed
- {
- get
- {
- return this.m_ImagePressed;
- }
- set
- {
- if (value != this.m_ImagePressed)
- {
- this.m_ImagePressed = value;
- this.Feedback();
- }
- }
- }
- private Image m_ImageFocused = null;
- /// <summary>
- /// 拥有焦点图片
- /// </summary>
- public Image ImageFocused
- {
- get
- {
- return this.m_ImageFocused;
- }
- set
- {
- if (value != this.m_ImageFocused)
- {
- this.m_ImageFocused = value;
- this.Feedback();
- }
- }
- }
- private Image m_ImageDisabled = null;
- /// <summary>
- /// 状态禁用图片
- /// </summary>
- public Image ImageDisabled
- {
- get
- {
- return this.m_ImageDisabled;
- }
- set
- {
- if (value != this.m_ImageDisabled)
- {
- this.m_ImageDisabled = value;
- this.Feedback();
- }
- }
- }
- private Image m_ImageHighlight = null;
- /// <summary>
- /// 高亮图片
- /// </summary>
- public Image ImageHighlight
- {
- get
- {
- return this.m_ImageHighlight;
- }
- set
- {
- if (value != this.m_ImageHighlight)
- {
- this.m_ImageHighlight = value;
- this.Feedback();
- }
- }
- }
- private Point m_ImageOffset = Point.Empty;
- /// <summary>
- /// 图片偏移
- /// </summary>
- public Point ImageOffset
- {
- get
- {
- return this.m_ImageOffset;
- }
- set
- {
- if (value != this.m_ImageOffset)
- {
- this.m_ImageOffset = value;
- this.Feedback();
- }
- }
- }
- private Point m_ImageOffsetHovered = Point.Empty;
- /// <summary>
- /// 鼠标移上时在ImageOffset上再次偏移
- /// </summary>
- public Point ImageOffsetHovered
- {
- get
- {
- return this.m_ImageOffsetHovered;
- }
- set
- {
- if (value != this.m_ImageOffsetHovered)
- {
- this.m_ImageOffsetHovered = value;
- this.Feedback();
- }
- }
- }
- private Point m_ImageOffsetPressed = Point.Empty;
- /// <summary>
- /// 鼠标按下时在ImageOffset上再次偏移
- /// </summary>
- public Point ImageOffsetPressed
- {
- get
- {
- return this.m_ImageOffsetPressed;
- }
- set
- {
- if (value != this.m_ImageOffsetPressed)
- {
- this.m_ImageOffsetPressed = value;
- this.Feedback();
- }
- }
- }
- private Point m_ImageOffsetFocused = Point.Empty;
- /// <summary>
- /// 获取焦点时在ImageOffset上再次偏移
- /// </summary>
- public Point ImageOffsetFocused
- {
- get
- {
- return this.m_ImageOffsetFocused;
- }
- set
- {
- if (value != this.m_ImageOffsetFocused)
- {
- this.m_ImageOffsetFocused = value;
- this.Feedback();
- }
- }
- }
- private Point m_ImageOffsetDisabled = Point.Empty;
- /// <summary>
- /// 禁用时在ImageOffset上再次偏移
- /// </summary>
- public Point ImageOffsetDisabled
- {
- get
- {
- return this.m_ImageOffsetDisabled;
- }
- set
- {
- if (value != this.m_ImageOffsetDisabled)
- {
- this.m_ImageOffsetDisabled = value;
- this.Feedback();
- }
- }
- }
- private Point m_ImageOffsetHighlight = Point.Empty;
- /// <summary>
- /// 高亮时在ImageOffset上再次偏移
- /// </summary>
- public Point ImageOffsetHighlight
- {
- get
- {
- return this.m_ImageOffsetHighlight;
- }
- set
- {
- if (value != this.m_ImageOffsetHighlight)
- {
- this.m_ImageOffsetHighlight = value;
- this.Feedback();
- }
- }
- }
- private Size m_ImageSize = new Size(32, 32);
- /// <summary>
- /// 图片大小
- /// </summary>
- public Size ImageSize
- {
- get
- {
- return this.m_ImageSize;
- }
- set
- {
- if (value != this.m_ImageSize)
- {
- this.m_ImageSize = value;
- this.Feedback();
- }
- }
- }
- private ContentAlignment m_ImageAlign = ContentAlignment.MiddleCenter;
- /// <summary>
- /// 图片对齐方式
- /// </summary>
- public ContentAlignment ImageAlign
- {
- get
- {
- return this.m_ImageAlign;
- }
- set
- {
- if (value != this.m_ImageAlign)
- {
- this.m_ImageAlign = value;
- this.Feedback();
- }
- }
- }
- private float m_ImageRotateAngle = 0f;
- /// <summary>
- /// 图片旋转角度
- /// </summary>
- public float ImageRotateAngle
- {
- get
- {
- return this.m_ImageRotateAngle;
- }
- set
- {
- if (value != this.m_ImageRotateAngle)
- {
- this.m_ImageRotateAngle = value;
- this.Feedback();
- }
- }
- }
- private bool m_ImageGrayOnDisabled = true;
- /// <summary>
- /// 图片状态禁用是否变灰
- /// </summary>
- public bool ImageGrayOnDisabled
- {
- get
- {
- return this.m_ImageGrayOnDisabled;
- }
- set
- {
- if (value != this.m_ImageGrayOnDisabled)
- {
- this.m_ImageGrayOnDisabled = value;
- this.Feedback();
- }
- }
- }
- }
- }
|