public MP3Player() { InitializeComponent(); mplayer = new Media.MP3Player(); mplayer.OpenFile += new Media.MP3Player.OpenFileEventHandler(mplayer_OpenFile); mplayer.PlayFile += new Media.MP3Player.PlayFileEventHandler(mplayer_PlayFile); mplayer.StopFile += new Media.MP3Player.StopFileEventHandler(mplayer_StopFile); mplayer.PauseFile += new Media.MP3Player.PauseFileEventHandler(mplayer_PauseFile); }
public void initMedia() { try { mplayer = new Media.MP3Player(); pnlMediaControlPanel.Visible = false; this.Height -= pnlMediaControlPanel.Height; CommandHistory.Text += "SpeechSynthesizer Starting....OK!\r\n"; } catch (Exception e) { CommandHistory.Text += "init Media Error : " + e.ToString() + "\r\n"; } }