| | |
| | | using System.Collections.Generic; |
| | | using System.Collections.ObjectModel; |
| | | using System.ComponentModel; |
| | | using System.IO; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Windows.Controls; |
| | | using PdmSwPlugin.Common.CustomHandler; |
| | |
| | | using PdmSwPlugin.PropertySetting.Entity; |
| | | using PdmSwPlugin.PropertySetting.Interface; |
| | | using PdmSwPlugin.PropertySetting.Panel.Attr; |
| | | using PdmSwPlugin.PropertySetting.Util; |
| | | using SolidWorks.Interop.sldworks; |
| | | using SolidWorks.Interop.swconst; |
| | | |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | static JgjPartPanel() |
| | | { |
| | | PropHolder.Register(typeof(JgjPartPanel)); |
| | | } |
| | | |
| | | public void ccc<T>(ref T old, T @new, [CallerMemberName] string propertyName = null) |
| | | { |
| | |
| | | |
| | | #region UI属性 |
| | | private string _materialCode; |
| | | [PropertySettingAttr(Name = NameConstant.materialCode)] |
| | | [PropertySettingAttr(Name = NameConstant.materialCode, defaultValue = "$PRP:\"SW-File Name\"")] |
| | | public string materialCode |
| | | { |
| | | get => _materialCode; |
| | |
| | | [PropertySettingAttr(Name = NameConstant.weight, NeedSave = false)] |
| | | public string weight |
| | | { |
| | | get => _weight; |
| | | get => CustomPropertyUtil.GetMassBySWDM(doc); |
| | | set |
| | | { |
| | | RaiseAndSetIfChanged(ref _weight, value); |
| | | ccc(ref _weight, value); |
| | | } |
| | | } |
| | | |
| | | [PropertySettingAttr(Name = NameConstant.weight, NeedInit = false)] |
| | | public string weightEval |
| | | { |
| | | get => doc == null ? null : $"\"SW-质量@{Path.GetFileName(doc.GetPathName())}\""; |
| | | set { } |
| | | } |
| | | |
| | | private string _materialType = ""; |
| | | [PropertySettingAttr(Name = NameConstant.materialType, defaultValue = "普通件")] |
| | | public string materialType |