Commit ab65d5ac authored by tsuji's avatar tsuji

・File.MoveをFile.Copyに修正(別ドライブに移動できない問題を回避するため)

・log出力の最後に検版レポートのpathを表示するように改良
parent 353e3f1f
...@@ -100,9 +100,20 @@ namespace CSRender ...@@ -100,9 +100,20 @@ namespace CSRender
, "*", SearchOption.TopDirectoryOnly);//reportフォルダ内の全てのファイルを取得 , "*", SearchOption.TopDirectoryOnly);//reportフォルダ内の全てのファイルを取得
foreach (string file in allReport) foreach (string file in allReport)
{ {
string fileTarget = System.IO.Path.GetFileName(file); string fileTarget = System.IO.Path.Combine(reportPath, System.IO.Path.GetFileName(file));//旧パスからファイル名を取得して新しいパスを作成
File.Move(file, System.IO.Path.Combine(reportPath, fileTarget));//指定先に移動 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;
}
} }
} }
...@@ -202,9 +202,16 @@ namespace CSRender ...@@ -202,9 +202,16 @@ namespace CSRender
//レポートを出力 //レポートを出力
outputLog(System.IO.Path.Combine(workDir, "report")); outputLog(System.IO.Path.Combine(workDir, "report"));
string PDFName = CompareTIFF.getReportName(workDir);
//指定先にレポートを移動 //指定先にレポートを移動
CompareTIFF.moveReport(workBox.Text, 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.resolutionSetting = ResolutionBox.Text;
Properties.Settings.Default.formatSetting = FileSelect.Text; Properties.Settings.Default.formatSetting = FileSelect.Text;
...@@ -295,6 +302,7 @@ namespace CSRender ...@@ -295,6 +302,7 @@ namespace CSRender
Properties.Settings.Default.Save(); Properties.Settings.Default.Save();
} }
//メニュを明示的に更新する
private void DoEvents() private void DoEvents()
{ {
DispatcherFrame frame = new DispatcherFrame(); DispatcherFrame frame = new DispatcherFrame();
...@@ -303,6 +311,7 @@ namespace CSRender ...@@ -303,6 +311,7 @@ namespace CSRender
Dispatcher.PushFrame(frame); Dispatcher.PushFrame(frame);
} }
//実行中のオブジェクトを読み込み
private object ExitFrames(object obj) private object ExitFrames(object obj)
{ {
((DispatcherFrame)obj).Continue = false; ((DispatcherFrame)obj).Continue = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment