#pragma once #include "Excel.h" #include "def.h" #include "BasicInfo.h" #include "SkillInfo.h" #include "StatusInfo.h" #include "Monster.h" #include "Item.h" #include using namespace std; const int MAX_SCRIPT_TYPE = 10; enum eSCRIPT_TYPE { SCRIPT_SKILL = 0, SCRIPT_STATE, SCRIPT_MONSTER, SCRIPT_ITEM_WEAPON, SCRIPT_ITEM_ARMOR, SCRIPT_ITEM_ACCESSARY, SCRIPT_ITEM_WASTE, }; class CExcelManager { public: CExcelManager(void); ~CExcelManager(void); private: //Excel declare CApplication m_app; CWorkbooks m_books; CWorkbook m_book; CWorksheets m_sheets; CWorksheet m_sheet; CRange m_range; //data int m_nNumSheet; int m_nScriptType; //ÇöÀç vector¿¡ ÀúÀåµÈ µ¥ÀÌÅÍÀÇ Type, SheetInfoÀÇ Å¸ÀÔÀº ¹Ì¸® ÀúÀåµÈ ŸÀÔÀÌ´Ù. public: BOOL InitExcel(CString strName); CString GetValue(CString strCell); void asctoa(int nCode, char* szBuf); int GetXLColNumFromString(CString strRow); CString GetXLColNumFromInt(int nIdx); BOOL SaveData(CScript* pData, int nCol, COleVariant value, int& nErrorCode); CString GetErrorDescription(int nError); BOOL LoadSheetData(void); BOOL SaveText(CString& strText); void DeleteAllItem(void); vector GetTitle(); int GetRowCount(); int GetColCount(); void SetSttCol(CString strSttCol); void SetEndCol(CString strEndCol); void SetSttRow(int nSttRow); void SetEndRow(int nEndRow); CString GetSttCol(); CString GetEndCol(); int GetSttRow(); int GetEndRow(); int GetSheetNo(); void SetScriptType( int nScriptType ) {m_nScriptType = nScriptType;} int GetScriptType(void); //SheetInfo public: BOOL LoadSheetInfo(); BOOL SaveSheetInfo( int nType, CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); private: BOOL GetSkillSheetInfo(); BOOL GetStateSheetInfo(); BOOL GetMonsterSheetInfo(); BOOL GetWeaponSheetInfo(); BOOL GetArmorSheetInfo(); BOOL GetAccessarySheetInfo(); BOOL GetWasteSheetInfo(); BOOL SetSkillSheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); BOOL SetStateSheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); BOOL SetMonsterSheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); BOOL SetWeaponSheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); BOOL SetArmorSheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); BOOL SetAccessarySheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); BOOL SetWasteSheetInfo( CString strSttCol, CString strEndCol, int nSttRow, int nEndRow, int nSheetNo ); public: CSheetInfo m_sheetInfo[MAX_SCRIPT_TYPE]; vector m_vecData; CString m_strError; CString m_strText; int m_nColCount; // ÇöÀç ½ºÅ©¸³Æ®ÀÇ ¼±ÅÃµÈ Ä÷³ÀÇ °³¼ö };