| | |
| | | |
| | | private void OpenDrw_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | Button btn = sender as Button; |
| | | DrawAudit da = btn.DataContext as DrawAudit; |
| | | string filePath = GetRealFilePath(da.d2RelativePath); |
| | | if (!File.Exists(filePath)) |
| | | try |
| | | { |
| | | this.Error($"服务器中未找到工程图文件,路径:{filePath}"); |
| | | return; |
| | | Button btn = sender as Button; |
| | | DrawAudit da = btn.DataContext as DrawAudit; |
| | | string filePath = GetRealFilePath(da.d2RelativePath); |
| | | if (!File.Exists(filePath)) |
| | | { |
| | | this.Error($"服务器中未找到工程图文件,路径:{filePath}"); |
| | | return; |
| | | } |
| | | OpenDocMayError(filePath, (int)swDocumentTypes_e.swDocDRAWING, (int)swOpenDocOptions_e.swOpenDocOptions_ReadOnly, |
| | | ""); |
| | | } |
| | | OpenDocMayError(filePath, (int)swDocumentTypes_e.swDocDRAWING, (int)swOpenDocOptions_e.swOpenDocOptions_ReadOnly, |
| | | ""); |
| | | catch (Exception ex) |
| | | { |
| | | this.Error($"打开工程图异常!{ex}"); |
| | | Logger.Error("Open Drw Error!", ex); |
| | | } |
| | | } |
| | | |
| | | private string GetRealFilePath(string relativePath) |
| | |
| | | |
| | | private void OpenDoc_Click(object sender, RoutedEventArgs e) |
| | | { |
| | | Button btn = sender as Button; |
| | | DrawAudit da = btn.DataContext as DrawAudit; |
| | | string filePath = GetRealFilePath(da.d3RelativePath); |
| | | if (!File.Exists(filePath)) |
| | | try |
| | | { |
| | | this.Error($"服务器中未找到图纸文件,路径:{filePath}"); |
| | | return; |
| | | } |
| | | Button btn = sender as Button; |
| | | DrawAudit da = btn.DataContext as DrawAudit; |
| | | string filePath = GetRealFilePath(da.d3RelativePath); |
| | | if (!File.Exists(filePath)) |
| | | { |
| | | this.Error($"服务器中未找到图纸文件,路径:{filePath}"); |
| | | return; |
| | | } |
| | | |
| | | OpenDocMayError(filePath, (int)FileExtentionChecker.Check(filePath, out _), (int)swOpenDocOptions_e.swOpenDocOptions_ReadOnly, |
| | | ""); |
| | | OpenDocMayError(filePath, (int)FileExtentionChecker.Check(filePath, out _), (int)swOpenDocOptions_e.swOpenDocOptions_ReadOnly, |
| | | ""); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | this.Error($"打开图纸异常!{ex}"); |
| | | Logger.Error("Open 3D Doc Error!", ex); |
| | | } |
| | | } |
| | | |
| | | public List<DrawAudit> RefreshList() |