Exemple #1
0
        private void WebSearch_Recognized(object sender, SpeechRecognizedEventArgs e)
        {
            string speech = e.Result.Text;

            int i = 0;

            try
            {
                foreach (string line in ArrayWebSearchCommands)
                {
                    if (line == speech)
                    {
                        Decca.SpeakAsync(ArrayWebKeywordSearch[i]);
                        keywordstxt.Text = ArrayWebKeywordSearch[i];
                        SearchBtn.PerformClick();
                    }
                    i += 1;
                }
            }
            catch (Exception ex)
            {
                i += 1;
                Decca.SpeakAsync("Please check the " + speech + " web command on line " + i + ". It appears to be missing a proper response or web key words. " + ex.Message);
            }
        }
Exemple #2
0
 void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         SearchBtn.PerformClick();
     }
 }
Exemple #3
0
 private void SearchTBox_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         SearchBtn.PerformClick();
     }
 }
 private void TotalSalesInquiry_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.F)
     {
         SearchBtn.PerformClick();
     }
     else if (e.Control && e.KeyCode == Keys.P)
     {
         PrintBtn.PerformClick();
     }
 }
Exemple #5
0
        private void DeleteBtn_Click(object sender, EventArgs e)
        {
            var item = OrdersLV.SelectedItems[0];

            OrdersLV.Items.Clear();
            int countrows = 0;

            for (; ; countrows++)
            {
                if (worksheet.Cells[countrows + 1, 1].Value == null)
                {
                    break;
                }
            }
            int index = -1;

            for (int i = 1; i <= countrows; i++)
            {
                DateTime     datecur = (DateTime)worksheet.Cells[i, 5].Value;
                string       datestr = $"{datecur.Day}.{datecur.Month}.{datecur.Year}";
                ListViewItem row     = new ListViewItem(worksheet.Cells[i, 1].Value.ToString());   //name
                row.SubItems.AddRange(new[] {
                    new ListViewItem.ListViewSubItem(row, worksheet.Cells[i, 2].Value.ToString()), //from
                    new ListViewItem.ListViewSubItem(row, worksheet.Cells[i, 3].Value.ToString()), //to
                    new ListViewItem.ListViewSubItem(row, worksheet.Cells[i, 4].Value.ToString()), //num
                    new ListViewItem.ListViewSubItem(row, datestr)                                 //date
                });
                OrdersLV.Items.Add(row);
                bool pure = true;
                for (int j = 0; j < 5; j++)
                {
                    pure = item.SubItems[j].Text == row.SubItems[j].Text;
                }
                if (pure)
                {
                    index = OrdersLV.Items.Count - 1;
                }
            }
            worksheet.DeleteRow(index + 1);
            SearchBtn.PerformClick();
            changed = true;
        }
Exemple #6
0
        private void Process_OutputDataReceived()
        {
            var script   = @"-u C:\Users\DECCACLONE\source\repos\Voice\Voice\Voice.py";
            var filename = @"C:\Users\DECCACLONE\AppData\Local\Programs\Python\Python37-32\python.exe";

            Process proc = new Process();

            proc.StartInfo = new ProcessStartInfo(filename, script)
            {
                RedirectStandardOutput = true,
                UseShellExecute        = false,
                CreateNoWindow         = true
            };
            proc.Start();

            keywordstxt.Text = proc.StandardOutput.ReadToEnd();
            SearchBtn.PerformClick();
            //webbrowser1.Dock = DockStyle.Fill;
            //webbrowser1.Dock = DockStyle.None;
            //webbrowser1.Anchor = AnchorStyles.None;
            //webbrowser1.MaximumSize = new Size(800, 640);
            //Process.Start("https://www.google.com/search?q=" + keywordstxt.Text);
        }
Exemple #7
0
        private void engine_Recognized(object sender, SpeechRecognizedEventArgs e)
        {
            string speech = e.Result.Text;

            switch (speech)
            {
            case "start reading":
                CopyScreenBtn.PerformClick();
                StartBtn.PerformClick();
                break;

            case "read the result":
            case "read the resuls":
            case "whats the result":
            case "whats the results":
                GetResult();
                break;

            case "search":
                SearchBtn.PerformClick();
                break;

            case "pause":
                PauseBtn.PerformClick();
                break;

            case "resume":
                PauseBtn.PerformClick();
                break;

            case "back":
                BackBtn.PerformClick();
                break;

            case "next":
                ForwardBtn.PerformClick();
                break;

            case "stop":
                StopBtn.PerformClick();
                break;

            case "close website search":
                Decca.Speak("Closing Website Reader");
                CloseBtn.PerformClick();
                break;

            case "hide website reader":
                FormBorderStyle = FormBorderStyle.None;
                WindowState     = FormWindowState.Minimized;
                TopMost         = false;
                break;

            case "show website reader":
            case "show website reader again":
                FormBorderStyle = FormBorderStyle.None;
                WindowState     = FormWindowState.Normal;
                TopMost         = true;
                break;

            default:
                break;
            }
            if (speech == "find")
            {
                string Speech = e.Result.Text;
                Qevent = Speech;
                Speech = string.Empty;
                Decca.SpeakAsync("what do you want to search");
                speech = string.Empty;

                Process_OutputDataReceived();
            }
        }
Exemple #8
0
 public void UpdateSearchResult()
 {
     SearchBtn.PerformClick();
 }