Пример #1
0
        internal static void PlaySound(ShareUtils.SoundType soundType)
        {
            Proshot.ResourceManager.Resourcer rcMngr = new Proshot.ResourceManager.Resourcer(Proshot.ResourceManager.LoadMethod.FromCallingCode);
            System.Media.SoundPlayer          player = new System.Media.SoundPlayer();
            switch (soundType)
            {
            case (ShareUtils.SoundType.NewClientEntered):
                player.Stream = rcMngr.GetResourceStream("Knock.wav");
                player.Play();
                break;

            case (ShareUtils.SoundType.ClientExit):
                player.Stream = rcMngr.GetResourceStream("Door.wav");
                player.Play();
                break;

            case (ShareUtils.SoundType.NewMessageReceived):
                player.Stream = rcMngr.GetResourceStream("Message.wav");
                player.Play();
                break;

            case (ShareUtils.SoundType.NewMessageWithPow):
                player.Stream = rcMngr.GetResourceStream("Pow.wav");
                player.Play();
                break;
            }
        }
Пример #2
0
 internal static void PlaySound(ShareUtils.SoundType soundType)
 {
     //Server.ResourceManager.Resourcer rcMngr = new Server.ResourceManager.Resourcer(Server.ResourceManager.LoadMethod.FromCallingCode);
     //System.Media.SoundPlayer player = new System.Media.SoundPlayer();
     //switch ( soundType )
     //{
     //    case ( ShareUtils.SoundType.NewClientEntered ):
     //        player.Stream = rcMngr.GetResourceStream("Knock.wav");
     //        player.Play();
     //        break;
     //    case ( ShareUtils.SoundType.ClientExit ):
     //        player.Stream = rcMngr.GetResourceStream("Door.wav");
     //        player.Play();
     //        break;
     //    case ( ShareUtils.SoundType.NewMessageReceived ):
     //        player.Stream = rcMngr.GetResourceStream("Message.wav");
     //        player.Play();
     //        break;
     //    case ( ShareUtils.SoundType.NewMessageWithPow ):
     //        player.Stream = rcMngr.GetResourceStream("Pow.wav");
     //        player.Play();
     //        break;
     //}
 }