예제 #1
0
 public static async void PreviousTrack()
 {
     if (m_playbackService == null)
     {
         Tracer.Error("playback is null."); return;
     }
     await m_playbackService.PlayPreviousAsync();
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
        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();
            }
        }
예제 #4
0
        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();
        }
예제 #5
0
        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);
                }
            });
        }