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)-2,#file_name2,NULL, 0b,2,2}; edit_box path_to_file_ed = {160,120,79,0xffffff,0x94AECE,0xFFFfff,0xffffff,2,sizeof(path_to_file)-2,#path_to_file,NULL, 0b,2,2}; BDVK file_info_general; BDVK file_info_dirsize; bool apply_question_active; DIR_SIZE more_files_count; DIR_SIZE dir_size; checkbox ch_read_only = { PR_T_ONLY_READ, NULL }; checkbox ch_hidden = { PR_T_HIDDEN, NULL }; checkbox ch_system = { PR_T_SYSTEM, NULL }; void SetPropertiesFile(dword cur_file, bdvk_pointer) { GetFileInfo(cur_file, bdvk_pointer); ESI = bdvk_pointer; ESI.BDVK.readonly = ch_read_only.checked; ESI.BDVK.hidden = ch_hidden.checked; ESI.BDVK.system = ch_system.checked; SetFileInfo(cur_file, bdvk_pointer); } 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"); sprintf(#folder_info,"%s%d%s%d",SET_6,more_files_count.files,SET_7,more_files_count.folders); WriteText(file_name_ed.left+4, 30, 0x90, sc.work_text, #folder_info); sprintf(#element_size_label,"%s (%d %s)",ConvertSize64(more_files_count.bytes, NULL),more_files_count.bytes,SET_BYTE_LANG); WriteText(120, 97, 0x90, sc.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, sc.work_text, PR_T_NAME); DrawEditBox(#file_name_ed); if (!itdir) element_size = file_info_general.sizelo; else { WriteText(10,116, 0x90, sc.work_text, PR_T_CONTAINS); sprintf(#folder_info,"%s%d%s%d",SET_6,dir_size.files,SET_7,dir_size.folders); WriteText(120, 116, 0x90, sc.work_text, #folder_info); element_size = dir_size.bytes; } WriteTextLines(10, 136, 0x90, sc.work_text, CREATED_OPENED_MODIFIED, 20); DrawDate(120, 136, sc.work_text, #file_info_general.datecreate); DrawDate(120, 156, sc.work_text, #file_info_general.datelastaccess); DrawDate(120, 176, sc.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, sc.work_text, #element_size_label); } DrawFrame(10, 212, -10*2 + pform.cwidth - 2, 92, FLAGS); y.n = 212; //212 => attributes_frame.y ch_read_only.draw(24, y.inc(18)); ch_hidden.draw(24, y.inc(24)); ch_system.draw(24, y.inc(24)); if (apply_question_active) ShowConfirmQuestionPopin(); } 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, -icon_size/2+28, -icon_size/2+38, 0xFFFfff); } void EventApplyProperties() { if (getSelectedCount()) || (itdir) { ShowConfirmQuestionPopin(); } else { SetProperties(SET_PROPERTIES_SINGLE_FILE); } }