forked from KolibriOS/kolibrios
upgrade a programme
git-svn-id: svn://kolibrios.org@308 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a17b90b7b3
commit
7038d7bc41
@ -1,7 +1,14 @@
|
||||
;--- ¤à㣨¥ ¬ ªà®áë ---
|
||||
include 'editbox.inc'
|
||||
include 'txtbut.inc'
|
||||
include 'lang.inc'
|
||||
;include 'gp.inc'
|
||||
;include 'label.inc'
|
||||
;include 'checkbox.inc'
|
||||
;include 'file_sys.inc'
|
||||
;include 'textwork.inc'
|
||||
;include 'ini.inc'
|
||||
|
||||
lang fix ru;en
|
||||
|
||||
;--- § £®«®¢®ª ---
|
||||
macro meos_header par_buf,cur_dir_buf
|
||||
@ -121,7 +128,7 @@ macro get_grab_area
|
||||
int 0x40
|
||||
}
|
||||
|
||||
macro get_scin_height
|
||||
macro get_skin_height
|
||||
{
|
||||
mov eax,48
|
||||
mov ebx,4
|
||||
|
@ -1,6 +1,9 @@
|
||||
window_y=88
|
||||
; 01.02.07 - ®¡®¢«ñ editbox
|
||||
; 31.01.07 - ¨á¯à ¢«¥ ¥ª®à४â ï ®âà¨á®¢ª ¯à¨ ¡®«ì讬 § 票¨ ¢ëá®âë ᪨
|
||||
; ¢ëà ¢¨¢ ¨¥ ᨧ㠮â®á¨â¥«ì® à ¡®ç¥© ®¡« á⨠íªà
|
||||
window_y=67
|
||||
;window_x=320
|
||||
window_x=450
|
||||
window_x=640
|
||||
include 'macros.inc'
|
||||
meos_header par
|
||||
use_edit_box
|
||||
@ -100,10 +103,10 @@ copy_par:
|
||||
mov ebx,file_info
|
||||
int 0x40
|
||||
|
||||
;cmp eax,0
|
||||
;jg error
|
||||
bt eax,31
|
||||
je error
|
||||
cmp eax,0
|
||||
jl error
|
||||
mov [status],run_ok
|
||||
call draw_status
|
||||
jmp still
|
||||
close:
|
||||
app_close
|
||||
@ -115,14 +118,10 @@ macro cmp_err code,text_ptr
|
||||
cmp al,code
|
||||
jne @f
|
||||
mov [status],text_ptr
|
||||
;jmp .draw_status
|
||||
@@:
|
||||
}
|
||||
neg eax
|
||||
|
||||
;test al,al
|
||||
;jz close
|
||||
|
||||
cmp_err 3,bad_file_sys
|
||||
|
||||
cmp_err 5,file_not_find
|
||||
@ -139,40 +138,51 @@ macro cmp_err code,text_ptr
|
||||
|
||||
cmp_err 32,many_processes
|
||||
|
||||
.draw_status:
|
||||
|
||||
call draw_status
|
||||
jmp still
|
||||
|
||||
draw_window:
|
||||
push 48
|
||||
pop eax
|
||||
mov ebx,5
|
||||
int 0x40
|
||||
mov si,bx
|
||||
start_draw_window
|
||||
get_skin_height
|
||||
mov dx,ax
|
||||
get_screen_size
|
||||
mov cx,ax
|
||||
sub cx,window_y+20
|
||||
xor ecx,ecx
|
||||
sub cx,window_y+2
|
||||
sub cx,dx
|
||||
add cx,si
|
||||
shl ecx,16
|
||||
mov cx,window_y
|
||||
mov cx,dx
|
||||
add cx,window_y
|
||||
shr eax,16
|
||||
mov bx,ax
|
||||
sub bx,window_x
|
||||
shl ebx,15
|
||||
mov bx,window_x
|
||||
mov edx,[sc.work]
|
||||
or edx,0xb3000000
|
||||
or edx,0x33000000
|
||||
xor eax,eax
|
||||
mov esi,[sc.grab_text]
|
||||
mov edi,hed
|
||||
xor esi,esi
|
||||
mov edi,grab_text
|
||||
int 0x40
|
||||
|
||||
get_procinfo app
|
||||
|
||||
mov ax,[app.width]
|
||||
sub ax,20
|
||||
mov eax,[app.width]
|
||||
sub eax,20
|
||||
mov [input_fn.width],eax
|
||||
mov [run_but.width],ax
|
||||
|
||||
mov ebx,10000
|
||||
xor bx,bx
|
||||
shl ebx,16
|
||||
mov bx,ax
|
||||
add bx,10
|
||||
mov cx,47
|
||||
mov cx,45
|
||||
push cx
|
||||
shl ecx,16
|
||||
pop cx
|
||||
@ -189,8 +199,9 @@ draw_window:
|
||||
ret
|
||||
|
||||
draw_status:
|
||||
mov ebx,5*65536+(window_x-5-10)
|
||||
mov ecx,(window_y-39)*65536+12
|
||||
mov ebx,[app.width]
|
||||
sub bx,10
|
||||
mov ecx,(50)*65536+12
|
||||
mov edx,[sc.work]
|
||||
mov eax,13
|
||||
int 0x40
|
||||
@ -203,22 +214,17 @@ draw_status_text:
|
||||
inc esi
|
||||
jmp @b
|
||||
@@:
|
||||
mov eax,4
|
||||
mov ebx,6*65536+(window_y-37)
|
||||
mov ebx,5*65536+(50)
|
||||
mov ecx,[sc.work_text]
|
||||
mov eax,4
|
||||
int 0x40
|
||||
ret
|
||||
|
||||
run_but txt_button 0,5,15,30,2,0,0,run_but_text,
|
||||
if lang eq ru
|
||||
run_but txt_button 0,5,15,25,2,0,0,run_but_text,
|
||||
run_but_text db '‡€<E280A1>“‘’ˆ’œ',0
|
||||
else
|
||||
run_but_text db 'RUN',0
|
||||
end if
|
||||
input_fn edit_box 0,5,10,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
|
||||
input_fn edit_box 0,5,5,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
|
||||
ed_always_focus
|
||||
|
||||
if lang eq ru
|
||||
hello db '‚¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ä ©«ã ¨ ¦¬¨â¥ Enter',0
|
||||
bad_file_sys db '<27>¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
|
||||
file_not_find db '” ©« ¥ ©¤¥',0 ; 5
|
||||
@ -228,23 +234,9 @@ device_error db '
|
||||
out_of_memory db '<27>¥¤®áâ â®ç® ¯ ¬ïâ¨',0 ; 30
|
||||
file_not_executable db '” ©« ¥ ï¥âáï ¨á¯®«ï¥¬ë¬',0 ; 31
|
||||
many_processes db '‘«¨èª®¬ ¬®£® ¯à®æ¥áᮢ',0 ; 32
|
||||
else
|
||||
hello db 'Enter full path to file and press <Enter>',0
|
||||
bad_file_sys db 'Unknown file system',0 ; 3
|
||||
file_not_find db 'File not found',0 ; 5
|
||||
bad_fat_table db 'FAT table corrupted',0 ; 9
|
||||
acces_denyied db 'Access denied',0 ; 10
|
||||
device_error db 'Device error',0 ; 11
|
||||
out_of_memory db 'Out of memory',0 ; 30
|
||||
file_not_executable db 'File is not executable',0 ; 31
|
||||
many_processes db 'Too many processes',0 ; 32
|
||||
end if
|
||||
run_ok db '<27>à®£à ¬¬ ãá¯¥è® § ¯ãé¥ ',0
|
||||
grab_text db '‡€<E280A1>“‘Š <20><>Žƒ<C5BD>€ŒŒ›',0
|
||||
|
||||
if lang eq ru
|
||||
hed db 'RUN ®â ¯¥à¢®£® ”¥¢à «ï 2007 £®¤ ',0
|
||||
else
|
||||
hed db 'RUN of the first of FEBRUARY 2007 year',0
|
||||
end if
|
||||
status dd hello
|
||||
|
||||
file_info:
|
||||
|
@ -1,13 +1,10 @@
|
||||
<Lrz> 01.02.2007 „®¡ ¢¨« ¬®¤¥à¨§¨à®¢ ë© ª®¬¯®¥â edit_box,
|
||||
ã«ãç訫 ¨ ¯¥à¥¯¨á « ç áâì ª®¤ .
|
||||
|
||||
RUN - § ¯ã᪠«ª ¯à®£à ¬¬ ¢ Š®«¨¡à¨Ž‘ ç¥à¥§ 70-î äãªæ¨î.
|
||||
|
||||
‡ ¯ã᪠¯à®£à ¬¬
|
||||
‚¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ¨á¯®«ï¥¬®¬ã ä ©«ã ¨ ¦¬¨â¥ ª®¯ªã "‡€<E280A1>“‘’ˆ’œ" ¨«¨
|
||||
ª« ¢¨èã Enter.
|
||||
‡ ¯ã᪠¯à®£à ¬¬ á ¯ à ¬¥âà ¬¨
|
||||
<20>®áâ ¢ì⥠¯à®¡¥« ¯®á«¥ ¯ã⨠ª ä ©«ã ¨ ¢¢®¤¨â¥ ¯ à ¬¥âàë. …᫨ ¢ ¯ã⨠ª ä ©«ã
|
||||
<20>®á⠢⥠¯à®¡¥« ¯®á«¥ ¯ã⨠ª ä ©«ã ¨ ¢¢®¤¨â¥ ¯ à ¬¥âàë. …᫨ ¢ ¯ã⨠ª ä ©«ã
|
||||
¥áâì ¯à®¡¥«ë, ¥£® ¥®¡å®¤¨¬® ¢ë¤¥«¨âì ª ¢ëçª ¬¨ (⮣¤ ¯à®¡¥«®¬ à §¤¥«ïâì
|
||||
¥®¡ï§ ⥫ì®).
|
||||
<20>ਬ¥àë
|
||||
|
Loading…
Reference in New Issue
Block a user