Example #1
0
        private void FormOptions_Load(object sender, EventArgs e) {

            Keys[] keyDataSource = (Keys[])Enum.GetValues(typeof(Keys)).Cast<Keys>();
            comboBox2.DataSource = keyDataSource;

            recognitionLanguageComboBox.DataSource = getInstalledRecognitionLanguages();

            opt = new Options();
            saveOptions = new Options(opt);

            checkBox1.Checked = opt.toggleListening;
            comboBox2.SelectedItem = opt.key;
            richTextBox1.Text = opt.answer;
            trackBar1.Value = opt.threshold;
            label5.Text = Convert.ToString(opt.threshold);
            recognitionLanguageComboBox.SelectedItem = opt.language;
            recognitionLanguageWarning.Visible = false;

            if (checkBox1.Checked) {
                comboBox2.Enabled = true;
                richTextBox1.Enabled = true;
            }
            else {
                comboBox2.Enabled = false;
                richTextBox1.Enabled = false;
            }

        }
Example #2
0
 public Options(Options o) {
     this.toggleListening = o.toggleListening;
     this.key = o.key;
     this.answer = o.answer;
     this.threshold = o.threshold;
     this.language = o.language;
 }
Example #3
0
        public Form1()
        {
            currentOptions = new Options();

            InitializeComponent();
            initialyzeSpeechEngine();

            myWindows = new List<string>();
            refreshProcessesList();

            fetchProfiles();

            System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
            System.Reflection.AssemblyName assemblyName = assembly.GetName();
            Version version = assemblyName.Version;
            this.Text += " version : " + version.ToString();

            refreshSettings();
        }
Example #4
0
		public Main()
		{
			_CurrentOptions = new Options();

			InitializeComponent();
			initialyzeSpeechEngine();

			_WindowsList = new List<string>();
			refreshProcessesList();

			fetchProfiles();

			_GlobalHotkey = new GlobalHotkey(0x0004, Keys.None, this);

			System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
			System.Reflection.AssemblyName assemblyName = assembly.GetName();
			Version version = assemblyName.Version;
			this.Text += " version : " + version.ToString();

			refreshSettings();

			this._OKToSave = true;
		}
Example #5
0
 private void button2_Click(object sender, EventArgs e) {
     opt = saveOptions;
     this.Close();
 }
Example #6
0
        private void advancedSettingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormOptions formOptions = new FormOptions();
            formOptions.ShowDialog();

            currentOptions = formOptions.opt;
            refreshSettings();
        }