using System;
|
using System.Collections.Generic;
|
using System.Drawing;
|
|
namespace IStation
|
{
|
/// <summary>
|
/// 功能元素
|
/// </summary>
|
public class FuncElement
|
{
|
public FuncElement() { }
|
|
public FuncElement(string name)
|
{
|
Id = Guid.NewGuid().ToString();
|
Name = name;
|
IsGroup = true;
|
}
|
|
public FuncElement(string name, List<FuncElement> elements = null)
|
{
|
|
Id = Guid.NewGuid().ToString();
|
Name = name;
|
IsGroup = true;
|
FuncElements = elements;
|
}
|
|
public FuncElement(string name, List<FuncElement> elements = null, Image img = null)
|
{
|
|
Id = Guid.NewGuid().ToString();
|
Name = name;
|
IsGroup = true;
|
Image = img;
|
FuncElements = elements;
|
}
|
|
public FuncElement(string name, string dllFileName, string controlFullName, WinFrmUI.eModular modular, Image img = null)
|
{
|
Id = Guid.NewGuid().ToString();
|
Name = name;
|
DllFileName = dllFileName;
|
ControlFullName = controlFullName;
|
SurfaceGuid = new WinFrmUI.SurfaceGuid(modular, name);
|
Image = img;
|
IsGroup = false;
|
}
|
public FuncElement(string name, string dllFileName, string controlFullName, WinFrmUI.SurfaceGuid sguid, Image img = null)
|
{
|
Id = Guid.NewGuid().ToString();
|
Name = name;
|
DllFileName = dllFileName;
|
ControlFullName = controlFullName;
|
SurfaceGuid = sguid;
|
Image = img;
|
IsGroup = false;
|
}
|
|
/// <summary>
|
/// 标识
|
/// </summary>
|
public string Id { get; set; }
|
|
/// <summary>
|
/// 名称
|
/// </summary>
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 图片
|
/// </summary>
|
public Image Image { get; set; }
|
|
/// <summary>
|
/// DLL 文件名称
|
/// </summary>
|
public string DllFileName { get; set; }
|
|
/// <summary>
|
/// 控件全名称
|
/// </summary>
|
public string ControlFullName { get; set; }
|
|
/// <summary>
|
/// 自身标识
|
/// </summary>
|
public WinFrmUI.SurfaceGuid SurfaceGuid { get; set; }
|
|
/// <summary>
|
/// 展开
|
/// </summary>
|
public bool Expand { get; set; }
|
|
/// <summary>
|
/// 分组
|
/// </summary>
|
public bool IsGroup { get; set; }
|
|
/// <summary>
|
/// 子元素列表
|
/// </summary>
|
public List<FuncElement> FuncElements { get; set; }
|
|
}
|
}
|