chr
2024-10-09 1f645778ae80a3a8801b8bb4d0fcf8feb244ad43
PdmSwPlugin.PropertySetting/CommonSettingControl.xaml.cs
@@ -232,7 +232,7 @@
            this.SwApp = SwApp;
        }
        private void InitPropertyData()
        public void InitPropertyData()
        {
            if (Client == null)
            {
@@ -461,24 +461,41 @@
            else if (docType == (int)swDocumentTypes_e.swDocASSEMBLY)
            {
                ReadDocPath = ReadDoc.GetPathName();
                // !Equals(LastReadDoc, ReadDoc)
                properties = CustomPropertyUtil.GetCustomProperties2(ReadDoc, true, skipName);
                string fileType = properties.Get(NameConstant.docType);
                /*if (fileType == "加工件" || fileType == "模组")
                if (ReadDoc.IsOpenedViewOnly())
                {
                    contentKey = "jgjPart";
                }*/
                if (BomIniterHolder.Instance.IsJgj(ReadDoc))
                    contentKey = "default";
                    control = controlCache[contentKey];
                    newOne = control as IPropertyOpt;
                    newOne.SetProperties(null, "当前处于只读模式", true, out _);
                }
                else if (ReadDoc.IsOpenedReadOnly())
                {
                    contentKey = "jgjModule";
                    contentKey = "default";
                    control = controlCache[contentKey];
                    newOne = control as IPropertyOpt;
                    newOne.SetProperties(null, "当前处于只读模式", true, out _);
                }
                else
                {
                    contentKey = "standardModule";
                    // !Equals(LastReadDoc, ReadDoc)
                    properties = CustomPropertyUtil.GetCustomProperties2(ReadDoc, true, skipName);
                    string fileType = properties.Get(NameConstant.docType);
                    /*if (fileType == "加工件" || fileType == "模组")
                    {
                        contentKey = "jgjPart";
                    }*/
                    if (BomIniterHolder.Instance.IsJgj(ReadDoc))
                    {
                        contentKey = "jgjModule";
                    }
                    else
                    {
                        contentKey = "standardModule";
                    }
                    control = controlCache[contentKey];
                    newOne = control as IPropertyOpt;
                    newOne.SetProperties(ReadDoc, properties, true, out _);
                }
                control = controlCache[contentKey];
                newOne = control as IPropertyOpt;
                newOne.SetProperties(ReadDoc, properties, true, out _);
            }
            else
            {