public static async void NextTrack() { if (m_playbackService == null) { Tracer.Error("playback is null."); return; } await m_playbackService.PlayNextAsync(); }
private async void Shell_MouseDown(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.XButton1) { await playbackService.PlayPreviousAsync(); } else if (e.ChangedButton == MouseButton.XButton2) { await playbackService.PlayNextAsync(); } }
private async void Window_MouseDown(object sender, MouseButtonEventArgs e) { this.WindowGrid.Focus(); if (e.ChangedButton == MouseButton.XButton1) { await playbackService.PlayPreviousAsync(); } else if (e.ChangedButton == MouseButton.XButton2) { await playbackService.PlayNextAsync(); } }
public ShellViewModel(IPlaybackService playbackService, ITaskbarService taskbarService, IDialogService dialogService, IJumpListService jumpListService, IFileService fileService, IUpdateService updateService) { this.TaskbarService = taskbarService; dialogService.DialogVisibleChanged += isDialogVisible => { this.IsOverlayVisible = isDialogVisible; }; this.PlayPreviousCommand = new DelegateCommand(async() => await playbackService.PlayPreviousAsync()); this.PlayNextCommand = new DelegateCommand(async() => await playbackService.PlayNextAsync()); this.PlayOrPauseCommand = new DelegateCommand(async() => await playbackService.PlayOrPauseAsync()); this.LoadedCommand = new DelegateCommand(() => fileService.ProcessArguments(Environment.GetCommandLineArgs())); // Populate the JumpList jumpListService.PopulateJumpListAsync(); }
public ShellViewModel(IPlaybackService playbackService, ITaskbarService taskbarService, IDialogService dialogService) { this.TaskbarService = taskbarService; this.dialogService = dialogService; this.dialogService.DialogVisibleChanged += isDialogVisible => { this.IsOverlayVisible = isDialogVisible; }; this.PlayPreviousCommand = new DelegateCommand(async() => await playbackService.PlayPreviousAsync()); this.PlayNextCommand = new DelegateCommand(async() => await playbackService.PlayNextAsync()); this.PlayOrPauseCommand = new DelegateCommand(async() => await playbackService.PlayOrPauseAsync()); this.ShowLogfileCommand = new DelegateCommand(() => { try { Actions.TryViewInExplorer(LogClient.Logfile()); } catch (Exception ex) { LogClient.Error("Could not view the log file {0} in explorer. Exception: {1}", LogClient.Logfile(), ex.Message); } }); }