public void ShowSubtab(MemoryTab tab, int subtab) { Show(tab); switch (tab) { case MemoryTab.TRACKS: TracksTabViewModel.SelectedIndex = subtab; break; case MemoryTab.ASSIGNS: AssignsTabViewModel.SelectedIndex = subtab; break; case MemoryTab.INPUT_FX: InputFxTabViewModel.SelectedIndex = subtab; break; case MemoryTab.TRACK_FX: TrackFxTabViewModel.SelectedIndex = subtab; break; } }
public MemoryApplyToWindowViewModel(int currentMemoryNumber, MemoryWindowViewModel memoryViewModel, MemoryTab tab) { _currentMemoryNumber = currentMemoryNumber; switch (tab) { case MemoryTab.TRACKS: SetTabViewModel(memoryViewModel.TracksTabViewModel); break; case MemoryTab.RHYTHM: SetViewModel(memoryViewModel.RhythmViewModel); break; case MemoryTab.NAME: SetViewModel(memoryViewModel.NameViewModel); break; case MemoryTab.MASTER: SetViewModel(memoryViewModel.MasterViewModel); break; case MemoryTab.REC_OPTION: SetViewModel(memoryViewModel.RecOptionViewModel); break; case MemoryTab.PLAY_OPTION: SetViewModel(memoryViewModel.PlayOptionViewModel); break; case MemoryTab.ASSIGNS: SetTabViewModel(memoryViewModel.AssignsTabViewModel); break; case MemoryTab.INPUT_FX: SetTabViewModel(memoryViewModel.InputFxTabViewModel); break; case MemoryTab.TRACK_FX: SetTabViewModel(memoryViewModel.TrackFxTabViewModel); break; } ApplyToPreviousMemories = new Command <int>((previousX) => ApplyToRangeMemories.Execute(new object[] { _currentMemoryNumber - previousX, _currentMemoryNumber })); ApplyToNextMemories = new Command <int>((nextX) => ApplyToRangeMemories.Execute(new object[] { _currentMemoryNumber, _currentMemoryNumber + nextX })); }