zoukankan      html  css  js  c++  java
  • 动态创建对象演示代码MenuFunction ClassFactory FormRun ReportRun

    // 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();
    }

  • 相关阅读:
    day10
    day 9
    day 8
    flex布局
    简单的todolist的demo
    JS中数组与对象的遍历方法实例小结
    css中animation和@keyframes 动画
    form表单相关
    Restful API接口规范
    什么是接口文档,如何写接口,有什么规范?
  • 原文地址:https://www.cnblogs.com/perock/p/2295903.html
Copyright © 2011-2022 走看看