private void GoBackCommand() { SettingsContainerViewModel expr_06 = this.SettingsContainer; if (expr_06 == null) { return; } expr_06.SwitchToSettings(); }
private void ApplyTo(SettingsContainerViewModel currentViewModel, Func <MemoryModel, bool> predicate) { foreach (MemoryModel memory in Global.Instance.MemoryFileModel.Memories) { if (!predicate(memory)) { continue; } currentViewModel.ApplyChanges(memory); } }
private void SetTabViewModel(SettingsContainerViewModel tabModel) { ApplyToAllMemories = new Command <int[]>((excepts) => ApplyTo(tabModel, (memory) => !excepts.Contains(memory.Id + 1))); ApplyToOnlyMemories = new Command <int[]>((only) => ApplyTo(tabModel, (memory) => only.Contains(memory.Id + 1))); ApplyToRangeMemories = new Command <int, int>((min, max) => ApplyTo(tabModel, (memory) => min <= (memory.Id + 1) && (memory.Id + 1) <= max)); }