Subversion Repositories Kolibri OS

Rev

Rev 7878 | Rev 8947 | 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
			DialogExit();
45
			break;
46
6278 leency 47
 
5804 punk_joker 48
			DefineAndDrawWindow(Form.left+Form.width-200, Form.top+90, WIN_DIALOG_W+9,
7878 leency 49
				skin_height+WIN_DIALOG_H, 0x34, sc.work, title, 0);
50
			GetProcessInfo(#Dialog_Form, SelfInfo);
5804 punk_joker 51
			DrawCaptButton(WIN_DIALOG_W-PR_LEFT-101, PR_TOP+PR_H+6, 100,26, 2,
7658 leency 52
				sc.button, sc.button_text, T_ABORT_WINDOW_BUTTON);
7806 leency 53
7491 leency 54
 
7806 leency 55
	}
6278 leency 56
}
5804 punk_joker 57
58
 
59
	action_buf = OPERATION_END;
60
	ActivateWindow(GetProcessSlot(Form.ID));
61
	ExitProcess();
62
}
63
64
 
6278 leency 65
	if (Dialog_Form.cwidth==0)
5804 punk_joker 66
	{
67
		copy_bar.value++;
68
		return;
69
	}
70
	DisplayOperationForm(REDRAW_FLAG);
7878 leency 71
	DrawBar(PR_LEFT, PR_TOP-20, WIN_DIALOG_W-PR_LEFT, 15, sc.work);
7806 leency 72
	WriteText(PR_LEFT, PR_TOP-20, 0x90, sc.work_text, filename);
73
7491 leency 74
 
5804 punk_joker 75
	progressbar_progress stdcall (#copy_bar);
76
7491 leency 77
 
7806 leency 78
		sprintf(#param, "%i/%i", copy_bar.value, copy_bar.max), sc.work);
79
}
5804 punk_joker 80