NavigationCommands.cs 935 B

1234567891011121314151617181920212223242526272829303132
  1. using InvestTracker.Views;
  2. using Prism.Commands;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace InvestTracker.Commands
  9. {
  10. /// <summary>
  11. /// Глобальные команды для навигации
  12. /// </summary>
  13. static class NavigationCommands
  14. {
  15. /// <summary>
  16. /// При нажатии на кнопку подсистемы в WelcomeView переходит в страницу
  17. /// </summary>
  18. public static DelegateCommand NavigateFrame { get; set; }
  19. static NavigationCommands()
  20. {
  21. NavigateFrame = new DelegateCommand(NavigateFrameExecute);
  22. }
  23. private static void NavigateFrameExecute()
  24. {
  25. var MainWindow = App.Current.MainWindow as MainWindow;
  26. MainWindow.MainFrame.Navigate(new EmployeeBrowseView());
  27. }
  28. }
  29. }