using System.Collections.Generic;
using System.Drawing;
namespace CSFrameworkV5.Core
{
///
/// 引用NullObject模式,避免程序因访问null对象抛出异常
///
public class NullButton : IButtonInfo
{
#region IButtonInfo 成員
public string Name
{
get => "";
set { }
}
public string Caption
{
get => "";
set { }
}
public Image Image
{
get => null;
set { }
}
public int Index
{
get => 0;
set { }
}
public object Button
{
get => null;
set { }
}
public bool Enable
{
get => false;
set { }
}
public bool Visible
{
get => false;
set { }
}
public int Authority
{
get => 0;
set { }
}
public object Tag
{
get => null;
set { }
}
public bool ErrorOccurred
{
get => false;
set { }
}
public bool BeginGroup => false;
public string GroupName
{
get => "";
set { }
}
public bool IsLargeButton { get; set; }
public List SubButtons => new List();
#endregion
}
}