chr
2024-11-02 b5234c5ab1e9e6826b8d8fc1e95fa752aaa40b74
PdmSwPlugin.DrawApprove/DrawApprove.xaml.cs
@@ -260,16 +260,24 @@
        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)
@@ -282,17 +290,25 @@
        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()