public void SetSize(string key, uint size) { PrmData prm = paramList[key]; prm.SetSize(size); paramList[key] = prm; }
public bool AddData(string key, PrmData newval) { if (paramList.ContainsKey(key)) { return(false); } paramList.Add(key, newval); return(true); }
public void SetData(string key, PrmData newval) { if (paramList.ContainsKey(key)) { paramList[key] = newval; } else { AddData(key, newval); } }
public bool AddData(string key, byte[] newval) { if (paramList.ContainsKey(key)) { return(false); } PrmData prm = new PrmData(newval); paramList.Add(key, prm); return(true);; }
/* * 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); } }