예제 #1
0
 private void Form1_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode.ToString() == keyBind)
     {
         micMute.UnMuteMic();
     }
 }
예제 #2
0
        public void say(String h)
        {
            if (pockey == true)
            {
                if (isitonce == false)
                {
                    bfr = DateTime.Now;
                }
                DateTime afr = new DateTime();
                afr = DateTime.Now;
                int safr = afr.Second;
                int sbfr = bfr.Second;
                if (safr - sbfr >= 7)
                {
                    italk = false;
                    Console.WriteLine(safr + "and" + sbfr);
                }
                else if (safr - sbfr <= 6 && safr - sbfr >= 0)
                {
                    isitonce = true;
                    Console.WriteLine(safr + "and" + sbfr);
                }
                else
                {
                    safr    += 60;
                    isitonce = true;
                }
                bfr = DateTime.Now;
                WindowsMicrophoneMuteLibrary.WindowsMicMute micMute = new WindowsMicrophoneMuteLibrary.WindowsMicMute();
                micMute.MuteMic();
                pockey = false;
                s.Speak(h);
                textBox2.AppendText(h + "\n");
                micMute.UnMuteMic();
                // if (isitonce == false)
                //{



                //}
                //secb = bfr.Second;
                pockey = true;

                /*seca = afr.Second;
                 * if (seca - secb >= 10)
                 * {
                 *  italk = false;
                 *
                 * }
                 * else if (seca - secb <= 9)
                 * {
                 *  isitonce = true;
                 * }
                 * else
                 * {
                 *  seca += 60;
                 *
                 * }*/
            }
        }
예제 #3
0
        private void btnChamada_Click(object sender, EventArgs e)
        {
            // inicia o timer
            timerLocucao.Start();
            //mostra o label
            lblLocucao.Visible = true;
            // realiza o controle das musicas
            ControlaMusica(statusMusic);

            WindowsMicrophoneMuteLibrary.WindowsMicMute micMute = new WindowsMicrophoneMuteLibrary.WindowsMicMute();
            micMute.UnMuteMic();
        }
예제 #4
0
 static void Main(string[] args)
 {
     Console.WriteLine("Preparing Windows Microphone Mute Library...");
     WindowsMicrophoneMuteLibrary.WindowsMicMute micMute = new WindowsMicrophoneMuteLibrary.WindowsMicMute();
     Console.WriteLine("We will now mute the microphone, press enter to mute.");
     Console.ReadLine();
     micMute.MuteMic();
     Console.WriteLine("Microphone should now be muted, press enter to unmute.");
     Console.ReadLine();
     micMute.UnMuteMic();
     Console.WriteLine("Microphone should now be unmuted, press enter to quit.");
     Console.ReadLine();
 }
예제 #5
0
 public void UnmuteMic(object sender, ElapsedEventArgs e)
 {
     mMicrophoneMuter.UnMuteMic();
 }
예제 #6
0
        private void timerLocucao_Tick(object sender, EventArgs e)
        {
            string vlFinal = "01:00";

            WindowsMicrophoneMuteLibrary.WindowsMicMute micMute = new WindowsMicrophoneMuteLibrary.WindowsMicMute();

            if (statusLocucao < 60)
            {
                statusLocucao = statusLocucao + 1;
                lblLocucao.Text = "Parar Locução \n" + TimeSpan.FromSeconds(statusLocucao).ToString("mm\\:ss") + " até " + vlFinal;
            }
            else
            {
                lblLocucao.Visible = false;
                lblLocucao.Text = "";
                //para a locução
                timerLocucao.Stop();
                statusLocucao = 0;
                micMute.UnMuteMic();
                //retorna a música caso esteja tocando
                RetornaMusica(RetMusic);
            }
        }
예제 #7
0
        private void lblLocucao_Click(object sender, EventArgs e)
        {
            WindowsMicrophoneMuteLibrary.WindowsMicMute micMute = new WindowsMicrophoneMuteLibrary.WindowsMicMute();

            lblLocucao.Visible = false;
            lblLocucao.Text = "";
            //para a locução
            timerLocucao.Stop();
            statusLocucao = 0;
            micMute.UnMuteMic();
            //retorna a música caso esteja tocando
            RetornaMusica(RetMusic);
        }