动态创建对象演示代码MenuFunction ClassFactory FormRun ReportRun
2011-12-21 15:22
567 查看
// Changed on 20 May 2006 at 07:02:15 by ZYJ
// 论坛:www.qiuhao.com
// 博客:http://www.qiuhao.com/boke.asp?maxfara.index.html
// 邮箱:Zhouyujie238@hotmail.com
//BestPractice:
//优先使用MenuFunction 来调用对象;
//在不能使用MenuFunction的时候,使用classFactory进行调用;
//不能使用classFactory的时候,再考虑直接使用new FormRun/ReportRun ;
static void menuFunction(Args _args)
{
Args args = new Args();
;
//访问Form;
new MenuFunction(menuItemDisplayStr('Unit'),MenuItemType::Display).run(args);
//访问类
//new MenuFunction(menuItemActionStr('Calculator'),MenuItemType::Action).run(args);
//访问报表
//new MenuFunction(menuItemOutputStr('Currency'),MenuItemType::Output).run(args);
}
static void classFactory (Args _args)
{
Args args = new Args();
FormRun formRun;
;
//调用Form的例子
args = new Args(FormStr('Unit'));
formRun = classFactory.formRunClass(args);
//报表:reportRun = classFactory.reportRunClass(<args object>);
formRun.init();
formRun.run() ;
formRun.wait();
}
static void formRun(Args _args)
{
Args args = new Args();
FormRun formRun;
;
//调用Form的例子
args = new Args(FormStr('Unit'));
formRun = new FormRun(args) ;
//报表:reportRun = new ReportRun(args) ;
formRun.init();
formRun.run() ;
formRun.wait();
}
// 论坛:www.qiuhao.com
// 博客:http://www.qiuhao.com/boke.asp?maxfara.index.html
// 邮箱:Zhouyujie238@hotmail.com
//BestPractice:
//优先使用MenuFunction 来调用对象;
//在不能使用MenuFunction的时候,使用classFactory进行调用;
//不能使用classFactory的时候,再考虑直接使用new FormRun/ReportRun ;
static void menuFunction(Args _args)
{
Args args = new Args();
;
//访问Form;
new MenuFunction(menuItemDisplayStr('Unit'),MenuItemType::Display).run(args);
//访问类
//new MenuFunction(menuItemActionStr('Calculator'),MenuItemType::Action).run(args);
//访问报表
//new MenuFunction(menuItemOutputStr('Currency'),MenuItemType::Output).run(args);
}
static void classFactory (Args _args)
{
Args args = new Args();
FormRun formRun;
;
//调用Form的例子
args = new Args(FormStr('Unit'));
formRun = classFactory.formRunClass(args);
//报表:reportRun = classFactory.reportRunClass(<args object>);
formRun.init();
formRun.run() ;
formRun.wait();
}
static void formRun(Args _args)
{
Args args = new Args();
FormRun formRun;
;
//调用Form的例子
args = new Args(FormStr('Unit'));
formRun = new FormRun(args) ;
//报表:reportRun = new ReportRun(args) ;
formRun.init();
formRun.run() ;
formRun.wait();
}
相关文章推荐
- 编写S-Function,创建Simulink模型并生成C++代码,编译生成可调用的动态库dll(From Simulink model to DLL A tutorial)
- 一个ASP创建动态对象的工厂类(类似PHP的stdClass)
- IE、Firefox兼容form target当前页iframe,javascript动态创建表单对象form设置name属性
- 在Axapta中,使用X++代码动态创建Form
- java中使用字符串或者动态创建对象的三种方法(Class,Constructor,Proxy)
- createElement动态创建HTML对象脚本代码
- createElement动态创建HTML对象脚本代码
- 一个ASP创建动态对象的工厂类(类似PHP的stdClass)
- 《C++编程思想》 第十二章 动态对象创建 (原书代码+习题+解答)
- 关于使用动态代理创建代理对象是报错 java.lang.ClassCastException: $Proxy0 cannot be cast to 的解决办法
- 一个ASP创建动态对象的工厂类(类似PHP的stdClass)
- 动态代理对象的创建---------------理解了这段代码,你就懂了动态代理了
- unity3d通过代码动态创建销毁游戏对象
- javascript---使用createElement动态创建HTML对象
- java中利用类名生成Class对象,通过class对象创建实体类的理解
- 读书笔记-Thinking in C++-第13章 动态对象的创建
- asp.net中用代码动态创建表格的完整代码
- jquery创建并行对象或者合并对象的实现代码
- 转贴:C#动态执行字符串(动态创建代码)