using System;
using System.Drawing;
namespace Dongke.IBOSS.Basics.FlowSetting
{
///
/// 流程项目
///
public abstract class FlowItem
{
#region 成员变量
///
/// 项目ID
///
private int _itemID = 0;
///
/// 项目编码(唯一编码)
///
private string _ItemCode = null;
///
/// ID
///
private int _id = 0;
///
/// 编码
///
private string _code = null;
///
/// 名称
///
private string _name = null;
///
/// 备注
///
private string _remark = null;
///
/// 字体
///
private Font _font = Consts.FONT_DEFAULT;
///
/// 字体颜色
///
private Color _fontColor = Consts.FONT_COLOR_DEFAULT;
///
/// 是否显示名称
///
private bool _showName = true;
///
/// 数据扩展(序列化)
///
private object _tagSerializable = null;
///
/// 数据扩展(不保存xml)
///
private object _tagNonSerialized = null;
///
/// 选择状态(不保存xml)
///
private bool _selected = false;
///
/// 鼠标操作中(不保存xml)
///
private bool _mouseOperating = false;
///
/// 流程项目管理
///
private ItemManager _itemManager = null;
#endregion 成员变量
#region 构造函数
///
/// 新项目
///
/// 流程项目管理
internal FlowItem(ItemManager manager)
{
this._itemManager = manager;
this._itemID = this._itemManager.NewItemID;
this._ItemCode = Guid.NewGuid().ToString();
}
///
/// 导入的项目
///
/// 流程项目管理
/// 项目ID
/// 唯一编码
internal FlowItem(ItemManager manager, int itemID, string onlyCode)
{
this._itemManager = manager;
this._itemID = itemID;
this._ItemCode = onlyCode;
}
#endregion 构造函数
#region 属性
///
/// 获取项目ID
///
public int ItemID
{
get
{
return this._itemID;
}
internal set
{
this._itemID = value;
}
}
///
/// 获取唯一编码
///
public string ItemCode
{
get
{
return this._ItemCode;
}
}
///
/// 获取或设置ID
///
public int ID
{
get
{
return this._id;
}
set
{
this._id = value;
}
}
///
/// 获取或设置编码
///
public string Code
{
get
{
return this._code;
}
set
{
this._code = value;
}
}
///
/// 获取或设置名称
///
public string Name
{
get
{
return this._name;
}
set
{
this._name = value;
}
}
///
/// 获取或设置备注
///
public string Remark
{
get
{
return this._remark;
}
set
{
this._remark = value;
}
}
///
/// 获取或设置数据扩展(序列化)
///
public object TagSerializable
{
get
{
return this._tagSerializable;
}
set
{
this._tagSerializable = value;
}
}
///
/// 获取或设置数据扩展(不序列化)
///
public object TagNonSerialized
{
get
{
return this._tagNonSerialized;
}
set
{
this._tagNonSerialized = value;
}
}
///
/// 获取或设置字体
///
public Font Font
{
get
{
return this._font;
}
set
{
this._font = value;
}
}
///
/// 获取或设置字体颜色
///
public Color FontColor
{
get
{
return this._fontColor;
}
set
{
this._fontColor = value;
}
}
///
/// 获取或设置是否显示名称
///
public bool ShowName
{
get
{
return this._showName;
}
set
{
this._showName = value;
}
}
///
/// 选择状态
///
public bool Selected
{
get
{
return this._selected;
}
internal set
{
this._selected = value;
}
}
///
/// 鼠标操作中
///
public bool MouseOperating
{
get
{
return this._mouseOperating;
}
internal set
{
this._mouseOperating = value;
}
}
#endregion 属性
#region 公有方法
///
/// 获取选择状态样式范围
///
/// 选择状态样式范围
public abstract Rectangle[] GetSelectedStyle();
#endregion 公有方法
}
}