隐藏主窗体工具栏的功能按钮(方法二)

通过重写ButtonStateChanged方法实现隐藏主窗体工具栏的功能按钮。请参考系统管理模块[公司资料设置]窗体:
C# Code:
protected override void ButtonStateChanged(UpdateType currentState)
{
。。。。代码省略。。。
//禁用数据操作按钮
_buttons.GetButtonByName("btnView").Enable = false;
_buttons.GetButtonByName("btnAdd").Enable = false;
_buttons.GetButtonByName("btnDelete").Enable = false;
_buttons.GetButtonByName("btnPrint").Enable = false;
_buttons.GetButtonByName("btnPreview").Enable = false;
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
protected override void ButtonStateChanged(UpdateType currentState)
{
。。。。代码省略。。。
//禁用数据操作按钮
_buttons.GetButtonByName("btnView").Enable = false;
_buttons.GetButtonByName("btnAdd").Enable = false;
_buttons.GetButtonByName("btnDelete").Enable = false;
_buttons.GetButtonByName("btnPrint").Enable = false;
_buttons.GetButtonByName("btnPreview").Enable = false;
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898

扫一扫加作者微信


版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网