Subversion Repositories Kolibri OS

Rev

Rev 6047 | Rev 6278 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6047 Rev 6193
Line 13... Line 13...
13
	0};
13
	0};
Line 14... Line 14...
14
	
14
	
15
	?define INTRO_TEXT_1 "‡¤¥áì ¡ã¤¥â ®â®¡à ¦ âìáï ᯨ᮪"
15
	?define INTRO_TEXT_1 "‡¤¥áì ¡ã¤¥â ®â®¡à ¦ âìáï ᯨ᮪"
16
	?define INTRO_TEXT_2 "¢¨àâã «ì­ëå ¤¨áª®¢ ¢ á¨á⥬¥."
16
	?define INTRO_TEXT_2 "¢¨àâã «ì­ëå ¤¨áª®¢ ¢ á¨á⥬¥."
17
	?define INTRO_TEXT_3 "®¯à®¡ã©â¥ ¤®¡ ¢¨âì ®¤¨­..."
17
	?define INTRO_TEXT_3 "®¯à®¡ã©â¥ ¤®¡ ¢¨âì ®¤¨­..."
18
	?define INTRO_TEXT_4 " §¬¥à:"
-
 
19
 
18
	?define SIZE_TEXT " §¬¥à:"
20
	?define NOTIFY_TEXT_NO_DISK    "'„«ï ­ ç «  ¤®¡ ¢ì⥠å®âï ¡ë ®¤¨­ ¤¨áª' -W"
19
	?define NOTIFY_TEXT_NO_DISK    "'„«ï ­ ç «  ¤®¡ ¢ì⥠å®âï ¡ë ®¤¨­ ¤¨áª' -W"
21
	?define NOTIFY_TEXT_DISK_LIMIT "'„®á⨣­ã⠯।¥« ª®«¨ç¥á⢠ ¢¨àâã «ì­ëå ¤¨áª®¢' -W"
20
	?define NOTIFY_TEXT_DISK_LIMIT "'„®á⨣­ã⠯।¥« ª®«¨ç¥á⢠ ¢¨àâã «ì­ëå ¤¨áª®¢' -W"
Line 22... Line 21...
22
	?define FREE_RAM_TEXT " §¬¥à ᢮¡®¤­®© ®¯¥à â¨¢­®© ¯ ¬ïâ¨: "
21
	?define FREE_RAM_TEXT " §¬¥à ᢮¡®¤­®© ®¯¥à â¨¢­®© ¯ ¬ïâ¨: "
Line 29... Line 28...
29
	0};
28
	0};
Line 30... Line 29...
30
	
29
	
31
	?define INTRO_TEXT_1 " There will be list of mounted"
30
	?define INTRO_TEXT_1 " There will be list of mounted"
32
	?define INTRO_TEXT_2 " virtual disks."
31
	?define INTRO_TEXT_2 " virtual disks."
33
	?define INTRO_TEXT_3 " Try to add one..."
32
	?define INTRO_TEXT_3 " Try to add one..."
34
	?define INTRO_TEXT_4 "Size:"
-
 
35
 
33
	?define SIZE_TEXT "Size:"
36
	?define NOTIFY_TEXT_NO_DISK    "'You need to have at least one disk' -W"
34
	?define NOTIFY_TEXT_NO_DISK    "'You need to have at least one disk' -W"
37
	?define NOTIFY_TEXT_DISK_LIMIT "'Reached the limit of the number of virtual disks' -W"
35
	?define NOTIFY_TEXT_DISK_LIMIT "'Reached the limit of the number of virtual disks' -W"
38
	?define FREE_RAM_TEXT "Free RAM size: "
36
	?define FREE_RAM_TEXT "Free RAM size: "
Line 46... Line 44...
46
char selected;
44
char selected;
Line 47... Line 45...
47
 
45
 
Line 48... Line 46...
48
proc_info Form;
46
proc_info Form;
49
 
47
 
50
unsigned char icons[] = FROM "icons.raw";
48
unsigned char icons[] = FROM "icons.raw";
Line 51... Line 49...
51
#define TOPPANELH 50
49
#define TOPPANELH 54
52
#define BOTPANELH 20
50
#define BOTPANELH 20
53
 
51
 
