コード例 #1
0
      public static void SerializableTable(string[] valuesList, int skey, Dictionary <int, List <object> > _hash)
      {
          if ((int)_ID.MAX_RECORD != valuesList.Length)
          {
              throw TableException.ErrorReader("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", GetInstanceFile(), _ID.MAX_RECORD, valuesList.Length);
          }
          Tab_PvpShop _values = new Tab_PvpShop();

          _values.m_Block      = Convert.ToInt32(valuesList[(int)_ID.ID_BLOCK] as string);
          _values.m_Index      = Convert.ToInt32(valuesList[(int)_ID.ID_INDEX] as string);
          _values.m_ItemCount  = Convert.ToInt32(valuesList[(int)_ID.ID_ITEMCOUNT] as string);
          _values.m_ItemId     = Convert.ToInt32(valuesList[(int)_ID.ID_ITEMID] as string);
          _values.m_MoneyCount = Convert.ToInt32(valuesList[(int)_ID.ID_MONEYCOUNT] as string);
          _values.m_MoneyType  = Convert.ToInt32(valuesList[(int)_ID.ID_MONEYTYPE] as string);

          if (_hash.ContainsKey(skey))
          {
              List <object> tList = _hash[skey];
              tList.Add(_values);
          }
          else
          {
              List <object> tList = new List <object>();
              tList.Add(_values);
              _hash.Add(skey, (List <object>)tList);
          }
      }
コード例 #2
0
      public void SerializableTable(ArrayList valuesList, string skey, Hashtable _hash)
      {
          if (string.IsNullOrEmpty(skey))
          {
              throw TableException.ErrorReader("Read File{0} as key is Empty Fail!!!", GetInstanceFile());
          }

          if ((int)_ID.MAX_RECORD != valuesList.Count)
          {
              throw TableException.ErrorReader("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", GetInstanceFile(), _ID.MAX_RECORD, valuesList.Count);
          }
          Int32       nKey    = Convert.ToInt32(skey);
          Tab_PvpShop _values = new Tab_PvpShop();

          _values.m_Description = valuesList[(int)_ID.ID_DESCRIPTION] as string;
          _values.m_Num         = Convert.ToInt32(valuesList[(int)_ID.ID_NUM] as string);
          _values.m_Score       = Convert.ToInt32(valuesList[(int)_ID.ID_SCORE] as string);
          _values.m_Title       = valuesList[(int)_ID.ID_TITLE] as string;
          _values.m_Type        = Convert.ToInt32(valuesList[(int)_ID.ID_TYPE] as string);

          _hash.Add(nKey, _values);
      }