Example #1
0
        public static void PlaySound(SoundFileNameE soundFileID)
        {
            player.SoundLocation = GetSounfFilePath(soundFileID);
            Thread th = new Thread(Play);

            th.Start();
        }
Example #2
0
        private static string GetSounfFilePath(SoundFileNameE soundFileID)
        {
            switch (soundFileID)
            {
            case SoundFileNameE.Capture:
                return(Ap.FileCaptureWav);

            case SoundFileNameE.Capture2:
                return(Ap.FileCapture2Wav);

            case SoundFileNameE.Illegal:
                return(Ap.FileIllegalWav);

            case SoundFileNameE.Move:
                return(Ap.FileMove2Wav);

            case SoundFileNameE.Ring:
                return(Ap.FileRingWav);

            case SoundFileNameE.SetPieces:
                return(Ap.FileSetPiecesWav);

            case SoundFileNameE.SetPieces2:
                return(Ap.FileSetPieces2Wav);

            case SoundFileNameE.WrongMove:
                return(Ap.FileWrongMoveWav);

            default: break;
            }
            return("");
        }
Example #3
0
        public static void PlaySound(SoundFileNameE soundFileID)
        {
            if (Ap.Options.DoMultimediaBoardSounds)
            {
                player.SoundLocation = GetSounfFilePath(soundFileID);

                if (UFile.Exists(player.SoundLocation))
                {
                    Thread th = new Thread(Play);
                    th.Start();
                }
            }
        }