public bool Validate(object value)
 {
     if (ValidatorConverters.ValidatorStringConverter(value) == "")
     {
         return(true);
     }
     return(Directory.Exists(ValidatorConverters.ValidatorStringConverter(value)));
 }
Пример #2
0
            public bool Validate(object value)
            {
                string convertedValue = ValidatorConverters.ValidatorStringConverter(value);

                try
                {
                    Keys convertedKey = (Keys)Enum.Parse(typeof(Keys), convertedValue, true);
                }
                catch (ArgumentException)
                {
                    return(false);
                }

                return(true);
            }
Пример #3
0
            public bool Validate(object value)
            {
                int convertedValue = ValidatorConverters.ValidatorIntConverter(value);

                return(convertedValue == 0 || convertedValue == 1);
            }
Пример #4
0
            public bool Validate(object value)
            {
                float convertedValue = ValidatorConverters.ValidatorFloatConverter(value);

                return(convertedValue >= 0.01f && convertedValue <= 5.0f);
            }