public void Unlock(string id) { var s = checkpoint.Get <MusicUnlockInfo>(statusKey) ?? new MusicUnlockInfo(); if (s.Contains(id)) { return; } s.Add(id); checkpoint.Set(statusKey, s); }
public void Unlock(string path) { path = Utils.ConvertPathSeparator(path); var unlockInfo = checkpointManager.Get(MusicUnlockStatusKey, new MusicUnlockInfo()); if (unlockInfo.Contains(path)) { return; } unlockInfo.Add(path); checkpointManager.Set(MusicUnlockStatusKey, unlockInfo); }
private void UnlockAllImages() { var unlockInfo = checkpointManager.Get(ImageUnlockStatusKey, new ImageUnlockInfo()); foreach (var group in imageGroupList.groups) { foreach (var entry in group.entries) { unlockInfo.Add(Utils.ConvertPathSeparator(entry.resourcePath)); } } checkpointManager.Set(ImageUnlockStatusKey, unlockInfo); ShowPage(); }
public void SetGlobalVariable(string name, VariableType type, object value) { EnsureGlobalVariables(); if (value == null) { globalVariables.Remove(name); } else { globalVariables[name] = new VariableEntry(type, value); } checkpointManager.Set(GlobalVariablesKey, globalVariables); }