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