| | |
| | | /// 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; |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | 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() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |