Ejemplo n.º 1
0
        public void ProcessBotPositionOpen(CSoundMessage soundMessage)
        {
            string botName = soundMessage.param1;


            Regex newReg = new Regex(@"[\w\W]*_([\w\W]*)");
            Match m      = newReg.Match(botName);

            if (m.Groups.Count > 1)
            {
                botName = m.Groups[1].ToString();
                string fn = m_botDir + "\\" + botName + ".wav";
                if (File.Exists(fn))
                {
                    m_soundPlayer.SoundLocation = fn;
                    m_soundPlayer.PlaySync();
                }
            }
            else
            {
                return;
            }
            string isin = soundMessage.param2;

            newReg = new Regex(@"([\w\W]*)\-[\w\W]*");
            m      = newReg.Match(isin);
            if (m.Groups.Count > 1)
            {
                isin = m.Groups[1].ToString();
                string fn = m_isinDir + "\\" + isin + ".wav";
                if (File.Exists(fn))
                {
                    m_soundPlayer.SoundLocation = fn;
                    m_soundPlayer.PlaySync();
                }
            }
            else
            {
                return;
            }
        }
Ejemplo n.º 2
0
 public void PlaySound(CSoundMessage msg)
 {
     m_queueSoundMsg.Add(msg);
 }