From dda239ec34d1cd5fddf4442fcb48d6f3614e4b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Marchal?= Date: Fri, 27 Aug 2021 19:49:57 +0200 Subject: [PATCH] Usable sliders for time and volume --- Handlers/MPDHandler.cs | 6 ++++++ Views/MainWindow.xaml | 22 +++++++++++----------- Views/MainWindow.xaml.cs | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/Handlers/MPDHandler.cs b/Handlers/MPDHandler.cs index 01f740f..87385b6 100644 --- a/Handlers/MPDHandler.cs +++ b/Handlers/MPDHandler.cs @@ -287,6 +287,12 @@ namespace unison await _mpd.MpdSetVolume(value); } + public async void SetTime(int value) + { + if (!IsBusy) + await _mpd.MpdPlaybackSeek(_mpd.MpdCurrentSong.Id, value); + } + public bool IsPlaying() { return _currentStatus?.MpdState == MPDCtrl.Models.Status.MpdPlayState.Play; diff --git a/Views/MainWindow.xaml b/Views/MainWindow.xaml index 18d5904..e90289b 100644 --- a/Views/MainWindow.xaml +++ b/Views/MainWindow.xaml @@ -33,48 +33,48 @@ - + - - - - + - - - - @@ -99,7 +99,7 @@ - --> -