コード例 #1
0
        private void FormClipboard_Load(object sender, EventArgs e)
        {
            ui.log("FormClipboard.FormClipboard_Load()");
            this.ActiveControl = tbSpeech;


            rtClipboard.Text = "";
            lblAccepted.Text = "";
        }
コード例 #2
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        private void profileSelectionChangeHandler(object sender, System.EventArgs e)
        {
            ui.log("ProfileHandler.profileSelectionChangeHandler()");
            //cbProfiles.Select(0, 0); // Doesn't work
            //cbProfiles.SelectionLength = 0; // Doesn't work
            ui.getListViewCommands().Focus();

            //Console.WriteLine(cbProfiles.SelectedIndex);
            ProfileVO vo = (ProfileVO)cbProfiles.Items[cbProfiles.SelectedIndex];

            Console.WriteLine(vo.displayName);
            load(vo.displayName);
        }
コード例 #3
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public ProfileHandler(UIForm1 arg)
        {
            ui = arg;
            ui.log("ProfileHandler()");

            cbProfiles = ui.getProfilesCB();
            cbProfiles.SelectionChangeCommitted += new System.EventHandler(profileSelectionChangeHandler);
            getProfiles();
        }
コード例 #4
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public void init()
        {
            ui.log("Recognizer.init()");

            commandHandler = ui.commandHandler;
            grammarHandler = ui.grammarHandler;
            grammarHandler.init();

            // Setup speech recognition engine
            sre = setupSpeechRecognitionEngine();
            sre.MaxAlternates      = 0;
            sre.AudioLevelUpdated += new EventHandler <AudioLevelUpdatedEventArgs>(audioLevelHandler);
            sre.SpeechRecognized  += new EventHandler <SpeechRecognizedEventArgs>(speechRecognititionHandler);



            //setupGrammarAndCommands();

            sre.AudioLevelUpdated += new EventHandler <AudioLevelUpdatedEventArgs>(audioLevelHandler);
        }
コード例 #5
0
        private void cbCommandTypeChangeHandler(object sender, System.EventArgs e)
        {
            ui.log("cbCommandTypeChangeHandler(): cbCommandType.SelectedIndex = " + cbCommandType.SelectedIndex.ToString());
            switch (cbCommandType.SelectedIndex)
            {
            case 0:
                rtInfo.Text = "If you wish to copy & paste text into the active application, use this.";
                break;

            case 1:
                rtInfo.Text = "If you would like to have a single key press injected into the active application, use this.";
                break;

            case 2:
                rtInfo.Text = "If you would like to have text auto typed into the active application, use this.";
                break;

            case 3:
                rtInfo.Text = "If you would like to run an application, use this.";
                break;
            }
        }
コード例 #6
0
 public WindowHandler(UIForm1 arg)
 {
     ui = arg;
     ui.log("WindowHandler()");
 }
コード例 #7
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public Recognizer(UIForm1 arg)
        {
            ui = arg;
            ui.log("Recognizer()");
        }
コード例 #8
0
 public void init()
 {
     ui.log("GrammarHandler.init()");
     //recognizer = ui.recognizer;
     lvCommands = ui.getListViewCommands();
 }
コード例 #9
0
 public GrammarHandler(UIForm1 arg)
 {
     ui = arg;
     ui.log("GrammarHandler()");
 }
コード例 #10
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public CommandHandler(UIForm1 arg)
        {
            ui = arg;
            ui.log("CommandHandler()");
        }