Esempio n. 1
0
        // CONVERSATION

        public void frmMain_Load(object sender, EventArgs e)
        {
            R_Speech = new R_Lib.R_Speech(FormControls.getForm <frmMain>().rt_Convo);

            #region setup db connection

            //System.IO.File.Delete(Application.StartupPath + @"\rioDB.sdf"); //Testing script
            #endregion setup db connection

            R_Speech.loadSystemVocabs(); // load rio default commands
            // loadShellGrammar
            ActionResult shellGrammar = R_Speech.loadShellGrammar();
            if (shellGrammar.success)
            {
                if (shellGrammar.msg == "AddCommand")
                {
                    frmCustom cust = new frmCustom();
                    cust.isShown = true;
                    cust.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show(shellGrammar.msg);
            }
            //loadDictationGrammar();
            //R_Speech.R_SpeakAsync("Dictation grammars loaded");

            // load default microphone
            R_Speech.R_recognizer.SetInputToDefaultAudioDevice();
            // sets the program to interpret multiple commands
            R_Speech.R_recognizer.RecognizeAsync(RecognizeMode.Multiple);
        }
Esempio n. 2
0
        public void closeCommandWindow()
        {
            frmCustom cust = FormControls.getForm <frmCustom>();

            cust.isShown          = false;
            cust.tmrSlide.Enabled = true;
        }
Esempio n. 3
0
        public frmCustom()
        {
            InitializeComponent();
            R_Speech = new R_Lib.R_Speech(FormControls.getForm <frmMain>().rt_Convo);
            string StartUpPath = Application.StartupPath;

            db.conn = new SqlCeConnection(db.R_conn_string);
            db.conn.ConnectionString = db.R_conn_string;
            db.R_db_path             = StartUpPath;
        }