马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
昨天受一个朋友启发,模仿DOSLIB尝试写了一个ODCL的UI界面
- ;|
- Style Description
- 0 Non-control characters (or custom filter)
- 1 AutoCAD angle units only
- 2 Signed integers only
- 3 AutoCAD distance units only (affected by DIMZIN system variable)
- 4 AutoCAD symbol table names only
- 5 Upper case only
- 6 Lower case only
- 7 Password (hides input text)
- 8 All characters allowed (including [Enter])
- |;
- (defun XD::Odcl:Getstring (Title
- Protxt
- mod
- filter
- /
- c:GetString_Getstring_OnCancel
- c:GetString_Getstring_OnCancelClose
- c:GetString_Getstring_OnClose
- c:GetString_Getstring_OnOK
- c:GetString_Getstring_Input_OnEditChanged
- c:GetString_Getstring_Input_OnReturnPressed
- c:GetString_GetString_OnInitialize
- str
- string
- )
- (defun c:GetString_GetString_OnInitialize (/)
- (dcl_Control_SetTitleBar getstring_getstring Title)
- (dcl_control_setcaption getstring_getstring_label protxt)
- (dcl_Control_SetFilterStyle GetString_GetString_Input mod)
- (dcl_TextBox_SetFilter GetString_GetString_Input Filter)
- )
- (defun c:GetString_Getstring_OnCancel (/)
- (dcl_form_close getstring_getstring)
- )
- (defun c:GetString_Getstring_OnCancelClose (Reason /)
- (dcl_form_close getstring_getstring)
- )
- (defun c:GetString_Getstring_OnClose (UpperLeftX UpperLeftY /)
- (dcl_form_close getstring_getstring)
- )
- (defun c:GetString_Getstring_OnOK (/)
- (setq str (dcl_control_gettext getstring_getstring_input))
- )
- (defun c:GetString_Getstring_Input_OnEditChanged (NewValue /)
- (dcl_control_setenabled getstring_getstring_Ok t)
- )
- (defun c:GetString_Getstring_Input_OnReturnPressed (/)
- (setq str (dcl_control_gettext getstring_getstring_input))
- (dcl_form_close getstring_getstring)
- )
- (defun c:GetString_Getstring_Cancel_OnClicked (/)
- (setq str (dcl_control_gettext getstring_getstring_input))
- (dcl_form_close getstring_getstring)
- )
- (defun c:GetString_GetString_OK_OnClicked (/)
- (setq str (dcl_control_gettext getstring_getstring_input))
- (dcl_form_close getstring_getstring)
- )
- (setq string
- (apply
- 'strcat
- '("YWt6A9kRAAAovLWyBuKTKbMxbT9qgVM8Z3ovN/K4ev384S7SViZKTzhKOH/1Dq46bdub1Sz09FaP"
- "vC9skWCqQT87bUFs8QTv5VkxYELkVpS3ZkHWkbPo46OppMzX+BaSGAmZSY2YswURoJGTCgcUUPuK"
- "Iwhmg8b6YMRRXPBaeB9/Bid06q/lO5Tkbzhyxa/yKMQcdhxZ31bL/aY7qX7zeYs2djOq9O+0WMQE"
- "rzwdTxSLrza2IEy7ZIUWiP7gZVtnqM39pMgQAI2y3iBfMtV4FxBRyzwK+ddJOoQkNshpW1YZ2xJP"
- "VzAfS+r7XNoBp6MtUS5LUe9oK6NW+JXZWMs0gwU1BKsTeqyuXNvLT5I/2JxNJ4VcihBdLe1EUncU"
- "WU70TxTVYWDTlXSv1FAFCiuFqZsmKxsCQbfPBpOvcgu7/UmGI5d2ow+U8+2LdwQgm0vh5ksLgmF3"
- "giae+XwBjabKqNEzb8o9M3ZBfehpAUlHvPXVFVYLbPMN2qjtBi6xVkXzRqryZqEcAiY9XUTvB7sM"
- "kKdZbcf6nQhgnRoFyHpQ/Az8zyNmZGym66Ihp44cuS4FQhy4FWbp9j6iaRoHXg7bWe4lgxL4D6yg"
- "5j26CjDoSHKXGmHaRwMuibooo2sG144G248uJeaK+sjc7dLW3wU2LVc/k/2K2jQPsK8dEZ/Wvl0w"
- "2tIxYrcfT+Buhtf3klK1+TuaGrQq9+PGX4LUaQAz90Y6e0BfjlTd4a05C2fC/FzaZHqz/HwhaYSE"
- "e6BYggVQjlPxAgNf56zTG7g3XPdQBIgtT2XNzZvGjozKzgzDXhjd74FMN4wNGGkLqkH2I+MLmKWE"
- "oHcDYTPoFoeJMJ/OD+Pmwa8rZgaC5r+FZ3F2haW70Ap2oleOL/8lu9C2PMsnGuPVDteHvMv6PnuJ"
- "Sra8K9r1FeDsm1RH4q9Univv4sYHVN1yK2qMYxQJA4mcinNjyC1bIRflaN+xKfaQgsROFwMB3m4D"
- "IDZftC8WCrS3PJ1Uam+1JVYY7ttuxlYJf/U138OOLNbkD9/q/5vz8XG0jue037JMkLfeMr4NzFXy"
- "RNEE2DiMLhntYZTGMyUSdJeugPtq5Ghq9F1J+4bxpgF054cZ79husdaa4LjynQx5mxcKP3rsgYv0"
- "u9+0O859tl4mmI/GfIDwtYF0X5qfSHk/BrFMcNGHcN1HdmzMaOlepCBpP8SOZXac/W4RrJHhnBA2"
- "ZA=="
- )
- )
- )
- (dcl_project_import string)
- (dcl_form_show getstring_getstring)
- str
- )
_$ (XD::ODCL:Getstring "XDCAD" "输入整数" 0 "0123456789")
"123232141"
_$ |