| | |
| | | this.SwApp = SwApp; |
| | | } |
| | | |
| | | private void InitPropertyData() |
| | | public void InitPropertyData() |
| | | { |
| | | if (Client == null) |
| | | { |
| | |
| | | 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 |
| | | { |