Subversion Repositories Kolibri OS

Rev

Rev 7806 | Rev 8861 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7491 leency 1
 
2
#define WIN_DIALOG_H 100
7658 leency 3
#define PR_LEFT 14
7491 leency 4
#define PR_TOP  32
7658 leency 5
#define PR_W  WIN_DIALOG_W-PR_LEFT-PR_LEFT
7491 leency 6
#define PR_H  18
7658 leency 7
7491 leency 8
 
5804 punk_joker 9
progress_bar copy_bar = {0,PR_LEFT,PR_TOP,PR_W,PR_H,0,0,1,0xFFFFFF,0x00FF00,0x555555};
7491 leency 10
5804 punk_joker 11
 
6278 leency 12
	REDRAW_FLAG,
7878 leency 13
	COPY_FLAG,
6278 leency 14
	MOVE_FLAG,
15
	DELETE_FLAG,
16
	OPERATION_END
17
};
18
5804 punk_joker 19
 
7878 leency 20
{
5804 punk_joker 21
	dword title;
7491 leency 22
	if (operation_flag==COPY_FLAG) {
23
		title = T_COPY_WINDOW_TITLE;
24
		copy_bar.progress_color = 0x00FF00;
25
		copy_bar.value = 0;
7878 leency 26
		copy_bar.max = 0;
27
	}
7491 leency 28
	else if (operation_flag==MOVE_FLAG) {
29
		title = T_MOVE_WINDOW_TITLE;
30
		copy_bar.progress_color = 0x00FF00;
31
		copy_bar.value = 0;
7878 leency 32
		copy_bar.max = 0;
33
	}
7491 leency 34
	else if (operation_flag==DELETE_FLAG) {
35
		title = T_DELETE_WINDOW_TITLE;
36
		copy_bar.progress_color = 0xF17A65;
37
		copy_bar.value = 0;
7878 leency 38
		copy_bar.max = 0;
39
	}
7491 leency 40
	copy_bar.frame_color = sc.work_graph;
7806 leency 41
	switch(CheckEvent())
6278 leency 42
	{
43
		 case evButton:
5804 punk_joker 44
			notify(T_CANCEL_PASTE);
45
			DialogExit();
46
			break;
47
6278 leency 48
 
5804 punk_joker 49
			DefineAndDrawWindow(Form.left+Form.width-200, Form.top+90, WIN_DIALOG_W+9,
7878 leency 50
				skin_height+WIN_DIALOG_H, 0x34, sc.work, title, 0);
51
			GetProcessInfo(#Dialog_Form, SelfInfo);
5804 punk_joker 52
			DrawCaptButton(WIN_DIALOG_W-PR_LEFT-101, PR_TOP+PR_H+6, 100,26, 2,
7658 leency 53
				sc.button, sc.button_text, T_ABORT_WINDOW_BUTTON);
7806 leency 54
7491 leency 55
 
7806 leency 56
	}
6278 leency 57
}
5804 punk_joker 58
59
 
60
	action_buf = OPERATION_END;
61
	ActivateWindow(GetProcessSlot(Form.ID));
62
	ExitProcess();
63
}
64
65
 
6278 leency 66
	if (Dialog_Form.cwidth==0)
5804 punk_joker 67
	{
68
		copy_bar.value++;
69
		return;
70
	}
71
	DisplayOperationForm(REDRAW_FLAG);
7878 leency 72
	DrawBar(PR_LEFT, PR_TOP-20, WIN_DIALOG_W-PR_LEFT, 15, sc.work);
7806 leency 73
	WriteText(PR_LEFT, PR_TOP-20, 0x90, sc.work_text, filename);
74
7491 leency 75
 
5804 punk_joker 76
	progressbar_progress stdcall (#copy_bar);
77
7491 leency 78
 
7806 leency 79
		sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max), sc.work);
80
}
5804 punk_joker 81