Example #1
0
 private static void UpdateFields()
 {
     MaxTimer                = TypeCast.ToInt(AppConfig("MaxTimer"));
     EnumerationsPath        = FormatPath(AppConfig("EnumerationsPath"));
     TestTypeList            = AppConfig("TestTypeList");
     VehicleTypeList         = AppConfig("VehicleTypeList");
     VehicleManufacturerList = AppConfig("VehicleManufacturerList");
     IdTypeList              = AppConfig("IdTypeList");
     ShowForm                = TypeCast.ToBool(AppConfig("ShowForm"));
 }
Example #2
0
        public bool GetValueAsBool(string key)
        {
            object obj = ProvideValues.GetValue(RootPath + Repository[key]);

            if (obj == null)
            {
                return(false);
            }
            return(TypeCast.ToBool(obj.ToString()));
        }
Example #3
0
        public double GetValueAsDouble(string key)
        {
            object obj = ProvideValues.GetValue(RootPath + Repository[key]);

            if (obj == null)
            {
                return(0.0);
            }
            return(TypeCast.ToDouble(obj.ToString()));
        }
Example #4
0
        public int GetValueAsInt(string key)
        {
            object obj = ProvideValues.GetValue(RootPath + Repository[key]);

            if (obj == null)
            {
                return(0);
            }
            return(TypeCast.ToInt(obj.ToString()));
        }
Example #5
0
        public void SetByString(string typeString)
        {
            UpdateTypeList();
            SetAsOther();
            if (!TypeCast.IsInt(typeString))
            {
                return;
            }
            int typeInt = TypeCast.ToInt(typeString);

            if (typeInt >= 0 && typeInt < TypeList.Count)
            {
                TypeEnum = typeInt;
            }
        }