修改命名空间

This commit is contained in:
GG Z
2026-02-21 16:31:24 +08:00
parent 97c0b18dc7
commit 2ad3d0fde0
188 changed files with 783 additions and 2710 deletions

View File

@@ -0,0 +1,25 @@
using System.Globalization;
using System.Windows.Controls;
namespace ShrlAlgoToolkit.RevitAddins.Common.ValidationRules
{
public class UndefinedCharRules : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
char[] chars = new[] { '\\', ':', '{', '}', '[', ']', '|', ';', '<', '>', '?', '`', '~' };
if (value != null)
{
foreach (var c in chars)
{
if (value.ToString().IndexOf(c) > -1)
{
return new(false, $"名称不能包含字符:'\\ : [ ] | {{}}; < > ? ` ~");
}
}
}
return ValidationResult.ValidResult;
}
}
}