分类:
ASP.NET
1.VC的生命周期分别对应一个重写方法 (1)界面激活 protected override void OnActivated() { base.OnActivated(); } (2)界面控件创建 protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); } (3)界面关闭之后 protected override void OnDeactivated() { base.OnDeactivated(); } 2.加载Action按钮 3.生成SimpleAction普通按钮 4.在OnActivated方法里面添加代码同时定义一个事件 protected override void OnActivated() { base.OnActivated(); ExportController exportController = Frame.GetController<ExportController>(); if (exportController != null) { exportController.CustomGetDefaultFileName += ExportController_CustomGetDefaultFileName; } } 5.在属性里面Category设置为Filters,同时定义图标ImageName设置图标ID 6.生成PopupWindowShowAction弹窗按钮 7.在OnActivated方法里面添加代码同时定义一个事件 protected override void OnActivated() { base.OnViewControlsCreated(); ListViewProcessCurrentObjectController controller = Frame.GetController<ListViewProcessCurrentObjectController>(); if (controller != null) { controller.ProcessCurrentObjectAction.Executing += (s, e) => { e.Cancel = true; }; } } 8.在属性里面Category设置为Filters,同时定义图标ImageName设置图标ID 9.ParametrizedAction文本按钮获取文本 10.直接在点击事件里面获取文本输入内容 private void parametrizedAction1_Execute(object sender, ParametrizedActionExecuteEventArgs e) { //获取输入的字符串 string paramValue = e.ParameterCurrentValue as string; XtraMessageBox.Show(paramValue); } 11.在属性里面Category设置为Filters,同时定义图标ImageName设置图标ID 12.生成SingleChoiceAction下拉选择按钮 13.直接在构造方法里面加载内容 private ChoiceActionItem setPriorityItem; private ChoiceActionItem setStatusItem; public SingleChoiceActionController() { InitializeComponent(); singleChoiceAction.Items.Clear(); setPriorityItem = new ChoiceActionItem("手工投料消耗", null); setPriorityItem.ImageName = "BO_Report"; singleChoiceAction.Items.Add(setPriorityItem); setStatusItem = new ChoiceActionItem("自动返冲消耗", null); setStatusItem.ImageName = "BO_Organization"; singleChoiceAction.Items.Add(setStatusItem); } 14.在属性里面Category设置为Filters,同时定义图标ImageName设置图标ID
评价
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术