54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using Laservall.Solidworks.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
using Xarial.XCad;
|
|
using Xarial.XCad.Documents;
|
|
using Xarial.XCad.SolidWorks.Documents;
|
|
using Xarial.XCad.SolidWorks.UI;
|
|
|
|
namespace Laservall.Solidworks.Pane.WPF
|
|
{
|
|
/// <summary>
|
|
/// TestUserControl.xaml 的交互逻辑
|
|
/// </summary>
|
|
[DisplayName("Laservall 自定义属性卡")]
|
|
public partial class TestUserControl : UserControl
|
|
{
|
|
public ISwTaskPane<TestUserControl> pane;
|
|
|
|
public PartPropModel partPropModel { get; set; }
|
|
public TestUserControl()
|
|
{
|
|
InitializeComponent();
|
|
partPropModel = new PartPropModel();
|
|
DataContext = this;
|
|
VersionText.Text = $"Ver.{Assembly.GetExecutingAssembly().GetName().Version}";
|
|
}
|
|
|
|
public void OnSelectChange(IXDocument doc, IXSelObject xSelObject)
|
|
{
|
|
if (xSelObject is ISwPartComponent doc2)
|
|
{
|
|
Debug.WriteLine(doc2.Name);
|
|
}
|
|
Debug.WriteLine($"OnSelectChange: {xSelObject.GetType()}");
|
|
}
|
|
|
|
}
|
|
}
|