private void TimerTick_Tick(object sender, EventArgs e) { if (controlsMouseUpAndDown.IsMouseDown) { soundEngine.Volume = (float)DVolumeSliderpanel.Value / 100; float volume_ = (float)DVolumeSliderpanel.Value; PanelDButtonVolume.SetIconVolume(volume_); settring.Volume = volume_; Save(); //------------ } if (soundEngine.IS_PLAY) { DTimeSliderPanel.CurValue = soundEngine.CurTimeMs; Time.Content = soundEngine.TimeToString(); if (DTimeSliderPanel.CurValue == soundEngine.GetTotalTimeMs) { soundEngine.Stop(); DTimeSliderPanel.CurValue = 0; ButtonPlayPause.SetIconPause(); } } }