修改命名空间

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

@@ -21,7 +21,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvCommon
public partial bool IsCutting { get; set; }
[ObservableProperty]
public partial ObservableCollection<SelectionElement> Items { get; set; }
public partial ObservableCollection<ElementInfo> Items { get; set; }
[ObservableProperty]
public partial string SearchProp { get; set; }
@@ -46,7 +46,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvCommon
var element = doc.GetElement(elementId);
if (element.IsValidObject)
{
Items.Add(new SelectionElement(element));
Items.Add(new ElementInfo(element));
}
}
FilteredList = CollectionViewSource.GetDefaultView(Items);
@@ -61,7 +61,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvCommon
{
return true;
}
var item = o as SelectionElement;
var item = o as ElementInfo;
return (item?.Name != null && item.Name.Contains(SearchProp))
|| (item?.Number != null && item.Number.Contains(SearchProp))
|| (item?.Comment != null && item.Comment.Contains(SearchProp));
@@ -71,7 +71,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvCommon
[RelayCommand]
private void ShowElement(object obj)
{
if (obj is not SelectionElement selection) return;
if (obj is not ElementInfo selection) return;
var model = selection.Element;
var uidoc = uiapp.ActiveUIDocument;
if (model.IsValidObject)
@@ -127,7 +127,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvCommon
}
}
public class SelectionElement(Element element)
public class ElementInfo(Element element)
{
public string CategoryName => element.Category?.Name;