Exemplo n.º 1
0
        protected virtual MessageBubbleContent Validate(string name)
        {
            string str = ProjectNameValidator.ValidateWithErrorString(name);

            if (string.IsNullOrEmpty(str))
            {
                return(null);
            }
            return(new MessageBubbleContent(str, MessageBubbleType.Error));
        }
        public static string ValidateWithErrorString(IProject project, string projectName)
        {
            string projectItemDialogFileNameMatchesNamespace = ProjectNameValidator.ValidateWithErrorString(projectName);

            if (projectItemDialogFileNameMatchesNamespace == null && project != null)
            {
                string str = string.Concat(project.DefaultNamespaceName, ".xaml");
                if (projectName == project.DefaultNamespaceName || projectName == str)
                {
                    projectItemDialogFileNameMatchesNamespace = StringTable.ProjectItemDialogFileNameMatchesNamespace;
                }
            }
            return(projectItemDialogFileNameMatchesNamespace);
        }
Exemplo n.º 3
0
 public static string ValidateWithErrorString(string projectName)
 {
     return(ProjectValidatorBase.ValidateWithErrorString(projectName, ProjectNameValidator.GetInvalidFileNameChars()));
 }
Exemplo n.º 4
0
 public static bool ValidateName(string name)
 {
     return(ProjectNameValidator.ValidateWithErrorString(name) == null);
 }