示例#1
0
 private void BtnStart_Click(object sender, EventArgs e)
 {
     if (ComCounter == 0)
     {
         System.Windows.Forms.MessageBox.Show("Кончайте!");
         return;
     }
     BtnStart.Visible = false;
     BtnStop.Visible  = true;
     SoundProcessing.Start();
 }
示例#2
0
        private void BtnStart_Click(object sender, EventArgs e)
        {
            Logger.Add("Recognition attempt");

            if (Speech.Commands.Count == 0)
            {
                Logger.Add("Recognition is impossible. Training wasn't made.");
                tbxLogs.Text += "У-ля-ля, всё печально. Сначала требуется обучить систему!\r\n";
            }
            else
            {
                BtnStart.Visible = false;
                BtnStop.Visible  = true;
                Logger.Add("Recognition start");
                inProcess = true;
                SoundProcessing.Start();
            }
            tbxLogs.SelectionStart = tbxLogs.Text.Length;
            tbxLogs.ScrollToCaret();
        }