//--------------------------------------------------------------------------- #pragma hdrstop #include "STYCache.h" #include "define.h" //--------------------------------------------------------------------------- #pragma package(smart_init) //--------------------------------------------------------------------------- __fastcall TFileCache::TFileCache() { // TFileCache Ŭ·¡½ºÀÇ »ý¼ºÀÚ CurrentSTYFileList = new TList; TopWholeList = new TList; SilList = new TList; SleList = new TList; ColList = new TList; BottomWholeList = new TList; PantsList = new TList; BeltList = new TList; MaterialList = new TList; TopWholeStrList = new TStringList; SilStrList = new TStringList; SleStrList = new TStringList; ColStrList = new TStringList; BottomWholeStrList = new TStringList; PantsStrList = new TStringList; BeltStrList = new TStringList; MaterialStrList = new TStringList; } //--------------------------------------------------------------------------- __fastcall TFileCache::~TFileCache() { STYFILECACHELIST *SFCL = NULL; // TFileCache Ŭ·¡½ºÀÇ ¼Ò¸êÀÚ ClearCurList(CurrentSTYFileList); ClearCurList(TopWholeList); ClearCurList(SilList); ClearCurList(SleList); ClearCurList(ColList); ClearCurList(BottomWholeList); ClearCurList(PantsList); ClearCurList(BeltList); ClearCurList(MaterialList); delete CurrentSTYFileList; delete TopWholeList; delete SilList; delete SleList; delete ColList; delete BottomWholeList; delete PantsList; delete BeltList; delete MaterialList; delete TopWholeStrList; delete SilStrList; delete SleStrList; delete ColStrList; delete BottomWholeStrList; delete PantsStrList; delete BeltStrList; delete MaterialStrList; } //--------------------------------------------------------------------------- void __fastcall TFileCache::ClearCurList(TList *CurList) { STYFILECACHELIST *SFCL = NULL; // TFileCache Ŭ·¡½ºÀÇ ¼Ò¸êÀÚ for (int i = 0; i < CurList->Count; i++) { SFCL = (STYFILECACHELIST *)CurList->Items[i]; if (SFCL) delete SFCL; SFCL = NULL; } CurList->Clear(); } //--------------------------------------------------------------------------- void __fastcall TFileCache::ClearSTYList(ESort Style) { // °Ë»öµÈ ÆÄÀϵéÀÇ ÆÄÀÏ Á¤º¸¸¦ °¡Áö°í ÀÖ´Â STYFileListÀÇ ÃʱâÈ­ if (Style == -1 || Style == SO_TOPFULL) { ClearCurList(TopWholeList); } if (Style == -1 || Style == SO_SILHOUETTE) { ClearCurList(SilList); } if (Style == -1 || Style == SO_SLEEVE) { ClearCurList(SleList); } if (Style == -1 || Style == SO_COLLAR) { ClearCurList(ColList); } if (Style == -1 || Style == SO_BOTTOMFULL) { ClearCurList(BottomWholeList); } if (Style == -1 || Style == SO_PANTS) { ClearCurList(PantsList); } if (Style == -1 || Style == SO_BELT) { ClearCurList(BeltList); } if (Style == -1 || Style == SO_UPPERMATRIAL || Style == SO_LOWERMATRIAL) { ClearCurList(MaterialList); } } //--------------------------------------------------------------------------- void __fastcall TFileCache::ClearStrList(ESort Style) { // Á¶°Ç¿¡ µû¶ó °Ë»öµÈ ÆÄÀϵéÀÌ ÆÄÀϸíÀ» °¡Áö°í ÀÖ´Â StringList¸¦ ÃʱâÈ­ if (Style == -1 || Style == SO_TOPFULL) { TopWholeStrList->Clear(); } if (Style == -1 || Style == SO_SILHOUETTE) { SilStrList->Clear(); } if (Style == -1 || Style == SO_SLEEVE) { SleStrList->Clear(); } if (Style == -1 || Style == SO_COLLAR) { ColStrList->Clear(); } if (Style == -1 || Style == SO_BOTTOMFULL) { BottomWholeStrList->Clear(); } if (Style == -1 || Style == SO_PANTS) { PantsStrList->Clear(); } if (Style == -1 || Style == SO_BELT) { BeltStrList->Clear(); } if (Style == -1 || Style == SO_UPPERMATRIAL || Style == SO_LOWERMATRIAL) { MaterialStrList->Clear(); } } //--------------------------------------------------------------------------- void __fastcall TFileCache::MakeSTYFileList(String Path, bool bReculsive, bool bIncludeHeader) { // ÆÄÀÏ Á¤º¸¸¦ °¡Áö°í ÀÖ´Â STYFileList¸¦ »ý¼º HANDLE hFile = INVALID_HANDLE_VALUE; DWORD dwRead; STYLEDATAFILEHEADER header; int Version; STYFILECACHELIST *SFCL = NULL; try { if (String(Path.LastChar()) != L"\\") Path += "\\"; String fpath; TSearchRec sr; int Found = FindFirst(Path + "*.*", faAnyFile, sr); while (Found == 0) { fpath = Path + sr.Name; if (*sr.Name.c_str() != '.') { if (DirectoryExists(fpath)) { // µð·ºÅ丮 - ¼ø¼­´ë·Î ³ÖÀº°ÇÁö È®ÀÎ if (bReculsive) MakeSTYFileList(fpath, true); } else { if (ExtractFileExt(fpath.LowerCase()) == ".sty") { // ÆÄÀÏ - ¼ø¼­´ë·Î ³ÖÀº°ÇÁö È®ÀÎ SFCL = new STYFILECACHELIST; memset(SFCL, 0, sizeof(STYFILECACHELIST)); strcpy(SFCL->IList.Path, AnsiString(fpath).c_str()); SFCL->IList.LastWriteTime = sr.FindData.ftLastWriteTime; SFCL->IList.FileSizeLow = sr.FindData.nFileSizeLow; if (bIncludeHeader) { // *.sty ÆÄÀÏÀ» ¹öÀü º°·Î ÀÐ°í º¯È¯ÇÑ´Ù - by monkman (2004.03.30) if ((hFile = CreateFile(fpath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) { CloseHandle(hFile); hFile = INVALID_HANDLE_VALUE; if (SFCL) { delete SFCL; SFCL = NULL; } Found = FindNext(sr); continue; } header = VecDraw->ReadSTYFileHeader(hFile, fpath, &Version, true); // Version¿¡ µû¶ó ÇØ¾ßÇÒ ÀÛ¾÷ÀÌ ÀÖ´Ù¸é ÀÌ °÷¿¡¼­ ÇÑ´Ù // 100 : // 200 : // 205 : Gdiplus Àû¿ë ÈÄ º¯°æ (05.03.09) // 206 : groupIndex º¯°æ & gradient fill Ãß°¡ (08.05.08) // 207 : MotiveObject Ãß°¡ - by monkman (2009.04.03) // 209 : Vector Version Up - Arrow (2011.08.10) // 500 : (¿µ¿ì ÆÇ¸Å¿ë µ¥ÀÌÅÍ) // 505 : Gdiplus Àû¿ë ÈÄ º¯°æ (05.03.09) // 506 : roupIndex º¯°æ & gradient fill Ãß°¡ (08.05.08) // 507 : MotiveObject Ãß°¡ - by monkman (2009.04.03) // 508 : ÀÛ¾÷Áö½Ã¼­ »çÀÌÁî Á¤º¸ Ãß°¡ (2011.01.18) // 509 : Vector Version Up - Arrow (2011.08.10) if (500 <= Version) { #ifndef NOT_STYLEDATA_LOCK // HASP°ú üũ ÇÑ´Ù if (!VecDraw->CheckSTYLock(hFile, header)) { if (SFCL) { delete SFCL; SFCL = NULL; } Found = FindNext(sr); continue; } else break; #endif } SFCL->HList.Version = header.Version; SFCL->HList.Division = header.Division; SFCL->HList.Type = header.Type; SFCL->HList.Sort = header.Sort; SFCL->HList.EMethod = header.EMethod; SFCL->HList.ESilhouette = header.ESilhouette; SFCL->HList.ESleeve = header.ESleeve; SFCL->HList.ECollar = header.ECollar; SFCL->HList.EPants = header.EPants; SFCL->HList.EBelt = header.EBelt; SFCL->HList.EUpperMaterial = header.EUpperMaterial; SFCL->HList.ELowerMaterial = header.ELowerMaterial; SFCL->HList.Count1 = header.Count1; SFCL->HList.Count2 = header.Count2; SFCL->HList.bSleeve = header.bSleeve; SFCL->HList.bCollar = header.bCollar; SFCL->HList.bBelt = header.bBelt; SFCL->HList.Year = header.Year; SFCL->HList.SSFW = header.SSFW; memcpy(SFCL->HList.Comment, header.Comment, sizeof(BYTE)*100); memcpy(SFCL->HList.Crypt, header.Crypt, sizeof(BYTE)*24); memcpy(SFCL->HList.StyleID, header.StyleID, sizeof(BYTE)*20); memcpy(SFCL->HList.Reserved, header.Reserved, sizeof(BYTE)*14); CloseHandle(hFile); hFile = INVALID_HANDLE_VALUE; } CurrentSTYFileList->Add(SFCL); } } } Found = FindNext(sr); } FindClose(sr); } catch (Exception &e) { //throw e; } } //--------------------------------------------------------------------------- bool __fastcall TFileCache::CompareListAndCache(ESort Style, String Path) { STYFILECACHELIST *SFCL = NULL; // ÆÄÀÏ Á¤º¸¸¦ °¡Áö°í ÀÖ´Â STYFileList¿Í STYCache ÆÄÀÏÀ» ºñ±³ switch (Style) { case SO_TOPFULL : LoadFromSTYCacheFile(Path, TopWholeList); if (DetailCompareListAndCache(CurrentSTYFileList, TopWholeList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, TopWholeList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); TopWholeList->Add(SFCL); } return true; } } case SO_SILHOUETTE : LoadFromSTYCacheFile(Path, SilList); if (DetailCompareListAndCache(CurrentSTYFileList, SilList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, SilList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); SilList->Add(SFCL); } return true; } } case SO_SLEEVE : LoadFromSTYCacheFile(Path, SleList); if (DetailCompareListAndCache(CurrentSTYFileList, SleList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, SleList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); SleList->Add(SFCL); } return true; } } case SO_COLLAR : LoadFromSTYCacheFile(Path, ColList); if (DetailCompareListAndCache(CurrentSTYFileList, ColList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, ColList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); ColList->Add(SFCL); } return true; } } case SO_BOTTOMFULL : LoadFromSTYCacheFile(Path, BottomWholeList); if (DetailCompareListAndCache(CurrentSTYFileList, BottomWholeList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, BottomWholeList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); BottomWholeList->Add(SFCL); } return true; } } case SO_PANTS : LoadFromSTYCacheFile(Path, PantsList); if (DetailCompareListAndCache(CurrentSTYFileList, PantsList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, PantsList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); PantsList->Add(SFCL); } return true; } } case SO_BELT : LoadFromSTYCacheFile(Path, BeltList); if (DetailCompareListAndCache(CurrentSTYFileList, BeltList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, BeltList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); BeltList->Add(SFCL); } return true; } } case SO_UPPERMATRIAL: case SO_LOWERMATRIAL: LoadFromSTYCacheFile(Path, MaterialList); if (DetailCompareListAndCache(CurrentSTYFileList, MaterialList)) { // °°À» °æ¿ì return true; } else { // °°Áö ¾ÊÀ» °æ¿ì if (SaveToSTYCacheFile(Path)) { ClearSTYList(Style); LoadFromSTYCacheFile(Path, MaterialList); return true; } else { // Cache ÆÄÀÏÀ» ¸¸µéÁö ¾Ê´Â °æ¿ì (Àбâ Àü¿ëÀÏ °æ¿ì µî..) STYFILECACHELIST *SFCL; ClearCurList(CurrentSTYFileList); ClearSTYList(Style); MakeSTYFileList(Path, false, true); for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = new STYFILECACHELIST; memcpy(SFCL, (STYFILECACHELIST *)CurrentSTYFileList->Items[i], sizeof(STYFILECACHELIST)); MaterialList->Add(SFCL); } return true; } } } return false; } //--------------------------------------------------------------------------- bool __fastcall TFileCache::DetailCompareListAndCache(TList *CurrList, TList *StyleList) { // ÆÄÀÏ Á¤º¸¸¦ °¡Áö°í ÀÖ´Â STYFileList¿Í STYCache ÆÄÀÏÀ» ºñ±³ (¸®½ºÆ®µéÀ» ºñ±³) bool bEqual; STYFILECACHELIST *CURRSFCL, *STYLESFCL; if (CurrList->Count == StyleList->Count) { for(int i = 0; i < CurrList->Count; i++) { CURRSFCL = (STYFILECACHELIST *)CurrList->Items[i]; STYLESFCL = (STYFILECACHELIST *)StyleList->Items[i]; if (strcmpi(CURRSFCL->IList.Path, STYLESFCL->IList.Path)) { bEqual = false; break; } if (CURRSFCL->IList.LastWriteTime.dwLowDateTime != STYLESFCL->IList.LastWriteTime.dwLowDateTime) { bEqual = false; break; } if (CURRSFCL->IList.LastWriteTime.dwHighDateTime != STYLESFCL->IList.LastWriteTime.dwHighDateTime) { bEqual = false; break; } if (CURRSFCL->IList.FileSizeLow != STYLESFCL->IList.FileSizeLow) { bEqual = false; break; } bEqual = true; } } else bEqual = false; return bEqual; } //--------------------------------------------------------------------------- bool __fastcall TFileCache::SaveToSTYCacheFile(String Path) { String filename; HANDLE hFile = INVALID_HANDLE_VALUE; DWORD dwWrite; char header[9]; int version; STYFILECACHELIST *SFCL; int Cnt; // STY Cache ÆÄÀÏÀ» »ý¼º ÈÄ ÀúÀå (Çì´õÆÄÀÏ Æ÷ÇÔ) ClearCurList(CurrentSTYFileList); MakeSTYFileList(Path, false, true); // CD µî Àбâ Àü¿ëÀÏ °æ¿ì - by monkman (2007.02.05) if (GetFileAttributes(ExtractFilePath(Path).c_str()) == FILE_ATTRIBUTE_READONLY) return false; filename = Path + "\\STYCache.sca"; strcpy(header, "STYCache\0"); version = 100; Cnt = CurrentSTYFileList->Count; // ±âÁ¸ ÆÄÀÏÀÌ Á¸ÀçÇØµµ ¹«Á¶°Ç OverWrite if ((hFile = CreateFile(filename.c_str(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) goto fail; if (!WriteFile(hFile, &header, sizeof(header), &dwWrite, NULL)) goto fail; if (!WriteFile(hFile, &version, sizeof(int), &dwWrite, NULL)) goto fail; if (!WriteFile(hFile, &Cnt, sizeof(int), &dwWrite, NULL)) goto fail; // TListÀÇ °¹¼ö for (int i = 0; i < CurrentSTYFileList->Count; i++) { SFCL = (STYFILECACHELIST *)CurrentSTYFileList->Items[i]; if (!WriteFile(hFile, SFCL, sizeof(STYFILECACHELIST), &dwWrite, NULL)) goto fail; } SetEndOfFile(hFile); CloseHandle(hFile); hFile = INVALID_HANDLE_VALUE; return true; fail : CloseHandle(hFile); hFile = INVALID_HANDLE_VALUE; return false; } //--------------------------------------------------------------------------- bool __fastcall TFileCache::LoadFromSTYCacheFile(String Path, TList *StyleList) { // STY Cache ÆÄÀÏÀ» ·Îµå (¸®½ºÆ®¿¡ ´ã´Â´Ù) String filename; HANDLE hFile = INVALID_HANDLE_VALUE; DWORD dwRead; char header[9]; int version; STYFILECACHELIST *SFCL; int Cnt; filename = Path + "\\STYCache.sca"; if (FileExists(filename)) { // ±âÁ¸ ÆÄÀÏÀÌ Á¸ÀçÇØµµ ¹«Á¶°Ç OverWrite if ((hFile = CreateFile(filename.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) goto fail; if (!ReadFile(hFile, &header, sizeof(header), &dwRead, NULL)) goto fail; if (!ReadFile(hFile, &version, sizeof(int), &dwRead, NULL)) goto fail; if (!ReadFile(hFile, &Cnt, sizeof(int), &dwRead, NULL)) goto fail; if (!strcmp(header, "STYCache\0") && version == 100 && Cnt > 0) { for (int i = 0; i < Cnt; i++) { SFCL = new STYFILECACHELIST; memset(SFCL, 0, sizeof(STYFILECACHELIST)); if (!ReadFile(hFile, SFCL, sizeof(STYFILECACHELIST), &dwRead, NULL)) goto fail; StyleList->Add(SFCL); } } } CloseHandle(hFile); hFile = INVALID_HANDLE_VALUE; return true; fail : CloseHandle(hFile); hFile = INVALID_HANDLE_VALUE; return false; } //--------------------------------------------------------------------------- void __fastcall TFileCache::FindCorrectnessFiles(TList *StyleList, TStringList *StyleStrList, EDivision FDivision, EType FType, ESort FSort, int FYear1, BYTE FSeason1, int FYear2, BYTE FSeason2, String FComment , EDetailSilhouette FSilhouette, EDetailSleeve FSleeve, EDetailCollar FCollar, EDetailPants FPants, EDetailBelt FBelt , EDetailUpperMaterial FUpperMaterial, EDetailLowerMaterial FLowerMaterial) { // Á¶°ÇÀ» ³Ö¾îÁÖ¸é ±× Á¶°Ç¿¡ µû¸¥ ÆÄÀÏÀ» ã¾Æ¼­ ÇØ´ç TStringList¿¡ ÆÄÀϸíÀ» ³Ö¾îÁØ´Ù bool bEqual; STYFILECACHELIST *SFCL; STYFILECACHELIST *NewSFCL; String FullText; String SearchText; String filename; TList *SwapList; int Cnt; SwapList = new TList; Cnt = 0; StyleStrList->Clear(); for (int i = 0; i < StyleList->Count; i++) { SFCL = (STYFILECACHELIST *)StyleList->Items[i]; if (FDivision != -1) { if (SFCL->HList.Division != FDivision) continue; } if (FType != -1) { if (SFCL->HList.Type != FType) continue; } if (FSort != -1) { if (SFCL->HList.Sort != FSort) continue; } if (200 <= SFCL->HList.Version && SFCL->HList.Version < 500) { if (FSilhouette != -1) { if (SFCL->HList.ESilhouette != FSilhouette) continue; } } #ifndef NOT_STYLEDATA_LOCK else if (500 <= SFCL->HList.Version && SFCL->HList.Version <= STYSTIFileVersion) { if (FSilhouette != -1) { if (SFCL->HList.ESilhouette != FSilhouette) continue; } } #endif if (FSleeve != -1) { if (SFCL->HList.ESleeve != FSleeve) continue; } if (FCollar != -1) { if (SFCL->HList.ECollar != FCollar) continue; } if (FPants != -1) { if (SFCL->HList.EPants != FPants) continue; } if (FBelt != -1) { if (SFCL->HList.EBelt != FBelt) continue; } if (FUpperMaterial != -1) { if (SFCL->HList.EUpperMaterial != FUpperMaterial) continue; } if (FLowerMaterial != -1) { if (SFCL->HList.ELowerMaterial != FLowerMaterial) continue; } // // ¿¬µµ¿Í ½ÃÁð °Ë»öÀ» À§ÇØ - by monkman (2004.08.03) // // ¿¬µµ¿Í ½ÃÁðÀ» µ¿½Ã¿¡ °Ë»öÇØ¾ß ÇϹǷΠ// // ÀÌÀü ¾Ë°í¸®Áò.. º´Àξ¾ÀÇ µµ¿òÀ¸·Î ¾Æ·¡ ¾Ë°í¸®ÁòÀ¸·Î ¹Ù²î¾ú´Ù // // SeasonÀ» üũÇϱâ À§ÇÑ º¯¼öµé // bool bContinue = true, bStartSum = false, bStopSum = true; // BYTE CompSeason = '\0'; // if (FYear1 > 0 && FYear2 > 0 && FYear1 != MIN_YEAR && FYear2 != MAX_YEAR) { // if (FYear1 <= SFCL->HList.Year && SFCL->HList.Year <= FYear2) { // °Ë»ö Á¶°Ç¿¡ ÇØ´ç // // SFCL->HList.YearÀÇ ¿¬µµ°¡ °Ë»ö Á¶°Ç ¿¬µµÀÎ FYear1, FYear2¿Í °°À»¶§¸¸ Season Á¶°ÇÀ» µûÁ®ÁÖ¸é µÈ´Ù // if (FYear1 == SFCL->HList.Year) { // if (SFCL->HList.SSFW < FSeason1) continue; // °Ë»ö Á¶°Ç¿¡ ÇØ´çÇÏÁö ¾ÊÀ½ : °°Àº ¿¬µµ¿¡ SFCL->HList.SSFW°¡ Season1º¸´Ù ÀÛÀ»°æ¿ì // } // // if (FYear2 == SFCL->HList.Year) { // if (FYear1 == FYear2) { // ¿¬µµ°¡ °°À» °æ¿ì ±× ¾È¿¡ ÇØ´çµÇ´Â ½ÃÁ𸸠üũÇÑ´Ù // if (FSeason1 > FSeason2) { CompSeason = FSeason1; FSeason1 = FSeason2; FSeason2 = CompSeason; CompSeason = '\0';} // FSeason1 > FSeason2ÀÏ‹š Swap // // ¾î´À ÇϳªÀÇ FSeasonÀÌ¶óµµ All À̸é CompSeason °ªÀ» 15·Î ¼ÂÆÃÇÏ¿© ¸ðµç SeasonÀÌ ÇØ´çµÇ°Ô ÇÑ´Ù // if (FSeason1 == MIN_SSFW || FSeason1 == MAX_SSFW || FSeason2 == MIN_SSFW || FSeason2 == MAX_SSFW) { bStartSum = true; CompSeason = 15; } // for (int i=0; i<4; i++) { // if (!bStartSum) { // if (((FSeason1 >> i) & 1) == 1) { // FSeason1ÀÌ Ã³À½À¸·Î üũµÈ °÷ // bStartSum = true; // bStopSum = false; // i--; // FSeason2ÀÇ i°ª¸¦ À§ÇØ µÚ·Î µÇµ¹¸°´Ù // } // } else if (!bStopSum) { // CompSeason += pow(2, i); // if (((FSeason2 >> i) & 1) == 1) { // FSeason2ÀÌ Ã³À½À¸·Î üũµÈ °÷ // bStopSum = true; // } // } // } // // for (int i=0; i<4; i++) { // if (((SFCL->HList.SSFW >> i) & 1) == 1 && ((CompSeason >> i) & 1) == 1) { // °Ë»ö Á¶°Ç¿¡ ÇØ´ç : °°Àº ½ÃÁðÀÌ ÀÖ´Â °æ¿ì // bContinue = false; // break; // } // } // if (bContinue) continue; // // } else { // ¿¬µµ°¡ °°Áö ¾ÊÀ¸¸é FSeason2ÀÇ SpringºÎÅÍ Ã¼Å©ÇÑ´Ù // if (FSeason1 > FSeason2) { CompSeason = FSeason1; FSeason1 = FSeason2; FSeason2 = CompSeason; CompSeason = '\0';} // FSeason1 > FSeason2ÀÏ‹š Swap // if (FSeason1 == MIN_SSFW || FSeason1 == MAX_SSFW || FSeason2 == MIN_SSFW || FSeason2 == MAX_SSFW) { bStopSum = true; CompSeason = 15; } // for (int i=0; i<4; i++) { // if (!bStopSum) { // CompSeason += pow(2, i); // if (((FSeason2 >> i) & 1) == 1) bStopSum = true; // FSeason2ÀÌ Ã³À½À¸·Î üũµÈ °÷ // } // } // // for (int i=0; i<4; i++) { // if (((SFCL->HList.SSFW >> i) & 1) == 1 && ((CompSeason >> i) & 1) == 1) { // °Ë»ö Á¶°Ç¿¡ ÇØ´ç : °°Àº ½ÃÁðÀÌ ÀÖ´Â °æ¿ì // bContinue = false; // break; // } // } // // if (bContinue) continue; // } // } // } else continue; // } else if (FYear1 > 0 && FYear2 > 0 && FYear1 == MIN_YEAR && FYear2 == MAX_YEAR) { // // All·Î ÇßÀ» °æ¿ì ½ÃÁ𸸠°Ë»ö µÉ ¼ö ÀÖµµ·Ï ÇÑ´Ù // } // µÎ ¹øÂ° ¾Ë°í¸®Áò (with cellberus) // ÇÁ·Î±×·¥ÀÇ ³»¿ë // ¦£¦¡¦¡¦¡¦¡¦¡¦¡¦¨¦¡¦¡¦¡¦¡¦¡¦¡¦¤ // ¦¢ From ¦¢ To ¦¢ //¦£¦¡¦¡¦«¦¡¦¡¦¨¦¡¦¡¦¡¦«¦¡¦¡¦¨¦¡¦¡¦¡¦© //¦¢»óȲ¦¢Year¦¢Season¦¢Year¦¢Season¦¢ //¦§¦¡¦¡¦«¦¡¦¡¦«¦¡¦¡¦¡¦«¦¡¦¡¦«¦¡¦¡¦¡¦© //¦¢ 1 ¦¢All ¦¢ All ¦¢ All¦¢ All ¦¢ ¸ðµÎ °Ë»ö //¦¢ 2 ¦¢All ¦¢ All ¦¢All ¦¢ O ¦¢ ¸ðµÎ °Ë»ö //¦¢ 3 ¦¢All ¦¢ All ¦¢O ¦¢ All ¦¢ To Year±îÁö ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 4 ¦¢All ¦¢ All ¦¢O ¦¢ O ¦¢ To Year, Season ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 5 ¦¢All ¦¢ O ¦¢All ¦¢ All ¦¢ ¸ðµÎ °Ë»ö //¦¢ 6 ¦¢All ¦¢ O ¦¢All ¦¢ O ¦¢ ¿¬µµ¿Í »ó°ü¾øÀÌ From SeasonºÎÅÍ To Season±îÁö °Ë»ö //¦¢ 7 ¦¢All ¦¢ O ¦¢O ¦¢ All ¦¢ To Year±îÁö ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 8 ¦¢All ¦¢ O ¦¢O ¦¢ O ¦¢ To Year, Season ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 9 ¦¢O ¦¢ All ¦¢All ¦¢ All ¦¢ From Year ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 10 ¦¢O ¦¢ All ¦¢All ¦¢ O ¦¢ From Year ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 11 ¦¢O ¦¢ All ¦¢O ¦¢ All ¦¢ From Year ºÎÅÍ To Year±îÁö ¸ðµÎ °Ë»ö //¦¢ 12 ¦¢O ¦¢ All ¦¢O ¦¢ O ¦¢ From Year ºÎÅÍ To Year, Season ±îÁö ¸ðµÎ °Ë»ö //¦¢ 13 ¦¢O ¦¢ O ¦¢All ¦¢ All ¦¢ From Year, Season ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 14 ¦¢O ¦¢ O ¦¢All ¦¢ O ¦¢ From Year, Season ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 15 ¦¢O ¦¢ O ¦¢O ¦¢ All ¦¢ From Year, Season ºÎÅÍ To Year ±îÁö ¸ðµÎ °Ë»ö //¦¢ 16 ¦¢O ¦¢ O ¦¢O ¦¢ O ¦¢ From Year, Season ºÎÅÍ To Year, Season ¸ðµÎ °Ë»ö //¦¦¦¡¦¡¦ª¦¡¦¡¦ª¦¡¦¡¦¡¦ª¦¡¦¡¦ª¦¡¦¡¦¡¦¥ // From Season ¼³Á¤ To Season ¼³Á¤ // º½ 00001111 00000001 // ¿©¸§ 00001110 00000011 // °¡À» 00001100 00000111 // °Ü¿ï 00001000 00001111 // BYTE FromSeason = 255, ToSeason = 255; // int Year1 = FYear1, Year2 = FYear2; // BYTE Season1, Season2; // // if (FYear1 <= FYear2) { // Year1 = FYear1; // Year2 = FYear2; // Season1 = FSeason1; // Season2 = FSeason2; // } else { // Year1 = FYear2; // Year2 = FYear1; // Season1 = FSeason2; // Season2 = FSeason1; // } // // //¦¢ 6 ¦¢All ¦¢ O ¦¢All ¦¢ O ¦¢¿¬µµ¿Í »ó°ü¾øÀÌ From SeasonºÎÅÍ To Season±îÁö °Ë»ö // if (Year1 == MIN_YEAR && Season1 != MIN_SSFW && Year2 == MAX_YEAR && Season2 != MAX_SSFW) { // if (FSeason1 <= FSeason2) { // Season1 = FSeason1; // Season2 = FSeason2; // } else { // Season1 = FSeason2; // Season2 = FSeason1; // } // // if (FromSeason == 15) { // switch (Season1) { // case 0 : // FromSeason = 0; // break; // case 1 : // FromSeason = 15; // break; // case 2 : // FromSeason = 14; // break; // case 4 : // FromSeason = 12; // break; // case 8 : // FromSeason = 8; // break; // default : // FromSeason = 0; // break; // } // } // // if (ToSeason == 15) { // switch (Season2) { // case 0 : // ToSeason = 0; // break; // case 1 : // ToSeason = 1; // break; // case 2 : // ToSeason = 3; // break; // case 4 : // ToSeason = 7; // break; // case 8 : // ToSeason = 15; // break; // default : // ToSeason = 0; // break; // } // } // // if (!(((FromSeason & SFCL->HList.SSFW) & ToSeason) & (FromSeason & ToSeason))) // ÀÌ °æ¿ì´Â elseÀÏ ¶§ Æ÷ÇԵȴ٠// continue; // // } else { // //¦¢ 1 ¦¢All ¦¢ None ¦¢All ¦¢ None ¦¢¸ðµÎ °Ë»ö // if ((Year1 == MIN_YEAR && Season1 == MIN_SSFW && Year2 == MAX_YEAR && Season2 == MAX_SSFW) // || (Year1 != MIN_YEAR && Season1 == MIN_SSFW && Year2 != MAX_YEAR && Season2 == MAX_SSFW)) { // if (!(Year1 <= SFCL->HList.Year && SFCL->HList.Year <= Year2)) continue; // } else { // //¦¢ 2 ¦¢All ¦¢ None ¦¢All ¦¢ O ¦¢¸ðµÎ °Ë»ö // //¦¢ 5 ¦¢All ¦¢ O ¦¢All ¦¢ None ¦¢¸ðµÎ °Ë»ö // //¦¢ 9 ¦¢O ¦¢ None ¦¢All ¦¢ None ¦¢From Year ÀÌÈÄ ¸ðµÎ °Ë»ö // //¦¢ 10 ¦¢O ¦¢ None ¦¢All ¦¢ O ¦¢From Year ÀÌÈÄ ¸ðµÎ °Ë»ö // //¦¢ 3 ¦¢All ¦¢ None ¦¢O ¦¢ None ¦¢To Year±îÁö ÀÌÀü ¸ðµÎ °Ë»ö // //¦¢ 7 ¦¢All ¦¢ O ¦¢O ¦¢ None ¦¢To Year±îÁö ÀÌÀü ¸ðµÎ °Ë»ö // //¦¢ 11 ¦¢O ¦¢ None ¦¢O ¦¢ None ¦¢From Year ºÎÅÍ To Year±îÁö ¸ðµÎ °Ë»ö // if ((Year1 == MIN_YEAR && Season1 == MIN_SSFW && Year2 == MAX_YEAR && Season2 != MAX_SSFW) // || (Year1 == MIN_YEAR && Season1 != MIN_SSFW && Year2 == MAX_YEAR && Season2 == MAX_SSFW) // || (Year1 != MIN_YEAR && Season1 == MIN_SSFW && Year2 == MAX_YEAR && Season2 == MAX_SSFW) // || (Year1 != MIN_YEAR && Season1 == MIN_SSFW && Year2 == MAX_YEAR && Season2 != MAX_SSFW) // || (Year1 == MIN_YEAR && Season1 == MIN_SSFW && Year2 != MAX_YEAR && Season2 == MAX_SSFW) // || (Year1 == MIN_YEAR && Season1 != MIN_SSFW && Year2 != MAX_YEAR && Season2 == MAX_SSFW)) { // FromSeason = 15; ToSeason = 15; // } // // //¦¢ 13 ¦¢O ¦¢ O ¦¢All ¦¢ None ¦¢From Year, Season ÀÌÈÄ ¸ðµÎ °Ë»ö // //¦¢ 14 ¦¢O ¦¢ O ¦¢All ¦¢ O ¦¢From Year, Season ÀÌÈÄ ¸ðµÎ °Ë»ö // //¦¢ 15 ¦¢O ¦¢ O ¦¢O ¦¢ None ¦¢From Year, Season ºÎÅÍ To Year ±îÁö ¸ðµÎ °Ë»ö // if ((Year1 != MIN_YEAR && Season1 != MIN_SSFW && Year2 == MAX_YEAR && Season2 == MAX_SSFW) // || (Year1 != MIN_YEAR && Season1 != MIN_SSFW && Year2 == MAX_YEAR && Season2 != MAX_SSFW) // || (Year1 != MIN_YEAR && Season1 != MIN_SSFW && Year2 != MAX_YEAR && Season2 == MAX_SSFW)) { // FromSeason = 255; ToSeason = 15; // } // // //¦¢ 4 ¦¢All ¦¢ None ¦¢O ¦¢ O ¦¢To Year, Season ÀÌÀü ¸ðµÎ °Ë»ö // //¦¢ 8 ¦¢All ¦¢ O ¦¢O ¦¢ O ¦¢To Year, Season ÀÌÀü ¸ðµÎ °Ë»ö // //¦¢ 12 ¦¢O ¦¢ None ¦¢O ¦¢ O ¦¢From Year ºÎÅÍ To Year, Season ±îÁö ¸ðµÎ °Ë»ö // if ((Year1 == MIN_YEAR && Season1 == MIN_SSFW && Year2 != MAX_YEAR && Season2 != MAX_SSFW) // || (Year1 == MIN_YEAR && Season1 != MIN_SSFW && Year2 != MAX_YEAR && Season2 != MAX_SSFW) // || (Year1 != MIN_YEAR && Season1 == MIN_SSFW && Year2 != MAX_YEAR && Season2 != MAX_SSFW)) { // FromSeason = 15; ToSeason = 255; // } // // //¦¢ 16 ¦¢O ¦¢ O ¦¢O ¦¢ O ¦¢From Year, Season ºÎÅÍ To Year, Season ¸ðµÎ °Ë»ö // if (Year1 != MIN_YEAR && Season1 != MIN_SSFW && Year2 != MAX_YEAR && Season2 != MAX_SSFW) { // FromSeason = 255; ToSeason = 255; // } // // if (FromSeason == 255) { // switch (Season1) { // case 0 : // FromSeason = 0; // break; // case 1 : // FromSeason = 15; // break; // case 2 : // FromSeason = 14; // break; // case 4 : // FromSeason = 12; // break; // case 8 : // FromSeason = 8; // break; // default : // FromSeason = 0; // break; // } // } // // if (ToSeason == 255) { // switch (Season2) { // case 0 : // ToSeason = 0; // break; // case 1 : // ToSeason = 1; // break; // case 2 : // ToSeason = 3; // break; // case 4 : // ToSeason = 7; // break; // case 8 : // ToSeason = 15; // break; // default : // ToSeason = 0; // break; // } // } // // if (Year1 <= SFCL->HList.Year && SFCL->HList.Year <= Year2) { // if ((FromSeason & SFCL->HList.SSFW) & ToSeason) { // if (Year1 == Year2) { // if (!(((FromSeason & SFCL->HList.SSFW) & ToSeason) & (FromSeason & ToSeason))) // ÀÌ °æ¿ì´Â elseÀÏ ¶§ Æ÷ÇԵȴ٠// continue; // } // } else continue; // } else continue; // } // } // ¿¬µµ °Ë»ö ¾Ë°í¸®Áò (with celberus) // ÇÁ·Î±×·¥ÀÇ ³»¿ë // ¦£¦¡¦¡¦¡¦¡¦¡¦¡¦¨¦¡¦¡¦¡¦¡¦¡¦¡¦¤ // ¦¢ From ¦¢ To ¦¢ //¦£¦¡¦¡¦«¦¡¦¡¦¨¦¡¦¡¦¡¦«¦¡¦¡¦¨¦¡¦¡¦¡¦© //¦¢»óȲ¦¢Year¦¢Season¦¢Year¦¢Season¦¢ //¦§¦¡¦¡¦«¦¡¦¡¦«¦¡¦¡¦¡¦«¦¡¦¡¦«¦¡¦¡¦¡¦© //¦¢ 1 ¦¢All ¦¢ All ¦¢ All¦¢ All ¦¢ ¸ðµÎ °Ë»ö //¦¢ 2 ¦¢All ¦¢ All ¦¢All ¦¢ O ¦¢ ¸ðµÎ °Ë»ö //¦¢ 3 ¦¢All ¦¢ All ¦¢O ¦¢ All ¦¢ To Year±îÁö ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 4 ¦¢All ¦¢ All ¦¢O ¦¢ O ¦¢ To Year, Season ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 5 ¦¢All ¦¢ O ¦¢All ¦¢ All ¦¢ ¸ðµÎ °Ë»ö //¦¢ 6 ¦¢All ¦¢ O ¦¢All ¦¢ O ¦¢ ¿¬µµ¿Í »ó°ü¾øÀÌ From SeasonºÎÅÍ To Season±îÁö °Ë»ö //¦¢ 7 ¦¢All ¦¢ O ¦¢O ¦¢ All ¦¢ To Year±îÁö ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 8 ¦¢All ¦¢ O ¦¢O ¦¢ O ¦¢ To Year, Season ÀÌÀü ¸ðµÎ °Ë»ö //¦¢ 9 ¦¢O ¦¢ All ¦¢All ¦¢ All ¦¢ From Year ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 10 ¦¢O ¦¢ All ¦¢All ¦¢ O ¦¢ From Year ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 11 ¦¢O ¦¢ All ¦¢O ¦¢ All ¦¢ From Year ºÎÅÍ To Year±îÁö ¸ðµÎ °Ë»ö //¦¢ 12 ¦¢O ¦¢ All ¦¢O ¦¢ O ¦¢ From Year ºÎÅÍ To Year, Season ±îÁö ¸ðµÎ °Ë»ö //¦¢ 13 ¦¢O ¦¢ O ¦¢All ¦¢ All ¦¢ From Year, Season ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 14 ¦¢O ¦¢ O ¦¢All ¦¢ O ¦¢ From Year, Season ÀÌÈÄ ¸ðµÎ °Ë»ö //¦¢ 15 ¦¢O ¦¢ O ¦¢O ¦¢ All ¦¢ From Year, Season ºÎÅÍ To Year ±îÁö ¸ðµÎ °Ë»ö //¦¢ 16 ¦¢O ¦¢ O ¦¢O ¦¢ O ¦¢ From Year, Season ºÎÅÍ To Year, Season ¸ðµÎ °Ë»ö //¦¦¦¡¦¡¦ª¦¡¦¡¦ª¦¡¦¡¦¡¦ª¦¡¦¡¦ª¦¡¦¡¦¡¦¥ // From Season ¼³Á¤ To Season ¼³Á¤ // º½ 00001111 00000001 // ¿©¸§ 00001110 00000011 // °¡À» 00001100 00000111 // °Ü¿ï 00001000 00001111 int Year1, Year2; BYTE Season1, Season2, FromSeason, ToSeason; bool bFrom, bTo; if (FYear1 <= FYear2) { Year1 = FYear1; Year2 = FYear2; Season1 = FSeason1; Season2 = FSeason2; } else { Year1 = FYear2; Year2 = FYear1; Season1 = FSeason2; Season2 = FSeason1; } switch (Season1) { case 0 : FromSeason = 15; break; case 1 : FromSeason = 15; break; case 2 : FromSeason = 14; break; case 4 : FromSeason = 12; break; case 8 : FromSeason = 8; break; } switch (Season2) { case 0 : ToSeason = 0; break; case 1 : ToSeason = 1; break; case 2 : ToSeason = 3; break; case 4 : ToSeason = 7; break; case 8 : ToSeason = 15; break; case 15 : ToSeason = 15; break; } bFrom = false; bTo = false; // Year1°ú Year2°¡ All À̰í Season¸¸ ´Ù¸¦ ¶§.. if (Year1 == MIN_YEAR && Year2 == MAX_YEAR && (Season1 != MIN_SSFW && Season1 != MAX_SSFW) && (Season2 != MIN_SSFW && Season2 != MAX_SSFW)) { // Season1 ÀÌ Season2 º¸´Ù Ŭ ¶§.. if (Season1 > Season2) { switch (Season2) { case 0 : FromSeason = 15; break; case 1 : FromSeason = 15; break; case 2 : FromSeason = 14; break; case 4 : FromSeason = 12; break; case 8 : FromSeason = 8; break; } switch (Season1) { case 0 : ToSeason = 0; break; case 1 : ToSeason = 1; break; case 2 : ToSeason = 3; break; case 4 : ToSeason = 7; break; case 8 : ToSeason = 15; break; case 15 : ToSeason = 15; break; } } if (!((FromSeason & ToSeason) & SFCL->HList.SSFW)) continue; } // ¿¬µµ°¡ °°À» ¶§.. if (Year1 == Year2) { // Season1 ÀÌ Season2 º¸´Ù Ŭ ¶§.. if (Season1 > Season2) { switch (Season2) { case 0 : FromSeason = 15; break; case 1 : FromSeason = 15; break; case 2 : FromSeason = 14; break; case 4 : FromSeason = 12; break; case 8 : FromSeason = 8; break; } switch (Season1) { case 0 : ToSeason = 0; break; case 1 : ToSeason = 1; break; case 2 : ToSeason = 3; break; case 4 : ToSeason = 7; break; case 8 : ToSeason = 15; break; case 15 : ToSeason = 15; break; } } if ((Year1 == SFCL->HList.Year) && (Season1 == MIN_SSFW || Season1 == MAX_SSFW || Season2 == MIN_SSFW || Season2 == MAX_SSFW)) { bFrom = true; bTo = true; } else { if ((Year1 == SFCL->HList.Year) && ((FromSeason & ToSeason) & SFCL->HList.SSFW)) { bFrom = true; bTo = true; } } if (!(bFrom && bTo)) continue; } else { // ¿¬µµ°¡ ´Ù¸¦ ¶§.. if (Year1 <= SFCL->HList.Year && (Season1 == MIN_SSFW || Season1 == MAX_SSFW)) { // Season1 ÀÌ All ÀÏ ¶§.. bFrom = true; } else { if (Year1 < SFCL->HList.Year || ((Year1 == SFCL->HList.Year) && (FromSeason & SFCL->HList.SSFW))) bFrom = true; } if (Year2 >= SFCL->HList.Year && (Season2 == MAX_SSFW || Season2 == MAX_SSFW)) { // Season2 °¡ All ÀÏ ¶§.. bTo = true; } else { if (Year2 > SFCL->HList.Year || ((Year2 == SFCL->HList.Year) && (ToSeason & SFCL->HList.SSFW))) bTo = true; } if (!(bFrom && bTo)) continue; } if (!FComment.IsEmpty()) { bEqual = false; if (strcmp(SFCL->HList.Comment, "")) { FullText = String(SFCL->HList.Comment); FullText = FullText.LowerCase(); SearchText = FComment.LowerCase(); for (int j = 1; j < 100; j++) { if (FullText.SubString(j, SearchText.Length()) == SearchText) { bEqual = true; break; } } if (!bEqual) continue; } } else bEqual = true; // ¿øÇÏ´Â Á¶°ÇÀÌ ¸Â¾ÒÀ» °æ¿ì if (bEqual) { filename = String(SFCL->IList.Path); StyleStrList->Add(filename); NewSFCL = new STYFILECACHELIST; *NewSFCL = *SFCL; SwapList->Add(NewSFCL); } } ClearCurList(StyleList); for (int i = 0; i < SwapList->Count; i++) { SFCL = (STYFILECACHELIST *)SwapList->Items[i]; StyleList->Add(SFCL); } SwapList->Clear(); delete SwapList; } //--------------------------------------------------------------------------- void __fastcall TFileCache::STYSearch(String Path, EDivision FDivision, EType FType, ESort FSort, int FYear1, BYTE FSeason1, int FYear2, BYTE FSeason2, String FComment , EDetailSilhouette FSilhouette, EDetailSleeve FSleeve, EDetailCollar FCollar, EDetailPants FPants, EDetailBelt FBelt , EDetailUpperMaterial FUpperMaterial, EDetailLowerMaterial FLowerMaterial) { // È¥ÀÚµµ´Â ÇÁ·Î±×·¥ ClearCurList(CurrentSTYFileList); ClearSTYList(FSort); ClearStrList(FSort); MakeSTYFileList(Path, false, false); CompareListAndCache(FSort, Path); switch (FSort) { case SO_TOPFULL : FindCorrectnessFiles(TopWholeList, TopWholeStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_SILHOUETTE : FindCorrectnessFiles(SilList, SilStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_SLEEVE : FindCorrectnessFiles(SleList, SleStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_COLLAR : FindCorrectnessFiles(ColList, ColStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_BOTTOMFULL : FindCorrectnessFiles(BottomWholeList, BottomWholeStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_PANTS : FindCorrectnessFiles(PantsList, PantsStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_BELT : FindCorrectnessFiles(BeltList, BeltStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; case SO_UPPERMATRIAL : case SO_LOWERMATRIAL : FindCorrectnessFiles(MaterialList, MaterialStrList, FDivision, FType, FSort, FYear1, FSeason1, FYear2, FSeason2, FComment, FSilhouette, FSleeve, FCollar, FPants, FBelt, FUpperMaterial, FLowerMaterial); break; } } //---------------------------------------------------------------------------