コード例 #1
0
        public void SetSize(string key, uint size)
        {
            PrmData prm = paramList[key];

            prm.SetSize(size);
            paramList[key] = prm;
        }
コード例 #2
0
 public bool AddData(string key, PrmData newval)
 {
     if (paramList.ContainsKey(key))
     {
         return(false);
     }
     paramList.Add(key, newval);
     return(true);
 }
コード例 #3
0
 public void SetData(string key, PrmData newval)
 {
     if (paramList.ContainsKey(key))
     {
         paramList[key] = newval;
     }
     else
     {
         AddData(key, newval);
     }
 }
コード例 #4
0
        public bool AddData(string key, byte[] newval)
        {
            if (paramList.ContainsKey(key))
            {
                return(false);
            }
            PrmData prm = new PrmData(newval);

            paramList.Add(key, prm);
            return(true);;
        }
コード例 #5
0
        /*
         * Loads prm file type
         */
        public void Load(string filename)
        {
            path = filename;

            if (!File.Exists(filename))
            {
                return;
            }
            file = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite);

            int count = Data.ReadInt32(file);

            for (int i = 0; i < count; i++)
            {
                UInt16 hash    = Data.ReadUInt16(file);
                UInt16 strSize = Data.ReadUInt16(file);
                string key     = Data.ReadString(file, strSize);

                PrmData dati = new PrmData(file);

                paramList.Add(key, dati);
            }
        }