Example #1
0
 /// <summary>
 /// Navigates the specified page view model.
 /// </summary>
 /// <param name="pageViewModel">The page view model.</param>
 public void Navigate(PageViewModelBase pageViewModel)
 {
     if (IsRootPage(pageViewModel))
     {
         ClearHistory();
         _backPage = pageViewModel;
     }
     else
     {
         _navigateHistory.Push(pageViewModel);
         _issueHistory.Push(_actualIssue);
     }
     Current = pageViewModel;
 }
Example #2
0
 /// <summary>
 /// Clears the history.
 /// </summary>
 public void ClearHistory()
 {
     _showHistory.Clear();
     _navigateHistory.Clear();
     _issueHistory.Clear();
     _actualIssue = null;
     _backPage = null;
 }
Example #3
0
 /// <summary>
 /// Determines whether [is root page] [the specified page].
 /// </summary>
 /// <param name="page">The page.</param>
 /// <returns><c>true</c> if [is root page] [the specified page]; otherwise, <c>false</c>.</returns>
 public bool IsRootPage(PageViewModelBase page)
 {
     return page == Dashboard || page == Issues || page == Configuration;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainViewModel" /> class.
 /// </summary>
 /// <param name="board">The board.</param>
 public MainViewModel(Board board)
 {
     _board = board;
     Dashboard = new DashboardViewModel(this, board);
     Issues = new IssuesViewModel(this, board);
     Configuration = new ConfigurationViewModel(this, board);
     CreateIssue = new CreateIssueViewModel(this, board);
     EditIssue = new EditIssueViewModel(this, board);
     ShowIssue = new ShowIssueViewModel(this, board);
     _current = Dashboard;
     _backPage = Dashboard;
     _current.IsNavigated = true;
 }