123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- $PBExportHeader$n_dw2xls_resource.sru
- forward
- global type n_dw2xls_resource from nonvisualobject
- end type
- end forward
- global type n_dw2xls_resource from nonvisualobject
- end type
- global n_dw2xls_resource n_dw2xls_resource
- type prototypes
- function Long GetSystemDefaultLCID() library "kernel32"
- end prototypes
- type variables
- //语言代码包
- String Language
- String FontName
- String PicFileName="Res\dw2xls_File.png"
- String OK
- String Cancel
- String Warning
- String Tips
- String WorkInProcessing
- String FileExists
- String FileWriteError
- String OpenFileConfirm
- String RunExcelAppError
- String CancelQuestion
- String Hour
- String Hours
- String Minute
- String Minutes
- String Second
- String Seconds
- String RemainTimes
- constant long LANG_CHINESE_SIMPLIFIED =2052 //0x804 中国大陆
- constant long LANG_CHINESE_TRADITIONAL = 1028 //0x404 台湾
- constant long LANG_CHINESE = 3076 //0xC04 香港
- end variables
- forward prototypes
- public function string of_format (readonly string as_str, readonly string as_parm)
- public subroutine of_setlanguage (readonly string as_language)
- end prototypes
- public function string of_format (readonly string as_str, readonly string as_parm);Int li_Pos1, li_Pos2
- String ls_Result
- li_Pos1 = Pos(as_str,"{")
- li_Pos2 = Pos(as_str, "}" ,li_Pos1+1 )
- IF li_Pos1>0 AND li_Pos2>0 Then
- ls_Result =Left( as_str ,li_Pos1 -1)+ as_Parm+Mid(as_str, li_Pos2+1)
- ELSE
- ls_Result = as_str
- END IF
- Return ls_Result
- end function
- public subroutine of_setlanguage (readonly string as_language);Language= Upper(Trim(as_language ))
- //根据当前操作系统,自动选择合适的语言
- IF Language="" Then
- Choose Case GetSystemDefaultLCID()
- Case LANG_CHINESE_SIMPLIFIED
- Language="CN"
- Case LANG_CHINESE_TRADITIONAL, LANG_CHINESE
- Language="BIG5"
- Case Else
- Language="EN"
- END CHOOSE
- END IF
- Choose Case Language
- Case 'EN'
-
- FontName='Arial'
-
- OK ="OK"
- Cancel ="Cancel"
- Tips ="Tips"
- Warning="warning"
- WorkInProcessing ="Work in processing ....."
- FileExists= "The file {1} already exists,~r~nDo you wish to overwrite it?"
- FileWriteError = "Could not create file {1}.~r~nPlease verify that the correct path and file name!"
- OpenFileConfirm="The file {1} generated success!~r~nDo you want to open it?"
- RunExcelAppError= "Unable to run the microsoft excel application!"
- CancelQuestion="Do you want to cancel generate file?"
-
- Hour ="Hour"
- Hours="Hours"
- Minute="Minute"
- Minutes="Minutes"
- Second="Second"
- Seconds="Seconds"
- RemainTimes ="Remaining times: "
- CASE 'BIG5'
-
- FontName='細明體'
-
- OK ="確認"
- Cancel ="取消"
- Tips ="提示"
- Warning="警告"
- WorkInProcessing ="正在生成Excel文件,請稍侯..... "
- FileExists="文件 {1} 已經存在,是否繼續? "
- FileWriteError ="文件路徑{1} 不能寫入數據,請檢查文件路徑是否有效!"
- OpenFileConfirm="文件已成功生成到{1},~r~n你是否需要現在就打開這個文件?"
- RunExcelAppError="不能運行Excel程序,請檢查是否已安裝Microsoft Excel軟件!"
- CancelQuestion ="是否取消生成Excel文件?"
-
- Hour ="小時"
- Hours="小時"
- Minute="分鐘"
- Minutes="分鐘"
- Second="秒"
- Seconds="秒"
- RemainTimes ="大約還需要: "
-
- Case Else
-
- FontName='宋体'
-
- OK ="确定"
- Cancel ="取消"
- Tips ="提示"
- Warning="警告"
- WorkInProcessing ="正在生成Excel文件,请稍侯..... "
- FileExists="文件 {1} 已经存在,是否继续? "
- FileWriteError ="文件路径 {1} 不能写入数据,请检查文件路径是否有效!"
- OpenFileConfirm="文件已成功生成到 {1},~r~n你是否需要现在就打开这个文件?"
- RunExcelAppError="不能运行Excel程序,请检查是否已安装Microsoft Excel软件!"
- CancelQuestion="是否取消生成Excel文件?"
-
- Hour ="小时"
- Hours="小时"
- Minute="分钟"
- Minutes="分钟"
- Second="秒"
- Seconds="秒"
- RemainTimes ="大约还需要"
- END CHOOSE
- end subroutine
- on n_dw2xls_resource.create
- call super::create
- TriggerEvent( this, "constructor" )
- end on
- on n_dw2xls_resource.destroy
- TriggerEvent( this, "destructor" )
- call super::destroy
- end on
- event constructor;Double ld_Ver
- environment lenv_current
- GetEnvironment(lenv_current)
- ld_Ver =lenv_current.PBMajorRevision
- IF lenv_current.PBMinorRevision=5 Then
- ld_Ver =ld_Ver +0.5
- END IF
- IF ld_Ver>=11.5 Then //11.5版本才支持png格式的图片文件
- PicFileName="Res\dw2xls_File.png"
- ELSE
- PicFileName="Res\dw2xls_File.bmp"
- END IF
- end event
|