using CDSAE3_Lian_Lian_Kan; using CDSAE3_Lian_Lian_Kan.Properties; using NAudio.Wave; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window; namespace CDSAE3_Lian_Lian_Kan.Forms { public partial class Audio_player : UserControl { public Audio_player() { InitializeComponent(); } bool play_state = false; private void sp_Button_Click(object sender, EventArgs e) { if (!play_state) play(); else pause(); play_state = !play_state; } private void play() { Settings.audio_Processer.resume_song(); sp_Button.Image = Resources.pause; } private void pause() { Settings.audio_Processer.pause_song(); sp_Button.Image = Resources.play_buttton; } private void last_Click(object sender, EventArgs e) { Settings.audio_Processer.last_song(); play(); } private void next_Click(object sender, EventArgs e) { Settings.audio_Processer.next_song(); play(); } } }