📄 main.mpr
字号:
* *********************************************************
* *
* * 2007.11.02 MAIN.MPR 16:30:15
* *
* *********************************************************
* *
* * 崔亚杰
* *
* * Copyright (C) 2007 山西临汾伊尔易科技公司
* * 山西临汾贡院街8号楼
* * 临汾, 山西 041000
* * 中国
* *
* * 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[3]
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]="列表维护b"
a_menupops[3]="【退出c】"
ENDIF
* *********************************************************
* *
* * Menu Definition
* *
* *********************************************************
*
DEFINE MENU (m.cMenuName) IN (m.oFormRef.Name) BAR
DEFINE PAD _27v0zdh8n OF (m.cMenuName) PROMPT "【数据库维护(\<A)】" COLOR SCHEME 3 ;
KEY ALT+A, ""
DEFINE PAD _27v0zdh8o OF (m.cMenuName) PROMPT "【列表维护(\<B)】" COLOR SCHEME 3 ;
KEY ALT+B, ""
DEFINE PAD _27v0zdh8p OF (m.cMenuName) PROMPT "【退出(\<C)】" COLOR SCHEME 3 ;
KEY ALT+C, ""
ON PAD _27v0zdh8n OF (m.cMenuName) ACTIVATE POPUP (a_menupops[1])
ON PAD _27v0zdh8o OF (m.cMenuName) ACTIVATE POPUP (a_menupops[2])
ON PAD _27v0zdh8p OF (m.cMenuName) ACTIVATE POPUP (a_menupops[3])
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 "分离数据库"
DEFINE BAR 6 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR 7 OF (a_menupops[1]) PROMPT "备份数据库"
DEFINE BAR 8 OF (a_menupops[1]) PROMPT "恢复数据库"
DEFINE BAR 9 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR 10 OF (a_menupops[1]) PROMPT "清空库日志"
DEFINE BAR 11 OF (a_menupops[1]) PROMPT "收缩数据库"
DEFINE BAR 12 OF (a_menupops[1]) PROMPT "检查数据库"
DEFINE BAR 13 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR 14 OF (a_menupops[1]) PROMPT "数据库文件"
DEFINE BAR 15 OF (a_menupops[1]) PROMPT "数据库选项"
DEFINE BAR 16 OF (a_menupops[1]) PROMPT "数据库进程"
ON SELECTION BAR 1 OF (a_menupops[1]) do form db_new
ON SELECTION BAR 2 OF (a_menupops[1]) do form db_delete
ON SELECTION BAR 4 OF (a_menupops[1]) do form db_attach
ON SELECTION BAR 5 OF (a_menupops[1]) do form db_detach
ON SELECTION BAR 7 OF (a_menupops[1]) do form db_backup
ON SELECTION BAR 8 OF (a_menupops[1]) do form db_restore
ON SELECTION BAR 10 OF (a_menupops[1]) do form db_trunlog
ON SELECTION BAR 11 OF (a_menupops[1]) do form db_shrink
ON SELECTION BAR 12 OF (a_menupops[1]) do form db_chkfix
ON SELECTION BAR 14 OF (a_menupops[1]) do form db_file
ON SELECTION BAR 15 OF (a_menupops[1]) do form db_option
ON SELECTION BAR 16 OF (a_menupops[1]) do form db_used
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 "清空数据库列表"
DEFINE BAR 7 OF (a_menupops[2]) PROMPT "\-"
DEFINE BAR 8 OF (a_menupops[2]) PROMPT "测试数据库连接"
ON SELECTION BAR 1 OF (a_menupops[2]) do form list_add
ON SELECTION BAR 3 OF (a_menupops[2]) do form list_edit
ON SELECTION BAR 5 OF (a_menupops[2]) do form list_delete
ON SELECTION BAR 6 OF (a_menupops[2]) List_DelALL()
ON SELECTION BAR 8 OF (a_menupops[2]) TestConnDB(.T.,.T.,.T.)
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 _27v0zdh8r ;
IN LOCFILE("\ACCSETMAN2\MENU\MAIN" ,"MPX;MPR|FXP;PRG" ,"WHERE is MAIN?")
ON SELECTION BAR 3 OF (a_menupops[3]) do form frm_ggkl
ON SELECTION BAR 4 OF (a_menupops[3]) do form frm_oper
ACTIVATE MENU (m.cMenuName) NOWAIT
IF m.cTypeParm2 = "C"
m.getMenuName = m.cMenuName
m.oFormRef.Name = m.cSaveFormName
ENDIF
* *********************************************************
* *
* * _27V0ZDH8R ON SELECTION BAR 1 OF POPUP 【退出c】
* *
* * Procedure Origin:
* *
* * From Menu: MAIN.MPR, Record: 40
* * Called By: ON SELECTION BAR 1 OF POPUP 【退出c】
* * Prompt: 退出
* * Snippet: 1
* *
* *********************************************************
*
PROCEDURE _27v0zdh8r
IF MESSAGEBOX("确认退出吗?",4+64,"询问")=6
P_FRMMAIN.release
ENDIF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -