chr
2024-09-04 d7be195b0e1949c7b38bce2ad83ae974cbfac094
PdmSwPlugin.DrawApprove/DrawApprove.xaml.cs
@@ -29,7 +29,7 @@
    /// UserControl1.xaml 的交互逻辑
    /// </summary>
    [PdmSwPlugin(Title = "图纸审批")]
    public partial class DrawApproveControl : UserControl, ISwAppSetter, INotifyPropertyChanged
    public partial class DrawApproveControl : UserControl, ISwAppSetter, INotifyPropertyChanged, IActiveDocChangeHandler
    {
        #region ...
        public virtual event PropertyChangedEventHandler PropertyChanged;
@@ -454,5 +454,36 @@
                });
            }
        }
        public void OnSwActiveDocChange(ModelDoc2 oldDoc, ModelDoc2 newDoc, Component2 comp)
        {
            var fileName = new Uri(newDoc.GetPathName());
            foreach (var e in dataSource)
            {
                var d2Path = new Uri(GetRealFilePath(e.d2RelativePath));
                var d3Path = new Uri(GetRealFilePath(e.d3RelativePath));
                e.IsOpening = fileName == d2Path || fileName == d3Path;
            }
        }
        public void OnSwActiveDocSaved(ModelDoc2 doc, Component2 comp)
        {
        }
        public void OnCustomPropertyChange(string propName, string Configuration, string oldValue, string NewValue, int valueType)
        {
        }
        public void OnDocDestroy(ModelDoc2 doc)
        {
        }
        public void AfterDocDestroy()
        {
        }
    }
}