Rev 5487 | Rev 5513 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5487 | Rev 5510 | ||
---|---|---|---|
Line 71... | Line 71... | ||
71 | } |
71 | } |
72 | } |
72 | } |
73 | } |
73 | } |
74 | } |
74 | } |
Line -... | Line 75... | ||
- | 75 | ||
- | 76 | void GetSizeMoreFiles(dword way) |
|
- | 77 | { |
|
- | 78 | int all_file_count, all_dir_count, all_size; |
|
- | 79 | char cur_file[4096]; |
|
- | 80 | dword selected_offset2; |
|
- | 81 | ||
- | 82 | all_file_count = 0; |
|
- | 83 | all_dir_count = 0; |
|
- | 84 | all_size = 0; |
|
- | 85 | ||
- | 86 | for (i=0; i |
|
- | 87 | { |
|
- | 88 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
|
- | 89 | if (ESBYTE[selected_offset2]) { |
|
- | 90 | strcpy(#cur_file, way); |
|
- | 91 | strcat(#cur_file, file_mas[i]*304+buf+72); |
|
- | 92 | ||
- | 93 | GetFileInfo(#cur_file, #file_info_general); |
|
- | 94 | if ( file_info_general.isfolder ) |
|
- | 95 | { |
|
- | 96 | GetSizeDir(#cur_file); |
|
- | 97 | all_file_count = all_file_count + file_count; |
|
- | 98 | all_dir_count = all_dir_count + dir_count +1; |
|
- | 99 | all_size = all_size + size_dir; |
|
- | 100 | } |
|
- | 101 | else |
|
- | 102 | { |
|
- | 103 | all_file_count++; |
|
- | 104 | all_size = all_size + file_info_general.sizelo; |
|
- | 105 | } |
|
- | 106 | } |
|
- | 107 | } |
|
- | 108 | file_count = all_file_count; |
|
- | 109 | dir_count = all_dir_count; |
|
- | 110 | size_dir = all_size; |
|
- | 111 | } |
|
75 | 112 | ||
76 | void properties_dialog() |
113 | void properties_dialog() |
77 | { |
114 | { |
78 | byte id; |
115 | byte id; |
79 | byte key; |
116 | byte key; |
80 | dword file_name_off; |
117 | dword file_name_off; |
- | 118 | dword element_size; |
|
- | 119 | dword selected_offset2; |
|
81 | dword element_size; |
120 | int cont = 0; |
82 | char element_size_label[32]; |
121 | char element_size_label[32]; |
Line 83... | Line 122... | ||
83 | proc_info settings_form; |
122 | proc_info settings_form; |
84 | 123 | ||
85 | strcpy(#folder_info, "\0"); |
124 | strcpy(#folder_info, "\0"); |
86 | file_count = 0; |
125 | file_count = 0; |
- | 126 | dir_count = 0; |
|
- | 127 | size_dir = 0; |
|
- | 128 | ||
- | 129 | for (i=0; i |
|
- | 130 | { |
|
- | 131 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
|
- | 132 | if (ESBYTE[selected_offset2]) cont++; |
|
- | 133 | } |
|
- | 134 | ||
- | 135 | if (cont) GetSizeMoreFiles(#path); |
|
87 | dir_count = 0; |
136 | else |
88 | size_dir = 0; |
137 | { |
89 | GetFileInfo(#file_path, #file_info_general); |
138 | GetFileInfo(#file_path, #file_info_general); |
- | 139 | strcpy(#file_name2, #file_name); |
|
- | 140 | file_name_ed.size = strlen(#file_name2); |
|
90 | strcpy(#file_name2, #file_name); |
141 | if (itdir) GetSizeDir(#file_path); |
91 | file_name_ed.size = strlen(#file_name2); |
142 | } |
Line 92... | Line -... | ||
92 | strcpy(#path_to_file, #path); |
- | |
93 | path_to_file_ed.size = strlen(#path_to_file); |
- | |
94 | 143 | strcpy(#path_to_file, #path); |
|
95 | if (itdir) GetSizeDir(#file_path); |
144 | path_to_file_ed.size = strlen(#path_to_file); |
96 | 145 | ||
97 | SetEventMask(0x27); |
146 | SetEventMask(0x27); |
98 | loop() switch(WaitEvent()) |
147 | loop() switch(WaitEvent()) |
Line 118... | Line 167... | ||
118 | case evReDraw: |
167 | case evReDraw: |
119 | DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE_PROPERTIES); |
168 | DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE_PROPERTIES); |
120 | GetProcessInfo(#settings_form, SelfInfo); |
169 | GetProcessInfo(#settings_form, SelfInfo); |
121 | DrawFlatButton(settings_form.cwidth - 70 - 13, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE); |
170 | DrawFlatButton(settings_form.cwidth - 70 - 13, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE); |
122 | DrawBar(10, 10, 32, 32, 0xFFFfff); |
171 | DrawBar(10, 10, 32, 32, 0xFFFfff); |
- | 172 | ||
- | 173 | WriteText(10, 50, 0x80, 0x000000, PR_T_DEST); |
|
- | 174 | edit_box_draw stdcall (#path_to_file_ed); |
|
- | 175 | ||
- | 176 | WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE); |
|
- | 177 | ||
- | 178 | if (cont) |
|
- | 179 | { |
|
- | 180 | Put_icon('', 18, 20, 0xFFFfff, 0); |
|
- | 181 | strcpy(#folder_info, SET_6); |
|
- | 182 | strcat(#folder_info, itoa(file_count)); |
|
- | 183 | strcat(#folder_info, SET_7); |
|
- | 184 | strcat(#folder_info, itoa(dir_count)); |
|
- | 185 | WriteText(50, 23, 0x80, 0x000000, #folder_info); |
|
- | 186 | EAX = ConvertSize(size_dir); |
|
- | 187 | strcpy(#element_size_label, EAX); |
|
- | 188 | strcat(#element_size_label, " ("); |
|
- | 189 | strcat(#element_size_label, itoa(size_dir)); |
|
- | 190 | strcat(#element_size_label, " b)"); |
|
- | 191 | WriteText(100, 65, 0x80, 0x000000, #element_size_label); |
|
- | 192 | } |
|
- | 193 | else |
|
- | 194 | { |
|
123 | if ( file_info_general.isfolder ) |
195 | if ( file_info_general.isfolder ) |
124 | Put_icon(" |
196 | Put_icon(" |
125 | else |
197 | else |
126 | Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 20, 0xFFFfff, 0); |
198 | Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 20, 0xFFFfff, 0); |
Line 127... | Line 199... | ||
127 | 199 | ||
128 | WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); |
200 | WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); |
Line 129... | Line -... | ||
129 | edit_box_draw stdcall (#file_name_ed); |
- | |
130 | - | ||
131 | WriteText(10, 50, 0x80, 0x000000, PR_T_DEST); |
- | |
132 | edit_box_draw stdcall (#path_to_file_ed); |
- | |
133 | 201 | edit_box_draw stdcall (#file_name_ed); |
|
134 | WriteText(10, 65, 0x80, 0x000000, PR_T_SIZE); |
202 | |
135 | if (!itdir) |
203 | if (!itdir) |
136 | { |
204 | { |
137 | element_size = file_info_general.sizelo; |
205 | element_size = file_info_general.sizelo; |
Line 168... | Line 236... | ||
168 | frame_draw stdcall (#flags_frame); |
236 | frame_draw stdcall (#flags_frame); |
Line 169... | Line 237... | ||
169 | 237 | ||
170 | DrawPropertiesCheckBoxes(); |
238 | DrawPropertiesCheckBoxes(); |
171 | } |
239 | } |
- | 240 | } |
|
Line 172... | Line 241... | ||
172 | } |
241 | } |
173 | 242 | ||
174 | void DrawPropertiesCheckBoxes() |
243 | void DrawPropertiesCheckBoxes() |
175 | { |
244 | { |