コード例 #1
0
ファイル: OpenPlayer.cs プロジェクト: jithuin/infogeezer
        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;
             *      }*/
        }
コード例 #2
0
ファイル: OpenPlayer.cs プロジェクト: jithuin/infogeezer
		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;
			}*/
		}