From 1f645778ae80a3a8801b8bb4d0fcf8feb244ad43 Mon Sep 17 00:00:00 2001
From: chr <chr@mailcom>
Date: 星期三, 09 十月 2024 11:51:23 +0800
Subject: [PATCH] 完善项目,新增插件启用检测;

---
 PdmSwPlugin.PropertySetting/Panel/JgjPartPanel.xaml.cs |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/PdmSwPlugin.PropertySetting/Panel/JgjPartPanel.xaml.cs b/PdmSwPlugin.PropertySetting/Panel/JgjPartPanel.xaml.cs
index 654ae2d..e7331b2 100644
--- a/PdmSwPlugin.PropertySetting/Panel/JgjPartPanel.xaml.cs
+++ b/PdmSwPlugin.PropertySetting/Panel/JgjPartPanel.xaml.cs
@@ -1,6 +1,7 @@
 锘縰sing 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;
@@ -117,7 +118,7 @@
 
         #region UI灞炴��
         private string _materialCode;
-        [PropertySettingAttr(Name = NameConstant.materialCode)]
+        [PropertySettingAttr(Name = NameConstant.materialCode, defaultValue = "$PRP:\"SW-File Name\"")]
         public string materialCode
         {
             get => _materialCode;
@@ -197,13 +198,20 @@
         [PropertySettingAttr(Name = NameConstant.weight, NeedSave = false)]
         public string weight
         {
-            get => _weight;
+            get => CustomPropertyUtil.GetMass(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

--
Gitblit v1.9.1