58 lines
1.6 KiB
C#
58 lines
1.6 KiB
C#
|
|
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();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|