private void loadUserMap() { string filePath = Path.Combine(path, usersFile); if (!File.Exists(filePath)) { return; } byte[] read = File.ReadAllBytes(filePath); BinReader reader = new BinReader(read); UInt32 count = reader.readUInt32(); while (count > 0) { ulong key = reader.readUInt64(); string uid = reader.readUTF8String(); users.Add(key, uid); count--; } }
private void loadIntervallist() { string filepath = Path.Combine(path, intervalFile); if (!File.Exists(filepath)) { return; } userTimeCD.Clear(); byte[] read = File.ReadAllBytes(filepath); BinReader reader = new BinReader(read); int count = reader.readInt(); for (int i = 0; i < count; i++) { ulong id = reader.readUInt64(); int time = reader.readInt(); userTimeCD.Add(id, time); } }
public void deserialize(BinReader r) { game = r.readUTF8String(); key = r.readUTF8String(); }