Example #1
0
 private void NewNotification(string msg)
 {
     BtnChecked.Enabled = true;
     if (_voiceNotify)
     {
         Voice.AddMessage(msg);
     }
     notifyIcon1.ShowBalloonTip(1000, "Notificación del estado de batería", msg, ToolTipIcon.Info);
 }
Example #2
0
 private void BtnRead_Click(object sender, EventArgs e)
 {
     try
     {
         _voice.ChangeCurrentVoice(CbVoices.SelectedItem.ToString());
         _voice.ChangeSyntVolume(TbTestVol.Value);
         _voice.AddMessage(TbTest.Text);
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message, @"Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #3
0
 private void NewNotification(string msg)
 {
     BtnChecked.Enabled = true;
     if (NotifyWind)
     {
         NotifyIcon.ShowBalloonTip(2000, @"Notificación del estado de batería", msg, ToolTipIcon.Warning);
     }
     if (!NotifyVoice)
     {
         return;
     }
     if (!IdleVoiceNotify)
     {
         return;
     }
     //Wait for NotifyWindow sound.
     Thread.Sleep(1000);
     Voice.AddMessage(Battery.Alert != LowBattery ?
                      msg :
                      msg + SpeakLifeRemaining(@"Tiempo Restante"));
 }
Example #4
0
 private void SpeakInfo()
 {
     try
     {
         var msg = $"Batería al {LbNivelCharge.Text}.";
         if (TbLifeRemaining.Text != @"--")
         {
             msg += SpeakLifeRemaining(@" Tiempo restante:");
         }
         Voice.AddMessage(msg);
         if (!IdleVoiceNotify)
         {
             return;
         }
         BtnPause.Enabled = true;
         BtnSpeak.Enabled = false;
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message, @"Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }