public static void Pause() { if (m_playbackService == null) { Tracer.Error("playback is null."); return; } m_playbackService.PlayOrPauseAsync(); }
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); } }); }