📄 main.mpr
字号:
* *********************************************************
* *
* * 06/11/2005 MAIN.MPR 17:55:35
* *
* *********************************************************
* *
* * Author's Name
* *
* * Copyright (C) 2005 Company Name
* * Address
* * City, Zip
* *
* * Description:
* * This PROGRAM was automatically generated BY GENMENU.
* *
* *********************************************************
* To attach this menu to your Top-Level form,
* call it from the Init event of the form:
* Syntax: DO <mprname> WITH <oFormRef> [,<cMenuname>|<lRename>][<lUniquePopups>]
* oFormRef - form object reference (THIS)
* cMenuname - name for menu (this is required for Append menus - see below)
* lRename - renames Name property of your form
* lUniquePopups - determines whether to generate unique ids for popup names
* example:
* PROCEDURE Init
* DO mymenu.mpr WITH THIS,.T.
* ENDPROC
* Use the optional 2nd parameter if you plan on running multiple instances
* of your Top-Level form. The preferred method is to create an empty string
* variable and pass it by reference so you can receive the form name after
* the MPR file is run. You can later use this reference to destroy the menu.
* PROCEDURE Init
* LOCAL cGetMenuName
* cGetMenuName = ""
* DO mymenu.mpr WITH THIS, m.cGetMenuName
* ENDPROC
* The logical lRename parameter will change the name property of your
* form to the same name given the menu and may cause conflicts in your
* code if you directly reference the form by name.
* You will also need to remove the menu when the form is destroyed so that it does
* not remain in memory unless you wish to reactivate it later in a new form.
* If you passed the optional lRename parameter as .T. as in the above example,
* you can easily remove the menu in the form's Destroy event as shown below.
* This strategy is ideal when using multiple instances of Top-Level forms.
* example:
* PROCEDURE Destroy
* RELEASE MENU (THIS.Name) EXTENDED
* ENDPROC
* Using Append/Before/After location options:
* You might want to append a menu to an existing Top-Level form by setting
* the Location option in the General Options dialog. In order to do this, you
* must pass the name of the menu in which to attach the new one. The second
* parameter is required here. If you originally created the menu with the lRename
* parameter = .T., then you can update the menu with code similar to the following:
* example:
* DO mymenu2.mpr WITH THISFORM,THISFORM.name
*
* Using lUniquePopups:
* If you are running this menu multiple times in your application, such as in multiple
* instances of the same top-level form, you should pass .T. to the lUniquePopups
* parameter so that unique popup names are generated to avoid possible conflicts.
* example:
* PROCEDURE Init
* DO mymenu.mpr WITH THIS,.T.,.T.
* ENDPROC
*
* Note: Parm4-Parm9 are not reserved and freely available for use with your menu code.
*
LPARAMETERS oFormRef, getMenuName, lUniquePopups, parm4, parm5, parm6, parm7, parm8, parm9
LOCAL cMenuName, nTotPops, a_menupops, cTypeParm2, cSaveFormName
IF TYPE("m.oFormRef") # "O" OR ;
LOWER(m.oFormRef.BaseClass) # 'form' OR ;
m.oFormRef.ShowWindow # 2
MESSAGEBOX([This menu can only be called from a Top-Level form. Ensure that your form's ShowWindow property is set to 2. Read the header section of the menu's MPR file for more details.])
RETURN
ENDIF
m.cTypeParm2 = TYPE("m.getMenuName")
m.cMenuName = SYS(2015)
m.cSaveFormName = m.oFormRef.Name
IF m.cTypeParm2 = "C" OR (m.cTypeParm2 = "L" AND m.getMenuName)
m.oFormRef.Name = m.cMenuName
ENDIF
IF m.cTypeParm2 = "C" AND !EMPTY(m.getMenuName)
m.cMenuName = m.getMenuName
ENDIF
DIMENSION a_menupops[8]
IF TYPE("m.lUniquePopups")="L" AND m.lUniquePopups
FOR nTotPops = 1 TO ALEN(a_menupops)
a_menupops[m.nTotPops]= SYS(2015)
ENDFOR
ELSE
a_menupops[1]="文件"
a_menupops[2]="业务操作"
a_menupops[3]="数据查询"
a_menupops[4]="业务报表"
a_menupops[5]="财务报表"
a_menupops[6]="基本资料"
a_menupops[7]="系统管理"
a_menupops[8]="帮助"
ENDIF
* *********************************************************
* *
* * Menu Definition
* *
* *********************************************************
*
DEFINE MENU (m.cMenuName) IN (m.oFormRef.Name) BAR
DEFINE PAD _1jh12f7ul OF (m.cMenuName) PROMPT "文件" COLOR SCHEME 3
DEFINE PAD _1jh12f7um OF (m.cMenuName) PROMPT "业务操作" COLOR SCHEME 3
DEFINE PAD _1jh12f7un OF (m.cMenuName) PROMPT "数据查询" COLOR SCHEME 3
DEFINE PAD _1jh12f7uo OF (m.cMenuName) PROMPT "业务报表" COLOR SCHEME 3
DEFINE PAD _1jh12f7up OF (m.cMenuName) PROMPT "财务报表" COLOR SCHEME 3
DEFINE PAD _1jh12f7uq OF (m.cMenuName) PROMPT "基本资料" COLOR SCHEME 3
DEFINE PAD _1jh12f7ur OF (m.cMenuName) PROMPT "系统管理" COLOR SCHEME 3
DEFINE PAD _1jh12f7us OF (m.cMenuName) PROMPT "帮助" COLOR SCHEME 3
DEFINE PAD _1jh12f7ut OF (m.cMenuName) PROMPT "退出" COLOR SCHEME 3
ON PAD _1jh12f7ul OF (m.cMenuName) ACTIVATE POPUP (a_menupops[1])
ON PAD _1jh12f7um OF (m.cMenuName) ACTIVATE POPUP (a_menupops[2])
ON PAD _1jh12f7un OF (m.cMenuName) ACTIVATE POPUP (a_menupops[3])
ON PAD _1jh12f7uo OF (m.cMenuName) ACTIVATE POPUP (a_menupops[4])
ON PAD _1jh12f7up OF (m.cMenuName) ACTIVATE POPUP (a_menupops[5])
ON PAD _1jh12f7uq OF (m.cMenuName) ACTIVATE POPUP (a_menupops[6])
ON PAD _1jh12f7ur OF (m.cMenuName) ACTIVATE POPUP (a_menupops[7])
ON PAD _1jh12f7us OF (m.cMenuName) ACTIVATE POPUP (a_menupops[8])
ON SELECTION PAD _1jh12f7ut OF (m.cMenuName) _screen.activeform.release
DEFINE POPUP (a_menupops[1]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[1]) PROMPT "新建系统..."
DEFINE BAR 2 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR 3 OF (a_menupops[1]) PROMPT "打印..."
DEFINE BAR 4 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR 5 OF (a_menupops[1]) PROMPT "退出"
ON SELECTION BAR 1 OF (a_menupops[1]) ;
DO _1jh12f7uu ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 5 OF (a_menupops[1]) _screen.activeform.release
DEFINE POPUP (a_menupops[2]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[2]) PROMPT "报关操作..."
DEFINE BAR 2 OF (a_menupops[2]) PROMPT "运输操作..."
DEFINE BAR 3 OF (a_menupops[2]) PROMPT "费用报销..."
DEFINE BAR 4 OF (a_menupops[2]) PROMPT "银行台帐"
DEFINE BAR 5 OF (a_menupops[2]) PROMPT "现金日记"
DEFINE BAR 6 OF (a_menupops[2]) PROMPT "实收实付"
ON SELECTION BAR 1 OF (a_menupops[2]) ;
DO _1jh12f7uv ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 2 OF (a_menupops[2]) ;
DO _1jh12f7uw ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 3 OF (a_menupops[2]) ;
DO _1jh12f7ux ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 4 OF (a_menupops[2]) ;
DO _1jh12f7uy ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 5 OF (a_menupops[2]) ;
DO _1jh12f7uz ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 6 OF (a_menupops[2]) ;
DO _1jh12f7v0 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
DEFINE POPUP (a_menupops[3]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[3]) PROMPT "报关查询"
DEFINE BAR 2 OF (a_menupops[3]) PROMPT "运输查询"
DEFINE BAR 3 OF (a_menupops[3]) PROMPT "收费标准查询"
DEFINE BAR 4 OF (a_menupops[3]) PROMPT "桥路标准查询"
ON SELECTION BAR 1 OF (a_menupops[3]) ;
DO _1jh12f7v1 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 2 OF (a_menupops[3]) ;
DO _1jh12f7v2 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 3 OF (a_menupops[3]) ;
DO _1jh12f7v3 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 4 OF (a_menupops[3]) ;
DO _1jh12f7v4 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
DEFINE POPUP (a_menupops[4]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[4]) PROMPT "报关客户对帐单..."
DEFINE BAR 2 OF (a_menupops[4]) PROMPT "运输客户帐单"
DEFINE BAR 3 OF (a_menupops[4]) PROMPT "司机帐单..."
DEFINE BAR 4 OF (a_menupops[4]) PROMPT "外派帐单"
DEFINE BAR 5 OF (a_menupops[4]) PROMPT "车牌帐单..."
DEFINE BAR 6 OF (a_menupops[4]) PROMPT "报关帐单"
ON SELECTION BAR 1 OF (a_menupops[4]) ;
DO _1jh12f7v5 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 2 OF (a_menupops[4]) ;
DO _1jh12f7v6 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 3 OF (a_menupops[4]) ;
DO _1jh12f7v7 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 4 OF (a_menupops[4]) ;
DO _1jh12f7v8 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 5 OF (a_menupops[4]) ;
DO _1jh12f7v9 ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 6 OF (a_menupops[4]) ;
DO _1jh12f7va ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
DEFINE POPUP (a_menupops[5]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[5]) PROMPT "运输客户汇总"
DEFINE BAR 2 OF (a_menupops[5]) PROMPT "报关客户汇总"
DEFINE BAR 3 OF (a_menupops[5]) PROMPT "应收款统计表"
DEFINE BAR 4 OF (a_menupops[5]) PROMPT "应付款统计表"
DEFINE BAR 5 OF (a_menupops[5]) PROMPT "经营成本汇总"
DEFINE BAR 6 OF (a_menupops[5]) PROMPT "车辆成本汇总"
DEFINE BAR 7 OF (a_menupops[5]) PROMPT "损益表"
DEFINE BAR 8 OF (a_menupops[5]) PROMPT "资金状况分析表"
ON SELECTION BAR 1 OF (a_menupops[5]) ;
DO _1jh12f7vb ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 2 OF (a_menupops[5]) ;
DO _1jh12f7vc ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 3 OF (a_menupops[5]) ;
DO _1jh12f7vd ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 4 OF (a_menupops[5]) ;
DO _1jh12f7ve ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 5 OF (a_menupops[5]) ;
DO _1jh12f7vf ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 6 OF (a_menupops[5]) ;
DO _1jh12f7vg ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 7 OF (a_menupops[5]) ;
DO _1jh12f7vh ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 8 OF (a_menupops[5]) ;
DO _1jh12f7vi ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
DEFINE POPUP (a_menupops[6]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[6]) PROMPT "客户资料"
DEFINE BAR 2 OF (a_menupops[6]) PROMPT "车辆资料"
DEFINE BAR 3 OF (a_menupops[6]) PROMPT "财务科目"
DEFINE BAR 4 OF (a_menupops[6]) PROMPT "提还地点"
DEFINE BAR 5 OF (a_menupops[6]) PROMPT "报关行"
DEFINE BAR 6 OF (a_menupops[6]) PROMPT "报关形式"
DEFINE BAR 7 OF (a_menupops[6]) PROMPT "船公司"
DEFINE BAR 8 OF (a_menupops[6]) PROMPT "经营单位"
ON SELECTION BAR 1 OF (a_menupops[6]) DO FORM KH
ON SELECTION BAR 2 OF (a_menupops[6]) DO FORM ONSJ
ON SELECTION BAR 3 OF (a_menupops[6]) ;
DO _1jh12f7vj ;
IN LOCFILE("\BGRS\MENUS\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 4 OF (a_menupops[6]) DO FORM TJDD
ON SELECTION BAR 5 OF (a_menupops[6]) DO FORM BGH
ON SELECTION BAR 6 OF (a_menupops[6]) DO FORM BGXS
ON SELECTION BAR 7 OF (a_menupops[6]) DO FORM CGS
ON SELECTION BAR 8 OF (a_menupops[6]) DO form gc
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -