c#写的一个音乐播放器的程序每行代码的都什么意思
privateOpenFileDialogopenFileDialog=null;privateMediaPlayermediaPlayer=null;privateTi...
private OpenFileDialog openFileDialog = null;
private MediaPlayer mediaPlayer = null;
private Timer timer = null;
private int playSeconds = 0;
private int playPosition = 0;
private bool isPlaying = false;
private bool isOpened = false;
private delegate void TimerDispatcherDelegate();
public MainWindow()
{
openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Music File|*.mp3";
openFileDialog.FileOk += fileOK;
mediaPlayer = new MediaPlayer();
mediaPlayer.MediaOpened += mediaOpen;
mediaPlayer.MediaEnded += replay;
InitializeComponent();
getVolImg();
} 展开
private MediaPlayer mediaPlayer = null;
private Timer timer = null;
private int playSeconds = 0;
private int playPosition = 0;
private bool isPlaying = false;
private bool isOpened = false;
private delegate void TimerDispatcherDelegate();
public MainWindow()
{
openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Music File|*.mp3";
openFileDialog.FileOk += fileOK;
mediaPlayer = new MediaPlayer();
mediaPlayer.MediaOpened += mediaOpen;
mediaPlayer.MediaEnded += replay;
InitializeComponent();
getVolImg();
} 展开
2个回答
2014-06-03
展开全部
openFileDialog = new OpenFileDialog(); //调用打开文件对象
openFileDialog.Filter = "Music File|*.mp3"; // 文件类型过滤为mp3
openFileDialog.FileOk += fileOK; //点击OK执行..
mediaPlayer = new MediaPlayer(); //系统自带播放对象
mediaPlayer.MediaOpened += mediaOpen;
mediaPlayer.MediaEnded += replay;
InitializeComponent();// 初始化
getVolImg();
openFileDialog.Filter = "Music File|*.mp3"; // 文件类型过滤为mp3
openFileDialog.FileOk += fileOK; //点击OK执行..
mediaPlayer = new MediaPlayer(); //系统自带播放对象
mediaPlayer.MediaOpened += mediaOpen;
mediaPlayer.MediaEnded += replay;
InitializeComponent();// 初始化
getVolImg();
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询