Beispiel #1
0
        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);
        }
Beispiel #2
0
        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();
        }