Ejemplo n.º 1
0
        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;
             *      }*/
        }
Ejemplo n.º 2
0
		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;
			}*/
		}