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