internal void NullifyViewModels() { _randomizerView = null; _signInView = null; _signUpView = null; _archiveView = null; }
public void MoveToArchive() { var archive = new ArchiveView(); archive.Show(); CloseAction(); }
internal void Navigate(ModesEnum mode) { switch (mode) { case ModesEnum.SignIn: _contentWindow.ContentControl.Content = signInView ?? (signInView = new SignInView()); break; case ModesEnum.SignUp: _contentWindow.ContentControl.Content = signUpView ?? (signUpView = new SignUpView()); break; case ModesEnum.Tree: _contentWindow.ContentControl.Content = windowTreeView ?? (windowTreeView = new WindowTreeView()); break; case ModesEnum.Archive: _contentWindow.ContentControl.Content = archiveView ?? (archiveView = new ArchiveView()); break; default: throw new ArgumentOutOfRangeException(nameof(mode), mode, null); } }
internal void Navigate(ModesEnum mode, BaseViewModel viewModel) { switch (mode) { case ModesEnum.Randomizer: _contentWindow.ContentControl.Content = _randomizerView ?? (_randomizerView = new RandomizerView()); break; case ModesEnum.SignIn: _contentWindow.ContentControl.Content = _signInView ?? (_signInView = new SignInView()); break; case ModesEnum.SignUp: _contentWindow.ContentControl.Content = _signUpView ?? (_signUpView = new SignUpView()); break; case ModesEnum.Archive: _contentWindow.ContentControl.Content = _archiveView ?? (_archiveView = new ArchiveView(viewModel)); break; default: throw new ArgumentOutOfRangeException(nameof(mode), mode, null); } }