2016-02-22 00:57:22 +03:00
|
|
|
#define WIN_DIALOG_W 420
|
|
|
|
#define WIN_DIALOG_H 100
|
2015-09-05 20:50:37 +03:00
|
|
|
proc_info Dialog_Form;
|
|
|
|
|
2016-02-22 00:57:22 +03:00
|
|
|
progress_bar copy_bar = {0,16,60,50,23,0,0,1,0xFFFFFF,0x00FF00,0x555555};
|
2015-09-05 20:50:37 +03:00
|
|
|
|
|
|
|
int operation_flag;
|
2016-02-22 00:57:22 +03:00
|
|
|
enum {
|
|
|
|
COPY_FLAG,
|
|
|
|
MOVE_FLAG,
|
|
|
|
DELETE_FLAG,
|
|
|
|
OPERATION_END
|
|
|
|
};
|
2015-09-05 20:50:37 +03:00
|
|
|
|
|
|
|
void DisplayOperationForm()
|
|
|
|
{
|
2016-02-22 00:57:22 +03:00
|
|
|
dword title, message;
|
|
|
|
switch(CheckEvent())
|
|
|
|
{
|
2015-09-05 20:50:37 +03:00
|
|
|
case evButton:
|
|
|
|
notify(T_CANCEL_PASTE);
|
|
|
|
DialogExit();
|
|
|
|
break;
|
|
|
|
|
2016-02-22 00:57:22 +03:00
|
|
|
case evReDraw:
|
|
|
|
if (operation_flag==COPY_FLAG) {
|
|
|
|
title = T_COPY_WINDOW_TITLE;
|
|
|
|
message = T_COPY_WINDOW_TEXT;
|
|
|
|
}
|
|
|
|
else if (operation_flag==MOVE_FLAG) {
|
|
|
|
title = T_MOVE_WINDOW_TITLE;
|
|
|
|
message = T_MOVE_WINDOW_TEXT;
|
|
|
|
}
|
|
|
|
else if (operation_flag==DELETE_FLAG) {
|
|
|
|
title = T_DELETE_WINDOW_TITLE;
|
|
|
|
message = T_DELETE_WINDOW_TEXT;
|
|
|
|
}
|
2016-11-23 14:37:13 +03:00
|
|
|
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_DIALOG_W,skin_height+WIN_DIALOG_H,0x34,system.color.work,title,0);
|
2015-09-05 20:50:37 +03:00
|
|
|
GetProcessInfo(#Dialog_Form, SelfInfo);
|
2016-02-22 00:57:22 +03:00
|
|
|
WriteText(45, 11, 0x90, system.color.work_text, message);
|
2018-05-13 19:06:20 +03:00
|
|
|
DrawStandartCaptButton(Dialog_Form.cwidth - 105, copy_bar.top-2 , T_CANCEL_PASTE, T_ABORT_WINDOW_BUTTON);
|
2016-02-22 00:57:22 +03:00
|
|
|
}
|
2015-09-05 20:50:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void DialogExit() {
|
|
|
|
action_buf = OPERATION_END;
|
|
|
|
ActivateWindow(GetProcessSlot(Form.ID));
|
|
|
|
ExitProcess();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-02-22 00:57:22 +03:00
|
|
|
void Operation_Draw_Progress(dword filename) {
|
2015-09-05 20:50:37 +03:00
|
|
|
if (Dialog_Form.cwidth==0)
|
|
|
|
{
|
|
|
|
copy_bar.value++;
|
|
|
|
return;
|
|
|
|
}
|
2016-02-22 00:57:22 +03:00
|
|
|
copy_bar.width = Dialog_Form.cwidth-32 - 100;
|
2015-09-05 20:50:37 +03:00
|
|
|
DisplayOperationForm();
|
2016-11-25 17:15:30 +03:00
|
|
|
DrawIconByExtension(filename, filename+strrchr(filename,'.'), 16, 19, system.color.work);
|
2016-02-22 00:57:22 +03:00
|
|
|
DrawBar(45, 32, Dialog_Form.cwidth-45, 15, system.color.work);
|
2016-12-04 21:51:23 +03:00
|
|
|
WriteText(45, 32, 0x90, system.color.work_text, filename);
|
2015-09-05 20:50:37 +03:00
|
|
|
progressbar_draw stdcall (#copy_bar);
|
|
|
|
progressbar_progress stdcall (#copy_bar);
|
|
|
|
//copy_bar.value++;
|
2016-02-22 00:57:22 +03:00
|
|
|
//pause(20);
|
2015-09-05 20:50:37 +03:00
|
|
|
}
|