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