using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using SqlSugar; using System.Windows; namespace XImagingXhandler.XDAL { /// /// 元素类 /// public class Element { #region Fields private bool isDragging = false;//是否正在拖动 private bool isStretching = false;//是否拉伸 private bool stretchLeft = false;//是向左拉伸 private bool stretchRight = false;//是向右拉伸 private IInputElement inputElement = null;//输入元素对象 private double x, y = 0;//变量 private int zIndex = 0;//zIndex变量 #endregion #region Constructor public Element() { } #endregion #region Properties public IInputElement InputElement { get { return this.inputElement; } set { this.inputElement = value; this.isDragging = false; this.isStretching = false; } } /// /// x方向值 /// public double X { get { return this.x; } set { this.x = value; } } /// /// y方向值 /// public double Y { get { return this.y; } set { this.y = value; } } /// /// Z方向值 /// public int ZIndex { get { return this.zIndex; } set { this.zIndex = value; } } /// /// 是否正在拖动 /// public bool IsDragging { get { return this.isDragging; } set { this.isDragging = value; this.isStretching = !this.isDragging; } } /// /// 是否拉伸 /// public bool IsStretching { get { return this.isStretching; } set { this.isStretching = value; this.IsDragging = !this.isStretching; } } /// /// 是向左拉伸 /// public bool StretchLeft { get { return this.stretchLeft; } set { this.stretchLeft = value; this.stretchRight = !this.stretchLeft; } } /// /// 是向右拉伸 /// public bool StretchRight { get { return this.stretchRight; } set { this.stretchRight = value; this.stretchLeft = !this.stretchRight; } } #endregion } }