Line 54... Line 52...
54
int	mouse_dd;
52
int	mouse_dd;
55
char new_disk_size[5];
53
char new_disk_size[5];
56
edit_box edit_disk_size= {50,0,5,0xffffff,0x94AECE,0x000000,0xffffff,0,4,#new_disk_size,#mouse_dd, 1000000000000010b};
54
edit_box edit_disk_size= {50,0,7,0xffffff,0x94AECE,0xFFFfff,0xffffff,0,4,#new_disk_size,#mouse_dd, 1000000000000010b};
57
 
55
 
Line 58... Line 56...
58
void Main_Window()
56
void Main_Window()
59
{
57
{
60
	word id, key;
58
	word id, key;
61
	int i, x;
59
	int i, x;
62
	
60
	
63
   	mem_Init();
61
   	mem_Init();
64
	load_dll(boxlib, #box_lib_init,0);
62
	load_dll(boxlib, #box_lib_init,0);
65
	GetSizeDisk();
63
	GetSizeDisk();
66
	edit_disk_size.left = strlen(INTRO_TEXT_4)*6 + 10;
64
	edit_disk_size.left = strlen(SIZE_TEXT)*9 + 10;
Line 135... Line 133...
135
			GetProcessInfo(#Form, SelfInfo);
133
			GetProcessInfo(#Form, SelfInfo);
136
			if (Form.status_window>2) break;
134
			if (Form.status_window>2) break;
Line 137... Line 135...
137
 
135
 
138
			DrawBar(0,0,  Form.cwidth,TOPPANELH, system.color.work);
136
			DrawBar(0,0,  Form.cwidth,TOPPANELH, system.color.work);
139
			DrawBar(0,TOPPANELH, Form.cwidth,1,  system.color.work_graph);
137
			DrawBar(0,TOPPANELH, Form.cwidth,1,  system.color.work_graph);
140
			WriteText(6, 9, 0x80, system.color.work_text, INTRO_TEXT_4);
138
			WriteText(6, 6, 0x90, system.color.work_text, SIZE_TEXT);
141
			WriteText(edit_disk_size.left + edit_disk_size.width + 8, 9, 0x80, system.color.work_text, "MB.");
139
			WriteText(edit_disk_size.left + edit_disk_size.width + 12, 6, 0x90, system.color.work_text, "MB.");
-
 
140
			edit_box_draw stdcall (#edit_disk_size);
142
			edit_box_draw stdcall (#edit_disk_size);
141
			EditBox(#edit_disk_size);
143
			for (i=0, x=6; i<2; i++, x+=strlen(but_text[i])*6+37)
142
			for (i=0, x=6; i<2; i++, x+=strlen(but_text[i])*6+37)
144
			{
143
			{
145
				DefineButton(x,25, strlen(but_text[i])*6+28,19, 10+i, system.color.work_button);
144
				DefineButton(x,29, strlen(but_text[i])*6+28,19, 10+i, system.color.work_button);
146
				_PutImage(x+3,28,  14,14,   i*14*14*3+#icons);
145
				_PutImage(x+3,32,  14,14,   i*14*14*3+#icons);
147
				WriteText(x+22,31, 0x80, system.color.work_button_text, but_text[i]);
146
				WriteText(x+22,35, 0x80, system.color.work_button_text, but_text[i]);
148
			}		
147
			}		
149
			GetDisks();
148
			GetDisks();
150
			DrawTmpDisks();
149
			DrawTmpDisks();
151
		}
150
		}
Line 206... Line 205...
206
{
205
{
207
	char free_ram_text[60];
206
	char free_ram_text[60];
208
	byte i, real_id;
207
	byte i, real_id;
209
	int FreeRAM=GetFreeRAM()/1024;
208
	int FreeRAM=GetFreeRAM()/1024;
Line 210... Line 209...
210
 
209
 
211
	DrawBar(0,51, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF);
210
	DrawBar(0,TOPPANELH+1, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF);
212
	DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, system.color.work_graph);
211
	DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, system.color.work_graph);
213
	DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, system.color.work);
212
	DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, system.color.work);
214
	strcpy(#free_ram_text, FREE_RAM_TEXT);
213
	strcpy(#free_ram_text, FREE_RAM_TEXT);
215
	strcat(#free_ram_text, itoa(FreeRAM));
214
	strcat(#free_ram_text, itoa(FreeRAM));