Rev 6050 | Rev 6746 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6278 | leency | 1 | #define WIN_DIALOG_W 420 |
2 | #define WIN_DIALOG_H 100 |
||
5804 | punk_joker | 3 | proc_info Dialog_Form; |
4 | |||
6278 | leency | 5 | progress_bar copy_bar = {0,16,60,50,23,0,0,1,0xFFFFFF,0x00FF00,0x555555}; |
5804 | punk_joker | 6 | |
7 | int operation_flag; |
||
6278 | leency | 8 | enum { |
9 | COPY_FLAG, |
||
10 | MOVE_FLAG, |
||
11 | DELETE_FLAG, |
||
12 | OPERATION_END |
||
13 | }; |
||
5804 | punk_joker | 14 | |
15 | void DisplayOperationForm() |
||
16 | { |
||
6278 | leency | 17 | dword title, message; |
18 | switch(CheckEvent()) |
||
19 | { |
||
5804 | punk_joker | 20 | case evButton: |
21 | notify(T_CANCEL_PASTE); |
||
22 | DialogExit(); |
||
23 | break; |
||
6278 | leency | 24 | |
5804 | punk_joker | 25 | case evReDraw: |
6278 | leency | 26 | if (operation_flag==COPY_FLAG) { |
27 | title = T_COPY_WINDOW_TITLE; |
||
28 | message = T_COPY_WINDOW_TEXT; |
||
29 | } |
||
30 | else if (operation_flag==MOVE_FLAG) { |
||
31 | title = T_MOVE_WINDOW_TITLE; |
||
32 | message = T_MOVE_WINDOW_TEXT; |
||
33 | } |
||
34 | else if (operation_flag==DELETE_FLAG) { |
||
35 | title = T_DELETE_WINDOW_TITLE; |
||
36 | message = T_DELETE_WINDOW_TEXT; |
||
37 | } |
||
38 | DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title); |
||
5804 | punk_joker | 39 | GetProcessInfo(#Dialog_Form, SelfInfo); |
6278 | leency | 40 | WriteText(45, 11, 0x90, system.color.work_text, message); |
41 | DrawFlatButton(Dialog_Form.cwidth - 96, /*Dialog_Form.cheight - 32*/ copy_bar.top , 80, 22, T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON); |
||
42 | } |
||
5804 | punk_joker | 43 | } |
44 | |||
45 | void DialogExit() { |
||
46 | action_buf = OPERATION_END; |
||
47 | ActivateWindow(GetProcessSlot(Form.ID)); |
||
48 | ExitProcess(); |
||
49 | } |
||
50 | |||
51 | |||
6278 | leency | 52 | void Operation_Draw_Progress(dword filename) { |
5804 | punk_joker | 53 | if (Dialog_Form.cwidth==0) |
54 | { |
||
55 | copy_bar.value++; |
||
56 | return; |
||
57 | } |
||
6278 | leency | 58 | copy_bar.width = Dialog_Form.cwidth-32 - 100; |
5804 | punk_joker | 59 | DisplayOperationForm(); |
6278 | leency | 60 | DrawIconByExtension(filename+strrchr(filename,'.'), 16, 19, system.color.work); |
61 | DrawBar(45, 32, Dialog_Form.cwidth-45, 15, system.color.work); |
||
62 | WriteText(45, 32, 0x90, 0x000000, filename); |
||
5804 | punk_joker | 63 | progressbar_draw stdcall (#copy_bar); |
64 | progressbar_progress stdcall (#copy_bar); |
||
65 | //copy_bar.value++; |
||
6278 | leency | 66 | //pause(20); |
5804 | punk_joker | 67 | } |