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
|
{
|
/// <summary>
|
/// 元素类
|
/// </summary>
|
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;
|
}
|
}
|
/// <summary>
|
/// x方向值
|
/// </summary>
|
public double X
|
{
|
get { return this.x; }
|
set { this.x = value; }
|
}
|
/// <summary>
|
/// y方向值
|
/// </summary>
|
public double Y
|
{
|
get { return this.y; }
|
set { this.y = value; }
|
}
|
/// <summary>
|
/// Z方向值
|
/// </summary>
|
public int ZIndex
|
{
|
get { return this.zIndex; }
|
set { this.zIndex = value; }
|
}
|
/// <summary>
|
/// 是否正在拖动
|
/// </summary>
|
public bool IsDragging
|
{
|
get { return this.isDragging; }
|
set
|
{
|
this.isDragging = value;
|
this.isStretching = !this.isDragging;
|
}
|
}
|
/// <summary>
|
/// 是否拉伸
|
/// </summary>
|
public bool IsStretching
|
{
|
get { return this.isStretching; }
|
set
|
{
|
this.isStretching = value;
|
this.IsDragging = !this.isStretching;
|
}
|
}
|
/// <summary>
|
/// 是向左拉伸
|
/// </summary>
|
public bool StretchLeft
|
{
|
get { return this.stretchLeft; }
|
set { this.stretchLeft = value; this.stretchRight = !this.stretchLeft; }
|
}
|
/// <summary>
|
/// 是向右拉伸
|
/// </summary>
|
public bool StretchRight
|
{
|
get { return this.stretchRight; }
|
set { this.stretchRight = value; this.stretchLeft = !this.stretchRight; }
|
}
|
#endregion
|
}
|
}
|