예제 #1
0
        /// <summary>
        /// Initializes 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();

            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbScannerAutoSaveLastPosition.Name))).SetState(prefs.AutoSaveScannerLastPosition);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbHideScannersOnIdle.Name))).SetState(prefs.HideScannerOnIdle);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbShowGlass.Name))).SetState(prefs.EnableGlass);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbShowTalkWindowOnStartup.Name))).SetState(prefs.ShowTalkWindowOnStartup);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbRetainTalkWindowText.Name))).SetState(prefs.RetainTalkWindowContentsOnHide);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbEnableDebugTraceLogging.Name))).SetState(prefs.DebugMessagesEnable);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbEnableAuditLog.Name))).SetState(prefs.AuditLogEnable);
            ((CheckBoxWidget)(rootWidget.Finder.FindChild(pbExpandAbbreviationsOnSeparator.Name))).SetState(prefs.ExpandAbbreviationsOnSeparator);
        }
예제 #2
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();

            (rootWidget.Finder.FindChild(pbSelectingClick.Name) as CheckBoxWidget).SetState(prefs.SelectClick);

            (rootWidget.Finder.FindChild(tbEveryHalf.Name) as SliderWidget).SetState(prefs.HalfScanIterations, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbEveryRow.Name) as SliderWidget).SetState(prefs.RowScanIterations, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbEveryColumn.Name) as SliderWidget).SetState(prefs.ColumnScanIterations, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbWordPrediction.Name) as SliderWidget).SetState(prefs.WordPredictionScanIterations, SliderWidget.SliderUnitsOnes);

            (rootWidget.Finder.FindChild(tbAcceptTime.Name) as SliderWidget).SetState(prefs.AcceptTime, SliderWidget.SliderUnitsThousandths);
            (rootWidget.Finder.FindChild(tbSteppingTime.Name) as SliderWidget).SetState(prefs.SteppingTime, SliderWidget.SliderUnitsThousandths);
            (rootWidget.Finder.FindChild(tbHesitateTime.Name) as SliderWidget).SetState(prefs.HesitateTime, SliderWidget.SliderUnitsThousandths);
            (rootWidget.Finder.FindChild(tbWordListHesitateTime.Name) as SliderWidget).SetState(prefs.WordPredictionHesitateTime, SliderWidget.SliderUnitsThousandths);
            (rootWidget.Finder.FindChild(tbTabScanTime.Name) as SliderWidget).SetState(prefs.TabScanTime, SliderWidget.SliderUnitsThousandths);
            (rootWidget.Finder.FindChild(tbFirstRepeatTime.Name) as SliderWidget).SetState(prefs.FirstRepeatTime, SliderWidget.SliderUnitsThousandths);
        }
예제 #3
0
        /// <summary>
        /// Sets the state of all the controls based on the
        /// settings in the prefs parameter
        /// </summary>
        /// <param name="prefs">ACAT settings object</param>
        private void initWidgetSettings(ACATPreferences prefs)
        {
            var rootWidget = _dialogCommon.GetRootWidget();

            (rootWidget.Finder.FindChild(tbRectangleSpeed.Name) as SliderWidget).SetState(prefs.MouseGridRectangleSpeed, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbRectangleCycles.Name) as SliderWidget).SetState(prefs.MouseGridRectangleCycles, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbLineSpeed.Name) as SliderWidget).SetState(prefs.MouseGridLineSpeed, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbLineCycles.Name) as SliderWidget).SetState(prefs.MouseGridLineCycles, SliderWidget.SliderUnitsOnes);
            (rootWidget.Finder.FindChild(tbLineThickness.Name) as SliderWidget).SetState(prefs.MouseGridLineThickness, SliderWidget.SliderUnitsOnes);

            (rootWidget.Finder.FindChild(pbEnableVerticalRectScan.Name) as CheckBoxWidget).SetState(prefs.MouseGridEnableVerticalRectangleScan);
        }
 /// <summary>
 /// Updates class variables with ACAT settings stored
 /// in prefs
 /// </summary>
 /// <param name="prefs">ACAT settings</param>
 private void updateSettings(ACATPreferences prefs)
 {
     PredictionWordCount = prefs.WordPredictionCount;
     FilterPunctuationsEnable = prefs.WordPredictionFilterPunctuations;
     NGram = prefs.WordPredictionNGram;
 }
 /// <summary>
 /// Saves current size/position settings. Call this in the SaveSettings
 /// function in the Alphabet scanner.
 /// </summary>
 public void SaveSettings()
 {
     _scannerCommon.PositionSizeController.SaveSettings(ACATPreferences.Load());
 }
예제 #6
0
        /// <summary>
        /// Inits 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();

            (rootWidget.Finder.FindChild(pbDynamicLearning.Name) as CheckBoxWidget).SetState(prefs.EnableWordPredictionDynamicModel);
            (rootWidget.Finder.FindChild(pbUseCorpus.Name) as CheckBoxWidget).SetState(prefs.EnableWordPredictionCorpusModel);
            (rootWidget.Finder.FindChild(tbWordCount.Name) as SliderWidget).SetState(prefs.WordPredictionCount, SliderWidget.SliderUnitsOnes);
        }
예제 #7
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);
        }
예제 #8
0
        /// <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);
        }
예제 #9
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);
        }