@@ -84,16 +84,30 @@ private void Looper()
8484 private void UpdateSongPosition ( )
8585 {
8686 Progress_Slider . Value = player . controls . currentPosition ;
87- if ( player . controls . currentPosition == 0 ) { Current_Time . Text = "00:00" ; } else { Current_Time . Text = player . controls . currentPositionString ; }
87+
88+ if ( player . controls . currentPosition == 0 ) {
89+ Current_Time . Text = "00:00" ;
90+ }
91+ else {
92+ Current_Time . Text = player . controls . currentPositionString ;
93+ }
94+
8895 Progress_Slider . Maximum = player . currentMedia . duration ;
8996 Max_Time . Text = player . currentMedia . durationString ;
9097 }
9198
9299
93100 private void VolumeUpdate ( )
94101 {
95- player . settings . volume = Convert . ToInt32 ( volume ) ; //Updating the players volume
96- Volume_Slider . Value = volume ; //Setting the sliders pos = to the volume
102+ if ( Mute_Toggle . IsChecked == false )
103+ {
104+ player . settings . volume = Convert . ToInt32 ( volume ) ; //Updating the players volume
105+ Volume_Slider . Value = volume ; //Setting the sliders pos = to the volume
106+ }
107+ else
108+ {
109+ player . settings . volume = Convert . ToInt32 ( 0 ) ;
110+ }
97111 }
98112
99113 private void Pause ( object sender , RoutedEventArgs e )
@@ -127,7 +141,10 @@ private void Mute(object sender, RoutedEventArgs e)
127141 }
128142 else
129143 {
130- volume = prevVolume ; //unmuting
144+ if ( prevVolume == Volume_Slider . Value ) {
145+ volume = prevVolume ; //unmuting
146+ }
147+
131148 Mute_Toggle . Content = "Mute" ;
132149 }
133150
0 commit comments