Ejemplo n.º 1
0
        private static void SetInputParameters()
        {
            SebWindowsServiceHandler._oldInputParams = InputParamsManager.Get();
            InputParamsManager.Parameters parameters = (InputParamsManager.Parameters)SebWindowsServiceHandler._oldInputParams.Clone();
            bool?nullable = new bool?(false);

            parameters.IsPredictionEnabled = nullable;
            InputParamsManager.Set(parameters);
        }
 public static void Set(InputParamsManager.Parameters parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException(nameof(parameters));
     }
     if (!parameters.IsPredictionEnabled.HasValue)
     {
         return;
     }
     InputParamsManager.WriteRegKeyValue <int>(InputParamsManager.OpenLatestTabTipSubKey(true), "EnableTextPrediction", parameters.IsPredictionEnabled.Value ? 1 : 0);
 }
        public static InputParamsManager.Parameters Get()
        {
            InputParamsManager.Parameters parameters = new InputParamsManager.Parameters();
            int? nullable1 = InputParamsManager.ReadRegKeyValue <int?>(InputParamsManager.OpenLatestTabTipSubKey(true), "EnableTextPrediction", new int?());
            int? nullable2 = nullable1;
            int  num1      = 1;
            bool?nullable3;

            if ((nullable2.GetValueOrDefault() == num1 ? (nullable2.HasValue ? 1 : 0) : 0) == 0)
            {
                nullable2 = nullable1;
                int num2 = 0;
                nullable3 = (nullable2.GetValueOrDefault() == num2 ? (nullable2.HasValue ? 1 : 0) : 0) != 0 ? new bool?(false) : new bool?();
            }
            else
            {
                nullable3 = new bool?(true);
            }
            parameters.IsPredictionEnabled = nullable3;
            return(parameters);
        }