#ifdef LANG_RUS ?define WINDOW_TITLE_PROPERTIES "Свойства" ?define BTN_CLOSE "Закрыть" ?define BTN_APPLY "Применить" ?define QUEST_1 "Применить ко всем вложенным" ?define QUEST_2 "файлам и папкам?" ?define PR_T_NAME "Имя:" ?define PR_T_DEST "Расположение:" ?define PR_T_SIZE "Размер:" ?define CREATED_OPENED_MODIFIED "Создан:\nОткрыт:\nИзменен:" ?define SET_6 "Файлов: " ?define SET_7 " Папок: " ?define PR_T_CONTAINS "Содержит: " ?define FLAGS " Аттрибуты " ?define PR_T_HIDDEN "Скрытый" ?define PR_T_SYSTEM "Системный" ?define PR_T_ONLY_READ "Только чтение" ?define SET_BYTE_LANG "байт" #else // Apply to all subfolders ?define WINDOW_TITLE_PROPERTIES "Properties" ?define BTN_CLOSE "Close" ?define BTN_APPLY "Apply" ?define QUEST_1 "Apply to all subfolders" ?define QUEST_2 "files and Folders?" ?define PR_T_NAME "Name:" ?define PR_T_DEST "Destination:" ?define PR_T_SIZE "Size:" ?define CREATED_OPENED_MODIFIED "Created:\nOpened:\nModified:" ?define SET_6 "Files: " ?define SET_7 " Folders: " ?define PR_T_CONTAINS "Contains: " ?define FLAGS " Attributes " ?define PR_T_HIDDEN "Hidden" ?define PR_T_SYSTEM "System" ?define PR_T_ONLY_READ "Read-only" ?define SET_BYTE_LANG "byte" #endif dword mouse_2; char path_to_file[4096]; char file_name2[4096]; edit_box file_name_ed = {230,59,32,0xffffff,0x94AECE,0xFFFfff,0xffffff,0x10000000,sizeof(file_name2),#file_name2,#mouse_2, 1000000000000000b,2,2}; edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file),#path_to_file,#mouse_2, 1000000000000000b,2,2}; int file_count, dir_count, size_dir; char folder_info[200]; dword element_size; char element_size_label[32]; BDVK file_info_general; BDVK file_info_dirsize; proc_info settings_form; bool quest_active, atr_readonly, atr_hidden, atr_system; void SetPropertiesDir(dword way) { dword dirbuf, fcount, i, filename; dword cur_file; if (dir_exists(way)) { cur_file = malloc(4096); GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); for (i=0; i was a bug !!! But unfortunately pass away to sacrifice speed. GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); for (i=0; i"); sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); WriteText(file_name_ed.left+4, 30, 0x90, system.color.work_text, #folder_info); sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(size_dir, NULL),size_dir,SET_BYTE_LANG); WriteText(120, 97, 0x90, system.color.work_text, #element_size_label); } else { if ( file_info_general.isfolder ) PropertiesDrawIcon(NULL, ""); else { sprintf(#temp_path,"%s/%s",#path,#file_name2); ext1 = strrchr(#file_name2,'.'); if (ext1) ext1 += #file_name2; PropertiesDrawIcon(#temp_path, ext1); } WriteText(file_name_ed.left, file_name_ed.top-15, 0x80, system.color.work_text, PR_T_NAME); DrawEditBox(#file_name_ed); if (!itdir) element_size = file_info_general.sizelo; else { WriteText(10,116, 0x90, system.color.work_text, PR_T_CONTAINS); sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); WriteText(120, 116, 0x90, system.color.work_text, #folder_info); element_size = size_dir; } WriteTextLines(10, 136, 0x90, system.color.work_text, CREATED_OPENED_MODIFIED, 20); DrawDate(120, 136, system.color.work_text, #file_info_general.datecreate); DrawDate(120, 156, system.color.work_text, #file_info_general.datelastaccess); DrawDate(120, 176, system.color.work_text, #file_info_general.datelastedit); sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(element_size, NULL),element_size,SET_BYTE_LANG); WriteText(120, 99, 0x90, system.color.work_text, #element_size_label); } DrawFrame(10, 212, -10*2 + settings_form.cwidth - 2, 92, FLAGS); DrawPropertiesCheckBoxes(); } void PropertiesDrawIcon(dword file_path, extension) { #define ICON_PADDING 11 DrawBar(20-ICON_PADDING, 30-ICON_PADDING-1, ICON_PADDING*2+16, ICON_PADDING*2+16, 0xFFFfff); DrawIconByExtension(file_path, extension, 20, 30, system.color.work_light); } void DrawPropertiesCheckBoxes() { incn y; y.n = 212; //212 => attributes_frame.y CheckBox(24, y.inc(18), 20, PR_T_ONLY_READ, atr_readonly); CheckBox(24, y.inc(24), 21, PR_T_HIDDEN, atr_hidden); CheckBox(24, y.inc(24), 22, PR_T_SYSTEM, atr_system); }