Exemplo n.º 1
0
        private void SetControlsProperties()
        {
            var isValid = VBAIdentifierValidator.IsValidIdentifier(NewName, DeclarationType.Variable);

            OkButton.Visible = isValid;
            OkButton.Enabled = isValid;
            InvalidNameValidationIcon.Visible = !isValid;
        }
Exemplo n.º 2
0
 private bool IsValidVariableName(string variableName)
 {
     return(VBAIdentifierValidator.IsValidIdentifier(variableName, DeclarationType.Variable) &&
            !IsNameCollision(variableName));
 }
 public void VBAIdentifierValidator_IsValidName(string identifier, DeclarationType declarationType, bool expected)
 {
     Assert.AreEqual(expected, VBAIdentifierValidator.IsValidIdentifier(identifier, declarationType));
 }