Beispiel #1
0
 private void BtnBack_Click(object sender, RoutedEventArgs e)
 {
     NavigationManager.Back();
 }
Beispiel #2
0
 private void Window_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Escape)
     {
         if (_isFullscreen)
         {
             this.ExitFullscreen();
         }
     }
     else if (e.Key == Key.B)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             NavigationManager.Back();
         }
     }
     else if (e.Key == Key.F)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             NavigationManager.Forward();
         }
     }
     else if (e.Key == Key.T)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             _isUglyTheme = !_isUglyTheme;
             if (_isUglyTheme)
             {
                 NavigationManager.Navigate("TileMainPage.xaml");
             }
             else
             {
                 NavigationManager.Navigate("RichMainPage.xaml");
             }
         }
     }
     else if (e.Key == Key.P)
     {
         if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
         {
             TryPrint();
         }
     }
     else if (e.Key == Key.C)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             MainWindow.ImagePath = "Resources/green/";
             NavigationManager.Navigate("TileMainPage.xaml");
         }
     }
     else if (e.Key == Key.V)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             MainWindow.ImagePath = "Resources/";
             NavigationManager.Navigate("TileMainPage.xaml");
         }
     }
     else if (e.Key == Key.S)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             Commands.SaveAs();
         }
     }
     else if (e.Key == Key.O)
     {
         if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
         {
             Commands.Open();
         }
     }
 }