审批序列化

This commit is contained in:
艾竹
2023-04-16 12:21:51 +08:00
parent 5dee3a9907
commit 4b8a03afb6
9 changed files with 103 additions and 41 deletions

View File

@@ -291,11 +291,12 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
if (e.PropertyName == "IsSelected")
{
_service.SelectedItemViewModel = CopyHelper.Mapper(DiagramViewModel?.SelectedItem);
return;
}
var property = sender.GetType().GetProperty(e.PropertyName);
var attr = property.GetCustomAttributes(typeof(BrowsableAttribute), true);
if (attr != null && attr.Length != 0 && (attr[0] as BrowsableAttribute).Browsable == false)
if (attr != null && attr.OfType<BrowsableAttribute>().FirstOrDefault()?.Browsable != true)
{
return;
}