diff --git a/Code/CSRender/CSRender/CompareTIFF.cs b/Code/CSRender/CSRender/CompareTIFF.cs index 459a72aa30600b10a75a02652bd66b9a2f256559..6443997e081d29dd5aeda32378ad6d14897dfcc6 100644 --- a/Code/CSRender/CSRender/CompareTIFF.cs +++ b/Code/CSRender/CSRender/CompareTIFF.cs @@ -100,9 +100,20 @@ namespace CSRender , "*", SearchOption.TopDirectoryOnly);//reportフォルダ内の全てのファイルを取得 foreach (string file in allReport) { - string fileTarget = System.IO.Path.GetFileName(file); - File.Move(file, System.IO.Path.Combine(reportPath, fileTarget));//指定先に移動 + string fileTarget = System.IO.Path.Combine(reportPath, System.IO.Path.GetFileName(file));//旧パスからファイル名を取得して新しいパスを作成 + File.Copy(file, fileTarget, true);//指定先にコピー + File.Delete(file);//コピー元のファイルを削除 } } + + //検版レポートのファイル名を取得 + public static string getReportName(string workPath) + { + string[] reportFilePath = System.IO.Directory.GetFiles(System.IO.Path.Combine(workPath, "report") + , "*.pdf", System.IO.SearchOption.TopDirectoryOnly);//レポートファイルのパスを取得 + string ReportName = System.IO.Path.GetFileName(reportFilePath[0]);//file名を抽出 + + return ReportName; + } } } diff --git a/Code/CSRender/CSRender/MainWindow.xaml.cs b/Code/CSRender/CSRender/MainWindow.xaml.cs index 3838a1799816240053e625cb1c17d9abef995000..321397e13ea070caef73e096d42cfcfcd760deaf 100644 --- a/Code/CSRender/CSRender/MainWindow.xaml.cs +++ b/Code/CSRender/CSRender/MainWindow.xaml.cs @@ -202,9 +202,16 @@ namespace CSRender //レポートを出力 outputLog(System.IO.Path.Combine(workDir, "report")); + string PDFName = CompareTIFF.getReportName(workDir); + //指定先にレポートを移動 CompareTIFF.moveReport(workBox.Text, workDir); + //レポートのパスを表示 + ResultConsole.Text += " 検版レポートのパス:"; + ResultConsole.Text += System.IO.Path.Combine(workBox.Text, "report", PDFName); + ResultConsole.Text += "\r\n"; + //パラメータを次回初期値用に保存 Properties.Settings.Default.resolutionSetting = ResolutionBox.Text; Properties.Settings.Default.formatSetting = FileSelect.Text; @@ -295,6 +302,7 @@ namespace CSRender Properties.Settings.Default.Save(); } + //メニュを明示的に更新する private void DoEvents() { DispatcherFrame frame = new DispatcherFrame(); @@ -303,6 +311,7 @@ namespace CSRender Dispatcher.PushFrame(frame); } + //実行中のオブジェクトを読み込み private object ExitFrames(object obj) { ((DispatcherFrame)obj).Continue = false;