public override bool play(string path, bool isName) { /* try * {*/ if (isName) { path = platformSpec.main.appPath + "\\sounds\\" + path; } OpenNETCF.Multimedia.Audio.Player p = new OpenNETCF.Multimedia.Audio.Player(); System.IO.Stream s = new System.IO.FileStream(path, System.IO.FileMode.Open); p.DonePlaying += new OpenNETCF.Multimedia.Audio.WaveDoneHandler(p_DonePlaying); p.Play(s); s.Close(); list.Add(p); return(true); /* } * catch * { * return false; * }*/ }
public override bool play(string path, bool isName) { /* try {*/ if ( isName ) path = platformSpec.main.appPath + "\\sounds\\" + path; OpenNETCF.Multimedia.Audio.Player p = new OpenNETCF.Multimedia.Audio.Player(); System.IO.Stream s = new System.IO.FileStream( path, System.IO.FileMode.Open ); p.DonePlaying += new OpenNETCF.Multimedia.Audio.WaveDoneHandler(p_DonePlaying); p.Play( s ); s.Close(); list.Add( p ); return true; /* } catch { return false; }*/ }