public void GoToPreviousImage() { tb.Transitions.Clear(); playListEngine.GoToPrevious(); PlayImageFile(true, playListEngine.CurrentPlayListItem.Path); lastUpdated = DateTime.Now; tb.Transitions.Add(fadeTransition); }
private void MainWindow_KeyDown(object sender, Avalonia.Input.KeyEventArgs e) { tb.Transitions.Clear(); // Exit on Escape or Control X (Windows and Linux Friendly) if ((e.Key == Avalonia.Input.Key.Escape) || ((e.KeyModifiers == Avalonia.Input.KeyModifiers.Control) && (e.Key == Avalonia.Input.Key.X))) { slideTimer.Stop(); this.Close(); server.Stop(); } if (e.Key == Avalonia.Input.Key.T) { if (mainWindow.Opacity != 1) { mainWindow.Opacity = 1; } else { mainWindow.Opacity = 0; } } if (e.Key == Avalonia.Input.Key.U) { if (mainPanel.Opacity != 1) { mainPanel.Opacity = 1; } else { mainPanel.Opacity = 0; } } if (e.Key == Avalonia.Input.Key.F) { infoBar = InfoBar.FileInfo; } if (e.Key == Avalonia.Input.Key.I) { infoBar = InfoBar.IP; } if (e.Key == Avalonia.Input.Key.C) { infoBar = InfoBar.Clock; } if (e.Key == Avalonia.Input.Key.Right) { frontImage.Transitions.Clear(); backImage.Transitions.Clear(); playListEngine.GoToNext(); PlayImageFile(true); lastUpdated = DateTime.Now; frontImage.Transitions.Add(fadeTransition); backImage.Transitions.Add(fadeTransition); } if (e.Key == Avalonia.Input.Key.Left) { frontImage.Transitions.Clear(); backImage.Transitions.Clear(); playListEngine.GoToPrevious(); PlayImageFile(true); lastUpdated = DateTime.Now; frontImage.Transitions.Add(fadeTransition); backImage.Transitions.Add(fadeTransition); } if (e.Key == Avalonia.Input.Key.H) { tb.Opacity = 0; infoBar = InfoBar.OFF; } UpdateInfoBar(); tb.Transitions.Add(fadeTransition); }