private void PlayMidi(object sender, EventArgs e) { WindowsMediaPlayer wmp = new WindowsMediaPlayer(); wmp.URL = DirectoryWrapper.GetPathCurrentSolution() + "/finalmidi.mid"; wmp.PlayStateChange += new WMPLib._WMPOCXEvents_PlayStateChangeEventHandler(Player_PlayStateChange); }
private void PlaySong() { isPlaying = true; PlaySource = "/Icons/playing.png"; MidiStandardCreator.Create(Measures); Process process = new Process(); process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.EnableRaisingEvents = true; process.Exited += PlayMidi; process.StartInfo.FileName = DirectoryWrapper.GetPathCurrentSolution() + "/CreateMidi.bat"; process.Start(); }