Subversion Repositories Kolibri OS

Rev

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