/// <summary>
        /// Init the controls in the dialog box based on
        /// settings
        /// </summary>
        /// <param name="prefs">ACAT settings</param>
        private void initWidgetSettings(ACATPreferences prefs)
        {
            var rootWidget = _dialogCommon.GetRootWidget();

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbDynamicLearning.Name, prefs.EnableWordPredictionDynamicModel);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbUseCorpus.Name, prefs.EnableWordPredictionCorpusModel);
            WidgetUtils.SetSliderState(rootWidget, tbWordCount.Name, prefs.WordPredictionCount, WidgetUtils.SliderUnitsOnes);
        }
Example #2
0
        /// <summary>
        /// Sets the appropriate radio button depending on the
        /// abbreviation mode
        /// </summary>
        /// <param name="widgetName">name of the widget</param>
        /// <param name="choice">choice made</param>
        private void radioSetAbbreviationMode(String widgetName, Boolean choice)
        {
            Widget rootWidget = _dialogCommon.GetRootWidget();

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbTypeSpoken.Name, false);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbTypeWritten.Name, false);

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, widgetName, choice);
        }
Example #3
0
        /// <summary>
        /// Set the state of all the controls based on the
        /// settings
        /// </summary>
        /// <param name="prefs">ACAT settings</param>
        private void initWidgetSettings(ACATPreferences prefs)
        {
            Widget rootWidget = _dialogCommon.GetRootWidget();

            WidgetUtils.SetSliderState(rootWidget, tbRotatingSpeed.Name, prefs.MouseRadarRotatingSpeed, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbRotatingSweeps.Name, prefs.MouseRadarRotatingSweeps, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbRadialSpeed.Name, prefs.MouseRadarRadialSpeed, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbRadialSweeps.Name, prefs.MouseRadarRadialSweeps, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbLineWidth.Name, prefs.MouseRadarLineWidth, WidgetUtils.SliderUnitsOnes);

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbStartFromLastCursorPos.Name, prefs.MouseRadarStartFromLastCursorPos);
        }
Example #4
0
        /// <summary>
        /// Set the state of all the controls based on the
        /// settings
        /// </summary>
        /// <param name="prefs">ACAT settings</param>
        private void initWidgetSettings(ACATPreferences prefs)
        {
            Widget rootWidget = _dialogCommon.GetRootWidget();

            WidgetUtils.SetSliderState(rootWidget, tbVerticalSpeed.Name, prefs.MouseGridVerticalSpeed, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbVerticalSweeps.Name, prefs.MouseGridVerticalSweeps, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbHorizontalSpeed.Name, prefs.MouseGridHorizontalSpeed, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbHorizontalSweeps.Name, prefs.MouseGridHorizontalSweeps, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbLineWidth.Name, prefs.MouseGridLineWidth, WidgetUtils.SliderUnitsOnes);

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbStartFromLastCursorPos.Name, prefs.MouseGridStartFromLastCursorPos);
        }
Example #5
0
        /// <summary>
        /// Initialize the state of all the widgets in the form
        /// with values from the settings.
        /// </summary>
        /// <param name="prefs">ACAT Preferences</param>
        private void initWidgetSettings(ACATPreferences prefs)
        {
            var rootWidget = _dialogCommon.GetRootWidget();

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbScannerAutoSaveLastPosition.Name, prefs.AutoSaveScannerLastPosition);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbHideScannersOnIdle.Name, prefs.HideScannerOnIdle);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbShowGlass.Name, prefs.EnableGlass);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbShowTalkWindowOnStartup.Name, prefs.ShowTalkWindowOnStartup);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbRetainTalkWindowText.Name, prefs.RetainTalkWindowContentsOnHide);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbEnableDebugTraceLogging.Name, prefs.DebugMessagesEnable);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbEnableAuditLog.Name, prefs.AuditLogEnable);
            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbExpandAbbreviationsOnSeparator.Name, prefs.ExpandAbbreviationsOnSeparator);
        }
Example #6
0
        /// <summary>
        /// Initializes the state of all the widgets in the
        /// dialog box.
        /// </summary>
        private void initWidgetSettings()
        {
            Widget rootWidget = _dialogCommon.GetRootWidget();

            _mode = InputAbbreviation.Mode;
            WidgetUtils.SetCheckBoxWidgetState(
                rootWidget,
                pbTypeSpoken.Name,
                _mode == Abbreviation.AbbreviationMode.Speak || _mode == Abbreviation.AbbreviationMode.None);

            WidgetUtils.SetCheckBoxWidgetState(
                rootWidget,
                pbTypeWritten.Name, _mode == Abbreviation.AbbreviationMode.Write);

            Windows.SetText(tbAbbreviation, InputAbbreviation.Mnemonic);
            tbAbbreviation.Select(tbAbbreviation.Text.Length, 0);
            Windows.SetText(tbExpansion, Regex.Replace(InputAbbreviation.Expansion, "\n", "\r\n"));
            tbExpansion.Select(tbExpansion.Text.Length, 0);
        }
Example #7
0
        /// <summary>
        /// Initialize the controls on the form based on
        /// the corresponding values in the preferences
        /// </summary>
        /// <param name="prefs">ACAT preferences</param>
        private void initWidgetSettings(ACATPreferences prefs)
        {
            // TOGGLE IMAGE BUTTON KEYS USED FOR BOTTOM-LEFT PANEL
            var rootWidget = _dialogCommon.GetRootWidget();

            WidgetUtils.SetCheckBoxWidgetState(rootWidget, pbSelectingClick.Name, prefs.SelectClick);

            WidgetUtils.SetSliderState(rootWidget, tbEveryHalf.Name, prefs.HalfScanIterations, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbEveryRow.Name, prefs.RowScanIterations, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbEveryColumn.Name, prefs.ColumnScanIterations, WidgetUtils.SliderUnitsOnes);
            WidgetUtils.SetSliderState(rootWidget, tbWordPrediction.Name, prefs.WordPredictionScanIterations, WidgetUtils.SliderUnitsOnes);

            WidgetUtils.SetSliderState(rootWidget, tbAcceptTime.Name, prefs.AcceptTime, WidgetUtils.SliderUnitsThousandths);
            WidgetUtils.SetSliderState(rootWidget, tbSteppingTime.Name, prefs.SteppingTime, WidgetUtils.SliderUnitsThousandths);
            WidgetUtils.SetSliderState(rootWidget, tbHesitateTime.Name, prefs.HesitateTime, WidgetUtils.SliderUnitsThousandths);
            WidgetUtils.SetSliderState(rootWidget, tbWordListHesitateTime.Name, prefs.WordPredictionHesitateTime, WidgetUtils.SliderUnitsThousandths);
            WidgetUtils.SetSliderState(rootWidget, tbTabScanTime.Name, prefs.TabScanTime, WidgetUtils.SliderUnitsThousandths);
            WidgetUtils.SetSliderState(rootWidget, tbFirstRepeatTime.Name, prefs.FirstRepeatTime, WidgetUtils.SliderUnitsThousandths);
        }