This repository has been archived on 2024-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
CDSAE3/CDSAE3_Lian_Lian_Kan/Forms/Audio_player.cs

56 lines
1.4 KiB
C#
Raw Normal View History

2024-03-29 06:18:38 +00:00
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();
}
}
}