Rev 5702 | Rev 5833 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5702 | Rev 5707 | ||
---|---|---|---|
1 | #ifdef LANG_RUS |
1 | #ifdef LANG_RUS |
2 | ?define WINDOW_TITLE_PROPERTIES "¢®©á⢠" |
2 | ?define WINDOW_TITLE_PROPERTIES "¢®©á⢠" |
3 | ?define BTN_CLOSE " ªàëâì" |
3 | ?define BTN_CLOSE " ªàëâì" |
4 | ?define BTN_APPLY "ਬ¥¨âì" |
4 | ?define BTN_APPLY "ਬ¥¨âì" |
5 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
5 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
6 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬" |
6 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬" |
7 | ?define PR_T_NAME "•:" |
7 | ?define PR_T_NAME "•:" |
8 | ?define PR_T_DEST " ᯮ«®¦¥¨¥:" |
8 | ?define PR_T_DEST " ᯮ«®¦¥¨¥:" |
9 | ?define PR_T_SIZE " §¬¥à:" |
9 | ?define PR_T_SIZE " §¬¥à:" |
10 | ?define SET_3 "®§¤ :" |
10 | ?define SET_3 "®§¤ :" |
11 | ?define SET_4 "âªàëâ:" |
11 | ?define SET_4 "âªàëâ:" |
12 | ?define SET_5 "§¬¥¥:" |
12 | ?define SET_5 "§¬¥¥:" |
13 | ?define SET_6 " ©«®¢: " |
13 | ?define SET_6 " ©«®¢: " |
14 | ?define SET_7 " ¯®ª: " |
14 | ?define SET_7 " ¯®ª: " |
15 | ?define PR_T_CONTAINS "®¤¥à¦¨â: " |
15 | ?define PR_T_CONTAINS "®¤¥à¦¨â: " |
16 | ?define FLAGS " ââਡãâë " |
16 | ?define FLAGS " ââਡãâë " |
17 | ?define PR_T_HIDDEN "ªàëâë©" |
17 | ?define PR_T_HIDDEN "ªàëâë©" |
18 | ?define PR_T_SYSTEM "¨á⥬ë©" |
18 | ?define PR_T_SYSTEM "¨á⥬ë©" |
19 | ?define PR_T_ONLY_READ "®«ìª® ç⥨¥" |
19 | ?define PR_T_ONLY_READ "®«ìª® ç⥨¥" |
20 | ?define SET_BYTE_LANG "¡ ©â" |
20 | ?define SET_BYTE_LANG "¡ ©â" |
21 | #else |
21 | #else |
22 | ?define WINDOW_TITLE_PROPERTIES "Properties" |
22 | ?define WINDOW_TITLE_PROPERTIES "Properties" |
23 | ?define BTN_CLOSE "Close" |
23 | ?define BTN_CLOSE "Close" |
24 | ?define BTN_APPLY "Apply" |
24 | ?define BTN_APPLY "Apply" |
25 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
25 | ?define QUEST_1 "ਬ¥¨âì ª® ¢á¥¬ ¢«®¦¥ë¬" |
26 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬" |
26 | ?define QUEST_2 "ä ©« ¬ ¨ ¯ ¯ª ¬" |
27 | ?define PR_T_NAME "Name:" |
27 | ?define PR_T_NAME "Name:" |
28 | ?define PR_T_DEST "Destination:" |
28 | ?define PR_T_DEST "Destination:" |
29 | ?define PR_T_SIZE "Size:" |
29 | ?define PR_T_SIZE "Size:" |
30 | ?define SET_3 "Created:" |
30 | ?define SET_3 "Created:" |
31 | ?define SET_4 "Opened:" |
31 | ?define SET_4 "Opened:" |
32 | ?define SET_5 "Modified:" |
32 | ?define SET_5 "Modified:" |
33 | ?define SET_6 "Files: " |
33 | ?define SET_6 "Files: " |
34 | ?define SET_7 " Folders: " |
34 | ?define SET_7 " Folders: " |
35 | ?define PR_T_CONTAINS "Contains: " |
35 | ?define PR_T_CONTAINS "Contains: " |
36 | ?define FLAGS " Attributes " |
36 | ?define FLAGS " Attributes " |
37 | ?define PR_T_HIDDEN "Hidden" |
37 | ?define PR_T_HIDDEN "Hidden" |
38 | ?define PR_T_SYSTEM "System" |
38 | ?define PR_T_SYSTEM "System" |
39 | ?define PR_T_ONLY_READ "Read-only" |
39 | ?define PR_T_ONLY_READ "Read-only" |
40 | ?define SET_BYTE_LANG "byte" |
40 | ?define SET_BYTE_LANG "byte" |
41 | #endif |
41 | #endif |
42 | 42 | ||
43 | dword mouse_ddd2; |
43 | dword mouse_ddd2; |
44 | char path_to_file[4096]="\0"; |
44 | char path_to_file[4096]="\0"; |
45 | char file_name2[4096]="\0"; |
45 | char file_name2[4096]="\0"; |
46 | edit_box file_name_ed = {195,50,25,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2}; |
46 | edit_box file_name_ed = {195,50,25,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#file_name2,#mouse_ddd2, 1000000000000000b,2,2}; |
47 | edit_box path_to_file_ed = {145,100,46,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2}; |
47 | edit_box path_to_file_ed = {145,100,46,0xffffff,0x94AECE,0x000000,0xffffff,2,4098,#path_to_file,#mouse_ddd2, 1000000000000000b,2,2}; |
48 | frame flags_frame = { 0, 280, 10, 83, 151, 0x000111, 0xFFFfff, 1, FLAGS, 0, 0, 6, 0x000111, 0xFFFFFF }; |
48 | frame flags_frame = { 0, 280, 10, 83, 151, 0x000111, 0xFFFfff, 1, FLAGS, 0, 0, 6, 0x000111, 0xFFFFFF }; |
49 | 49 | ||
50 | int file_count, dir_count, size_dir; |
50 | int file_count, dir_count, size_dir; |
51 | char folder_info[200]; |
51 | char folder_info[200]; |
52 | dword element_size; |
52 | dword element_size; |
53 | char element_size_label[32]; |
53 | char element_size_label[32]; |
54 | BDVK file_info_general; |
54 | BDVK file_info_general; |
55 | BDVK file_info_dirsize; |
55 | BDVK file_info_dirsize; |
56 | 56 | ||
57 | proc_info settings_form; |
57 | proc_info settings_form; |
58 | byte quest_active, atr_readonly, atr_hidden, atr_system; |
58 | byte quest_active, atr_readonly, atr_hidden, atr_system; |
59 | 59 | ||
60 | void SetPropertiesDir(dword way) |
60 | void SetPropertiesDir(dword way) |
61 | { |
61 | { |
62 | dword dirbuf, fcount, i, filename; |
62 | dword dirbuf, fcount, i, filename; |
63 | dword cur_file; |
63 | dword cur_file; |
64 | if (isdir(way)) |
64 | if (isdir(way)) |
65 | { |
65 | { |
66 | cur_file = malloc(4096); |
66 | cur_file = malloc(4096); |
67 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
67 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
68 | for (i=0; i |
68 | for (i=0; i |
69 | { |
69 | { |
70 | filename = i*304+dirbuf+72; |
70 | filename = i*304+dirbuf+72; |
71 | strcpy(cur_file, way); |
71 | strcpy(cur_file, way); |
72 | chrcat(cur_file, '/'); |
72 | chrcat(cur_file, '/'); |
73 | strcat(cur_file, filename); |
73 | strcat(cur_file, filename); |
74 | if ( TestBit(ESDWORD[filename-40], 4) ) |
74 | if ( TestBit(ESDWORD[filename-40], 4) ) |
75 | { |
75 | { |
76 | SetPropertiesDir(cur_file); |
76 | SetPropertiesDir(cur_file); |
77 | } |
77 | } |
78 | GetFileInfo(cur_file, #file_info_dirsize); |
78 | GetFileInfo(cur_file, #file_info_dirsize); |
79 | file_info_dirsize.readonly = atr_readonly; |
79 | file_info_dirsize.readonly = atr_readonly; |
80 | file_info_dirsize.hidden = atr_hidden; |
80 | file_info_dirsize.hidden = atr_hidden; |
81 | file_info_dirsize.system = atr_system; |
81 | file_info_dirsize.system = atr_system; |
82 | SetFileInfo(cur_file, #file_info_dirsize); |
82 | SetFileInfo(cur_file, #file_info_dirsize); |
83 | } |
83 | } |
84 | free(cur_file); |
84 | free(cur_file); |
85 | } |
85 | } |
86 | } |
86 | } |
87 | 87 | ||
88 | void SetProperties(byte prop) |
88 | void SetProperties(byte prop) |
89 | { |
89 | { |
90 | dword cur_file; |
90 | dword cur_file; |
91 | dword selected_offset2; |
91 | dword selected_offset2; |
92 | 92 | ||
93 | if (prop==1) || (prop==2) |
93 | if (prop==1) || (prop==2) |
94 | { |
94 | { |
95 | if (selected_count) |
95 | if (selected_count) |
96 | { |
96 | { |
97 | cur_file = malloc(4096); |
97 | cur_file = malloc(4096); |
98 | for (i=0; i |
98 | for (i=0; i |
99 | { |
99 | { |
100 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
100 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
101 | if (ESBYTE[selected_offset2]) |
101 | if (ESBYTE[selected_offset2]) |
102 | { |
102 | { |
103 | strcpy(cur_file, #path); |
103 | strcpy(cur_file, #path); |
104 | strcat(cur_file, file_mas[i]*304+buf+72); |
104 | strcat(cur_file, file_mas[i]*304+buf+72); |
105 | GetFileInfo(cur_file, #file_info_general); |
105 | GetFileInfo(cur_file, #file_info_general); |
106 | file_info_general.readonly = atr_readonly; |
106 | file_info_general.readonly = atr_readonly; |
107 | file_info_general.hidden = atr_hidden; |
107 | file_info_general.hidden = atr_hidden; |
108 | file_info_general.system = atr_system; |
108 | file_info_general.system = atr_system; |
109 | SetFileInfo(cur_file, #file_info_general); |
109 | SetFileInfo(cur_file, #file_info_general); |
110 | if (prop==2) |
110 | if (prop==2) |
111 | { |
111 | { |
112 | if (isdir(cur_file)) |
112 | if (isdir(cur_file)) |
113 | { |
113 | { |
114 | SetPropertiesDir(cur_file); |
114 | SetPropertiesDir(cur_file); |
115 | } |
115 | } |
116 | } |
116 | } |
117 | } |
117 | } |
118 | } |
118 | } |
119 | free(cur_file); |
119 | free(cur_file); |
120 | } |
120 | } |
121 | else |
121 | else |
122 | { |
122 | { |
123 | GetFileInfo(#file_path, #file_info_general); |
123 | GetFileInfo(#file_path, #file_info_general); |
124 | file_info_general.readonly = atr_readonly; |
124 | file_info_general.readonly = atr_readonly; |
125 | file_info_general.hidden = atr_hidden; |
125 | file_info_general.hidden = atr_hidden; |
126 | file_info_general.system = atr_system; |
126 | file_info_general.system = atr_system; |
127 | SetFileInfo(#file_path, #file_info_general); |
127 | SetFileInfo(#file_path, #file_info_general); |
128 | if (prop==2) SetPropertiesDir(#file_path); |
128 | if (prop==2) SetPropertiesDir(#file_path); |
129 | } |
129 | } |
130 | quest_active = 0; |
130 | quest_active = 0; |
131 | DrawPropertiesWindow(); |
131 | DrawPropertiesWindow(); |
132 | } |
132 | } |
133 | else |
133 | else |
134 | { |
134 | { |
135 | GetFileInfo(#file_path, #file_info_general); |
135 | GetFileInfo(#file_path, #file_info_general); |
136 | file_info_general.readonly = atr_readonly; |
136 | file_info_general.readonly = atr_readonly; |
137 | file_info_general.hidden = atr_hidden; |
137 | file_info_general.hidden = atr_hidden; |
138 | file_info_general.system = atr_system; |
138 | file_info_general.system = atr_system; |
139 | SetFileInfo(#file_path, #file_info_general); |
139 | SetFileInfo(#file_path, #file_info_general); |
140 | } |
140 | } |
141 | cmd_free=3; |
141 | cmd_free=3; |
142 | _not_draw = true; |
142 | _not_draw = true; |
143 | Open_Dir(#path,WITH_REDRAW); |
143 | Open_Dir(#path,WITH_REDRAW); |
144 | _not_draw = false; |
144 | _not_draw = false; |
145 | EventRedrawWindow(Form.left,Form.top); |
145 | EventRedrawWindow(Form.left,Form.top); |
146 | ExitProcess(); |
146 | ExitProcess(); |
147 | } |
147 | } |
148 | 148 | ||
149 | void Quest() |
149 | void Quest() |
150 | { |
150 | { |
151 | DrawPopup(30,80,200,90,1,system.color.work, system.color.work_graph); |
151 | DrawPopup(30,80,200,90,1,system.color.work, system.color.work_graph); |
152 | WriteText(50, 100, 0x80, 0x000000, QUEST_1); |
152 | WriteText(50, 100, 0x80, 0x000000, QUEST_1); |
153 | WriteText(80, 115, 0x80, 0x000000, QUEST_2); |
153 | WriteText(80, 115, 0x80, 0x000000, QUEST_2); |
154 | DrawFlatButton(52,138,70,20,301,0xFFB6B5,T_YES); |
154 | DrawFlatButton(52,138,70,20,301,0xFFB6B5,T_YES); |
155 | DrawFlatButton(145,138,70,20,302,0xC6DFC6,T_NO); |
155 | DrawFlatButton(145,138,70,20,302,0xC6DFC6,T_NO); |
156 | } |
156 | } |
157 | 157 | ||
158 | void GetSizeDir(dword way) |
158 | void GetSizeDir(dword way) |
159 | { |
159 | { |
160 | dword dirbuf, fcount, i, filename; |
160 | dword dirbuf, fcount, i, filename; |
161 | dword cur_file; |
161 | dword cur_file; |
162 | if (isdir(way)) |
162 | if (isdir(way)) |
163 | { |
163 | { |
164 | cur_file = malloc(4096); |
164 | cur_file = malloc(4096); |
165 | // In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |
165 | // In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |
166 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
166 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
167 | for (i=0; i |
167 | for (i=0; i |
168 | { |
168 | { |
169 | filename = i*304+dirbuf+72; |
169 | filename = i*304+dirbuf+72; |
170 | sprintf(cur_file,"%s/%s",way,filename); |
170 | sprintf(cur_file,"%s/%s",way,filename); |
171 | 171 | ||
172 | if (TestBit(ESDWORD[filename-40], 4) ) |
172 | if (TestBit(ESDWORD[filename-40], 4) ) |
173 | { |
173 | { |
174 | dir_count++; |
174 | dir_count++; |
175 | GetSizeDir(cur_file); |
175 | GetSizeDir(cur_file); |
176 | } |
176 | } |
177 | else |
177 | else |
178 | { |
178 | { |
179 | GetFileInfo(cur_file, #file_info_dirsize); |
179 | GetFileInfo(cur_file, #file_info_dirsize); |
180 | size_dir += file_info_dirsize.sizelo; |
180 | size_dir += file_info_dirsize.sizelo; |
181 | file_count++; |
181 | file_count++; |
182 | } |
182 | } |
183 | } |
183 | } |
184 | free(cur_file); |
184 | free(cur_file); |
185 | } |
185 | } |
186 | } |
186 | } |
187 | 187 | ||
188 | void GetSizeMoreFiles(dword way) |
188 | void GetSizeMoreFiles(dword way) |
189 | { |
189 | { |
190 | char cur_file[4096]; |
190 | char cur_file[4096]; |
191 | dword selected_offset2; |
191 | dword selected_offset2; |
192 | 192 | ||
193 | for (i=0; i |
193 | for (i=0; i |
194 | { |
194 | { |
195 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
195 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
196 | if (ESBYTE[selected_offset2]) { |
196 | if (ESBYTE[selected_offset2]) { |
197 | sprintf(#cur_file,"%s%s",way,file_mas[i]*304+buf+72); |
197 | sprintf(#cur_file,"%s%s",way,file_mas[i]*304+buf+72); |
198 | if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) ) |
198 | if (TestBit(ESDWORD[file_mas[i]*304+buf+32], 4) ) |
199 | { |
199 | { |
200 | debugln(#cur_file); |
200 | debugln(#cur_file); |
201 | GetSizeDir(#cur_file); |
201 | GetSizeDir(#cur_file); |
202 | dir_count++; |
202 | dir_count++; |
203 | } |
203 | } |
204 | else |
204 | else |
205 | { |
205 | { |
206 | GetFileInfo(#cur_file, #file_info_dirsize); |
206 | GetFileInfo(#cur_file, #file_info_dirsize); |
207 | size_dir += file_info_dirsize.sizelo; |
207 | size_dir += file_info_dirsize.sizelo; |
208 | file_count++; |
208 | file_count++; |
209 | } |
209 | } |
210 | } |
210 | } |
211 | } |
211 | } |
212 | } |
212 | } |
213 | 213 | ||
214 | void properties_dialog() |
214 | void properties_dialog() |
215 | { |
215 | { |
216 | byte id; |
216 | byte id; |
217 | byte key,key2; |
- | |
218 | dword file_name_off; |
217 | dword file_name_off; |
219 | dword selected_offset2; |
218 | dword selected_offset2; |
220 | 219 | ||
221 | DSBYTE[#folder_info]=0; |
220 | DSBYTE[#folder_info]=0; |
222 | file_count = 0; |
221 | file_count = 0; |
223 | dir_count = 0; |
222 | dir_count = 0; |
224 | size_dir = 0; |
223 | size_dir = 0; |
225 | 224 | ||
226 | if (selected_count) |
225 | if (selected_count) |
227 | { |
226 | { |
228 | GetSizeMoreFiles(#path); |
227 | GetSizeMoreFiles(#path); |
229 | debugi(size_dir); |
228 | debugi(size_dir); |
230 | atr_readonly = 0; |
229 | atr_readonly = 0; |
231 | atr_hidden = 0; |
230 | atr_hidden = 0; |
232 | atr_system = 0; |
231 | atr_system = 0; |
233 | } |
232 | } |
234 | else |
233 | else |
235 | { |
234 | { |
236 | GetFileInfo(#file_path, #file_info_general); |
235 | GetFileInfo(#file_path, #file_info_general); |
237 | strcpy(#file_name2, #file_name); |
236 | strcpy(#file_name2, #file_name); |
238 | file_name_ed.size = strlen(#file_name2); |
237 | file_name_ed.size = strlen(#file_name2); |
239 | if(itdir) GetSizeDir(#file_path); |
238 | if(itdir) GetSizeDir(#file_path); |
240 | atr_readonly = file_info_general.readonly; |
239 | atr_readonly = file_info_general.readonly; |
241 | atr_hidden = file_info_general.hidden; |
240 | atr_hidden = file_info_general.hidden; |
242 | atr_system = file_info_general.system; |
241 | atr_system = file_info_general.system; |
243 | } |
242 | } |
244 | strcpy(#path_to_file, #path); |
243 | strcpy(#path_to_file, #path); |
245 | path_to_file_ed.size = strlen(#path_to_file); |
244 | path_to_file_ed.size = strlen(#path_to_file); |
246 | 245 | ||
247 | SetEventMask(0x27); |
246 | SetEventMask(0x27); |
248 | loop() switch(WaitEvent()) |
247 | loop() switch(WaitEvent()) |
249 | { |
248 | { |
250 | case evButton: |
249 | case evButton: |
251 | id=GetButtonID(); |
250 | id=GetButtonID(); |
252 | if (quest_active) |
251 | if (quest_active) |
253 | { |
252 | { |
254 | IF (id==301) SetProperties(2); |
253 | IF (id==301) SetProperties(2); |
255 | IF (id==302) SetProperties(1); |
254 | IF (id==302) SetProperties(1); |
256 | break; |
255 | break; |
257 | } |
256 | } |
258 | if (id==1) || (id==10) |
257 | if (id==1) || (id==10) |
259 | { |
258 | { |
260 | cmd_free=3; |
259 | cmd_free=3; |
261 | ExitProcess(); |
260 | ExitProcess(); |
262 | } |
261 | } |
263 | IF (id==11) |
262 | IF (id==11) |
264 | { |
263 | { |
265 | if (selected_count) || (itdir) |
264 | if (selected_count) || (itdir) |
266 | { |
265 | { |
267 | quest_active = 1; |
266 | quest_active = 1; |
268 | Quest(); |
267 | Quest(); |
269 | } |
268 | } |
270 | else |
269 | else |
271 | { |
270 | { |
272 | SetProperties(0); |
271 | SetProperties(0); |
273 | } |
272 | } |
274 | break; |
273 | break; |
275 | } |
274 | } |
276 | if (id==20) atr_readonly ^= 1; |
275 | if (id==20) atr_readonly ^= 1; |
277 | if (id==21) atr_hidden ^= 1; |
276 | if (id==21) atr_hidden ^= 1; |
278 | if (id==22) atr_system ^= 1; |
277 | if (id==22) atr_system ^= 1; |
279 | DrawPropertiesCheckBoxes(); |
278 | DrawPropertiesCheckBoxes(); |
280 | break; |
279 | break; |
281 | 280 | ||
282 | case evMouse: |
281 | case evMouse: |
283 | edit_box_mouse stdcall (#file_name_ed); |
282 | edit_box_mouse stdcall (#file_name_ed); |
284 | edit_box_mouse stdcall (#path_to_file_ed); |
283 | edit_box_mouse stdcall (#path_to_file_ed); |
285 | break; |
284 | break; |
286 | 285 | ||
287 | case evKey: |
286 | case evKey: |
288 | GetFullKey(); |
287 | GetKeys(); |
289 | key = AH; |
- | |
290 | $shr eax,16 |
- | |
291 | key2 = AL; |
- | |
292 | 288 | ||
293 | if (quest_active) |
289 | if (quest_active) |
294 | { |
290 | { |
295 | IF (key2==SCAN_CODE_ENTER) SetProperties(2); |
291 | IF (key_scancode==SCAN_CODE_ENTER) SetProperties(2); |
296 | IF (key2==SCAN_CODE_ESC) SetProperties(1); |
292 | IF (key_scancode==SCAN_CODE_ESC) SetProperties(1); |
297 | break; |
293 | break; |
298 | } |
294 | } |
299 | if (key2==SCAN_CODE_ESC) |
295 | if (key_scancode==SCAN_CODE_ESC) |
300 | { |
296 | { |
301 | cmd_free=3; |
297 | cmd_free=3; |
302 | ExitProcess(); |
298 | ExitProcess(); |
303 | } |
299 | } |
304 | if (key2==SCAN_CODE_ENTER) |
300 | if (key_scancode==SCAN_CODE_ENTER) |
305 | { |
301 | { |
306 | if (selected_count) || (itdir) |
302 | if (selected_count) || (itdir) |
307 | { |
303 | { |
308 | quest_active = 1; |
304 | quest_active = 1; |
309 | Quest(); |
305 | Quest(); |
310 | } |
306 | } |
311 | else |
307 | else |
312 | { |
308 | { |
313 | SetProperties(0); |
309 | SetProperties(0); |
314 | } |
310 | } |
315 | break; |
311 | break; |
316 | } |
312 | } |
317 | EAX=key<<8; |
313 | EAX = key_ascii << 8; |
318 | edit_box_key stdcall(#file_name_ed); |
314 | edit_box_key stdcall(#file_name_ed); |
319 | edit_box_key stdcall(#path_to_file_ed); |
315 | edit_box_key stdcall(#path_to_file_ed); |
320 | break; |
316 | break; |
321 | 317 | ||
322 | case evReDraw: |
318 | case evReDraw: |
323 | DrawPropertiesWindow(); |
319 | DrawPropertiesWindow(); |
324 | } |
320 | } |
325 | } |
321 | } |
326 | 322 | ||
327 | void DrawPropertiesWindow() |
323 | void DrawPropertiesWindow() |
328 | { |
324 | { |
329 | DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,0xFFFFFF,WINDOW_TITLE_PROPERTIES); |
325 | DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,0xFFFFFF,WINDOW_TITLE_PROPERTIES); |
330 | GetProcessInfo(#settings_form, SelfInfo); |
326 | GetProcessInfo(#settings_form, SelfInfo); |
331 | DrawFlatButton(settings_form.cwidth - 70 - 13, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE); |
327 | DrawFlatButton(settings_form.cwidth - 70 - 13, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE); |
332 | DrawFlatButton(settings_form.cwidth - 150 - 13, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, BTN_APPLY); |
328 | DrawFlatButton(settings_form.cwidth - 150 - 13, settings_form.cheight - 34, 70, 22, 11, 0xE4DFE1, BTN_APPLY); |
333 | DrawBar(10, 10, 32, 32, 0xFFFfff); |
329 | DrawBar(10, 10, 32, 32, 0xFFFfff); |
334 | 330 | ||
335 | WriteText(10, 50, 0x80, 0x000000, PR_T_DEST); |
331 | WriteText(10, 50, 0x80, 0x000000, PR_T_DEST); |
336 | edit_box_draw stdcall (#path_to_file_ed); |
332 | edit_box_draw stdcall (#path_to_file_ed); |
337 | 333 | ||
338 | WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE); |
334 | WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE); |
339 | 335 | ||
340 | if (selected_count) |
336 | if (selected_count) |
341 | { |
337 | { |
342 | Put_icon('', 18, 19, 0xFFFfff, 0); |
338 | Put_icon('', 18, 19, 0xFFFfff, 0); |
343 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
339 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
344 | WriteText(50, 23, 0x80, 0x000000, #folder_info); |
340 | WriteText(50, 23, 0x80, 0x000000, #folder_info); |
345 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG); |
341 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(size_dir),size_dir,SET_BYTE_LANG); |
346 | WriteText(100, 65, 0x80, 0x000000, #element_size_label); |
342 | WriteText(100, 65, 0x80, 0x000000, #element_size_label); |
347 | } |
343 | } |
348 | else |
344 | else |
349 | { |
345 | { |
350 | if ( file_info_general.isfolder ) |
346 | if ( file_info_general.isfolder ) |
351 | Put_icon(" |
347 | Put_icon(" |
352 | else |
348 | else |
353 | Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 19, 0xFFFfff, 0); |
349 | Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 19, 0xFFFfff, 0); |
354 | 350 | ||
355 | WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); |
351 | WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); |
356 | edit_box_draw stdcall (#file_name_ed); |
352 | edit_box_draw stdcall (#file_name_ed); |
357 | 353 | ||
358 | if (!itdir) element_size = file_info_general.sizelo; |
354 | if (!itdir) element_size = file_info_general.sizelo; |
359 | else |
355 | else |
360 | { |
356 | { |
361 | WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS); |
357 | WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS); |
362 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
358 | sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); |
363 | WriteText(100, 80, 0x80, 0x000000, #folder_info); |
359 | WriteText(100, 80, 0x80, 0x000000, #folder_info); |
364 | element_size = size_dir; |
360 | element_size = size_dir; |
365 | } |
361 | } |
366 | WriteText(10, 95, 0x80, 0x000000, SET_3); |
362 | WriteText(10, 95, 0x80, 0x000000, SET_3); |
367 | WriteText(10, 110, 0x80, 0x000000, SET_4); |
363 | WriteText(10, 110, 0x80, 0x000000, SET_4); |
368 | WriteText(10, 125, 0x80, 0x000000, SET_5); |
364 | WriteText(10, 125, 0x80, 0x000000, SET_5); |
369 | DrawDate(100, 95, 0, #file_info_general.datecreate); |
365 | DrawDate(100, 95, 0, #file_info_general.datecreate); |
370 | DrawDate(100, 110, 0, #file_info_general.datelastaccess); |
366 | DrawDate(100, 110, 0, #file_info_general.datelastaccess); |
371 | DrawDate(100, 125, 0, #file_info_general.datelastedit); |
367 | DrawDate(100, 125, 0, #file_info_general.datelastedit); |
372 | 368 | ||
373 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(element_size),element_size,SET_BYTE_LANG); |
369 | sprintf(#element_size_label,"%s (%d %s)",ConvertSize(element_size),element_size,SET_BYTE_LANG); |
374 | WriteText(100, 65, 0x80, 0x000000, #element_size_label); |
370 | WriteText(100, 65, 0x80, 0x000000, #element_size_label); |
375 | } |
371 | } |
376 | flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; |
372 | flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; |
377 | flags_frame.font_color = system.color.work_text; |
373 | flags_frame.font_color = system.color.work_text; |
378 | flags_frame.ext_col = system.color.work_graph; |
374 | flags_frame.ext_col = system.color.work_graph; |
379 | frame_draw stdcall (#flags_frame); |
375 | frame_draw stdcall (#flags_frame); |
380 | DrawPropertiesCheckBoxes(); |
376 | DrawPropertiesCheckBoxes(); |
381 | } |
377 | } |
382 | 378 | ||
383 | void DrawPropertiesCheckBoxes() |
379 | void DrawPropertiesCheckBoxes() |
384 | { |
380 | { |
385 | CheckBox2(22, flags_frame.start_y + 14, 20, PR_T_ONLY_READ, atr_readonly); |
381 | CheckBox2(22, flags_frame.start_y + 14, 20, PR_T_ONLY_READ, atr_readonly); |
386 | CheckBox2(22, flags_frame.start_y + 36, 21, PR_T_HIDDEN, atr_hidden); |
382 | CheckBox2(22, flags_frame.start_y + 36, 21, PR_T_HIDDEN, atr_hidden); |
387 | CheckBox2(22, flags_frame.start_y + 58, 22, PR_T_SYSTEM, atr_system); |
383 | CheckBox2(22, flags_frame.start_y + 58, 22, PR_T_SYSTEM, atr_system); |
388 | }8; |
384 | }><> |
389 | ><8; |
- | |
390 | > |
- |