添加项目文件。
This commit is contained in:
57
MSDevTool/Commands.cs
Normal file
57
MSDevTool/Commands.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Bentley.DgnPlatformNET;
|
||||
|
||||
using Mstn.Toolkit.External;
|
||||
|
||||
|
||||
|
||||
namespace MSDevTool
|
||||
{
|
||||
public class Commands
|
||||
{
|
||||
public static void Lookup(string unparsed)
|
||||
{
|
||||
UserPickTool.Setup(e => true, e =>
|
||||
{
|
||||
for (uint i = 0; i < e.GetCount(); i++)
|
||||
{
|
||||
var elem = e.GetEntry(i);
|
||||
var classProps = SnoopHelpers.GetClassPropDictionary(elem).OrderBy(p => p.PropName).ToList();
|
||||
ElementPropertiesGetter getter = new ElementPropertiesGetter(elem);
|
||||
|
||||
var dictClass1 = SnoopHelpers.GetClassPropDictionary(getter).OrderBy(p => p.PropName);
|
||||
|
||||
classProps.AddRange(dictClass1);
|
||||
|
||||
var ecPropsOrdered = SnoopHelpers.GetECProperties(elem).OrderBy(p => p.PropName);
|
||||
|
||||
ElementInfoViewModel viewModel = new ElementInfoViewModel();
|
||||
|
||||
foreach (var item in classProps)
|
||||
{
|
||||
viewModel.ClassPropValues.Add(item);
|
||||
}
|
||||
foreach (var item in ecPropsOrdered)
|
||||
{
|
||||
viewModel.ECPropValues.Add(item);
|
||||
}
|
||||
ElementInfoView view = new(viewModel);
|
||||
|
||||
view.Show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void Selection(string unparsed)
|
||||
{
|
||||
SelectByElementId selectByElementId = new()
|
||||
{
|
||||
Topmost = true
|
||||
};
|
||||
selectByElementId.Show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user