Example #1
0
        private void SetControlsProperties()
        {
            var isValid = VariableNameValidator.IsValidName(NewName) && !_forbiddenNames.Any(name => name.Equals(NewName, StringComparison.OrdinalIgnoreCase));

            OkButton.Visible = isValid;
            OkButton.Enabled = isValid;
            InvalidNameValidationIcon.Visible = !isValid;
        }
        private void SetControlsProperties()
        {
            var isValid = VariableNameValidator.IsValidName(NewName);

            OkButton.Visible = isValid;
            OkButton.Enabled = isValid;
            InvalidNameValidationIcon.Visible = !isValid;
        }
 private bool IsValidVariableName(string variableName, IEnumerable <string> forbiddenNames)
 {
     return(VariableNameValidator.IsValidName(variableName) &&
            !forbiddenNames.Any(name => name.Equals(variableName, StringComparison.InvariantCultureIgnoreCase)));
 }
Example #4
0
 private bool VariableNameIsValid(string variableName)
 {
     return(VariableNameValidator.IsValidName(variableName) &&
            !_forbiddenNames.Any(name => name.Equals(variableName, System.StringComparison.InvariantCultureIgnoreCase)));
 }
Example #5
0
 private bool IsValidVariableName(string variableName)
 {
     return(VariableNameValidator.IsValidName(variableName) &&
            !IsNameCollision(variableName));
 }