private void SetData_Resource_XML() { CSSql_DataBase SqliteScript = Main.inst.GetSqliteManager().GetSql_DataBase(); try { if (SqliteScript.Parse_Resource()) { while (SqliteScript.FetchRow()) { int count = 0; string _resourceName = SqliteScript.GetRowString(count++); string _resourcePath = SqliteScript.GetRowString(count++); m_tableData_Resource.Add(_resourceName, _resourcePath); } } else { throw new Exception(MethodBase.GetCurrentMethod().Name + ": Open Failed."); } } catch (Exception e) { DebugError(MethodBase.GetCurrentMethod().Name + ": " + e.ToString()); } finally { SqliteScript.CloseParsing(); } }
private void SetData_Item_XML() { CSSql_DataBase SqliteScript = Main.inst.GetSqliteManager().GetSql_DataBase(); try { if (SqliteScript.Parse_ItemData()) { while (SqliteScript.FetchRow()) { int count = 0; int _itemIdx = SqliteScript.GetRowInt(count++); int _itemName = SqliteScript.GetRowInt(count++); int _itemInfo = SqliteScript.GetRowInt(count++); string _itemRaster = SqliteScript.GetRowString(count++); int _itemPriceGold = SqliteScript.GetRowInt(count++); int _itemPriceCash = SqliteScript.GetRowInt(count++); int _itemTypeIdx = SqliteScript.GetRowInt(count++); int _itemUseTime = SqliteScript.GetRowInt(count++); int _itemAreaX = SqliteScript.GetRowInt(count++); int _itemAreaY = SqliteScript.GetRowInt(count++); int _itemUseValue = SqliteScript.GetRowInt(count++); bool _itemIsActive = SqliteScript.GetRowBoolean(count++); SData_Item tmpStruct = new SData_Item(_itemIdx, _itemName, _itemInfo, _itemRaster, _itemPriceGold, _itemPriceCash, _itemTypeIdx, _itemUseTime, _itemAreaX, _itemAreaY, _itemUseValue, _itemIsActive); m_tableData_Item.Add(_itemIdx, tmpStruct); m_listMenuIndex_Item.Add(_itemIdx); } } else { throw new Exception(MethodBase.GetCurrentMethod().Name + ": Open Failed."); } } catch (Exception e) { DebugError(MethodBase.GetCurrentMethod().Name + ": " + e.ToString()); } finally { SqliteScript.CloseParsing(); } }
private void SetData_Explain() { if (m_tableData_Explain == null) { m_tableData_Explain = new Dictionary <int, string>(); } m_tableData_Explain.Clear(); CSSql_DataBase SqliteScript = Main.inst.GetSqliteManager().GetSql_DataBase(); try { if (SqliteScript.Parse_Resource()) { while (SqliteScript.FetchRow()) { int count = 0; int _explainIndex = SqliteScript.GetRowInt(count++); string _explainText = SqliteScript.GetRowString(count++); m_tableData_Explain.Add(_explainIndex, _explainText); } } else { throw new Exception(MethodBase.GetCurrentMethod().Name + ": Open Failed."); } } catch (Exception e) { DebugError(MethodBase.GetCurrentMethod().Name + ": " + e.ToString()); } finally { SqliteScript.CloseParsing(); } }
public override void Create() { m_pSqliteScript = new CSSql_DataBase(); m_pSqliteScript.Create(); }