public void SetCurSound(DPanelSound dPanelSound) { soundEngine.Sound(dPanelSound.Path); Time.Content = soundEngine.TimeToString(); DTimeSliderPanel.Maximum = soundEngine.GetTotalTimeMs; ButtonPlayPause.SetIconPause(); if (soundEngine.IS_PLAY == true) { soundEngine.HardPlay(); ButtonPlayPause.SetIconPlay(); } CurnameSound.Content = soundEngine.Name; }
// play \ pause private void DButtonPlayPause_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (soundEngine.IS_PLAY == false) { soundEngine.Play(); ButtonPlayPause.SetIconPlay(); } else { soundEngine.Pause(); ButtonPlayPause.SetIconPause(); } }
private void DButtonBackto_PreviewMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { // l int c_id = cur_list_sound.FindString(soundEngine.file_) - 1; soundEngine.Sound(cur_list_sound.GetStrID(c_id)); Time.Content = soundEngine.TimeToString(); DTimeSliderPanel.Maximum = soundEngine.GetTotalTimeMs; ButtonPlayPause.SetIconPause(); if (soundEngine.IS_PLAY == true) { soundEngine.HardPlay(); ButtonPlayPause.SetIconPlay(); } CurnameSound.Content = soundEngine.Name; ButtonPlayPause.SetIconPause(); }