Commit 23f1987b authored by tsuji's avatar tsuji

・UIへの結果出力を合計に修正

ファイル毎では時間がかかり過ぎるため
・検版の並列処理にスレッド数の上限を設定
parent d0537a47
......@@ -22,19 +22,26 @@ namespace CSRender
class CompareTIFF
{
public static void runPureVerify(string targetDir, string referenceDir, string workPath,
string shiftPixel, string colorMargin, string removePoint, string shadingOff,
bool reportFlag, string reportName, string inDiffPath, string inTargetFileName, DateTime inDateTime)
string shiftPixel, string colorMargin, string removePoint, string shadingOff, bool reportFlag,
string reportName, string inDiffPath, string inTargetFileName, DateTime inDateTime, string inReportInfo)
{
//実行用コンソールの呼び出し
ProcessStartInfo processStartInfo = new ProcessStartInfo();
//exeのpathを取得
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location; //モジュールのパスを取得
string appDirectory = appPath.Substring(0, appPath.LastIndexOf(@"\") + 1); //モジュールの存在するディレクトリを取得
string exePath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "bin", "x64");
//実行用コンソールの呼び出し
ProcessStartInfo processStartInfo = new ProcessStartInfo();
processStartInfo.FileName = System.IO.Path.Combine(appDirectory, exePath, "PureVerify.exe");
processStartInfo.WindowStyle = ProcessWindowStyle.Minimized;
processStartInfo.CreateNoWindow = true; // コマンドプロンプトを非表示
processStartInfo.UseShellExecute = false; // シェル機能オフ
processStartInfo.RedirectStandardOutput = true;//標準出力をリダイレクト
//レポートに書き込む情報を編集
inTargetFileName = System.IO.Path.GetFileNameWithoutExtension(inTargetFileName);
string reportInfoPath = MainWindow.editEachReport(appDirectory,inTargetFileName, inReportInfo, targetDir, referenceDir);
//引数設定
//指定ファイル
processStartInfo.Arguments = "/tar ";
......@@ -79,14 +86,13 @@ namespace CSRender
processStartInfo.Arguments += "\" ";
//対象ファイル名を設定
inTargetFileName = System.IO.Path.GetFileNameWithoutExtension(inTargetFileName);
processStartInfo.Arguments += "/inspTiff \"";
processStartInfo.Arguments += inTargetFileName + ".pdf";
processStartInfo.Arguments += "\" ";
//レポートファイル名を設定
string timeForReport = "【" + inDateTime.ToString("yyMMdd_HHmm") + "】" + ".pdf";
string TargetName = System.IO.Path.Combine(reportName, "report_" + inTargetFileName + ".pdf" + timeForReport);
string TargetName = System.IO.Path.Combine(reportName, inTargetFileName + ".pdf" + timeForReport);
processStartInfo.Arguments += "/inspReport \"";
processStartInfo.Arguments += TargetName;
processStartInfo.Arguments += "\" ";
......@@ -110,8 +116,9 @@ namespace CSRender
//レポート記述内容の参照先
processStartInfo.Arguments += "/topPageInfo ";
string textPath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "work", "OUT_INFO", "CSReportInf.txt");
processStartInfo.Arguments += System.IO.Path.Combine(appDirectory, textPath);
//string textPath = System.IO.Path.Combine("PureVerify.Data", "RipVerify", "work", "OUT_INFO", "CSReportInf.txt");
//processStartInfo.Arguments += System.IO.Path.Combine(appDirectory, textPath);
processStartInfo.Arguments += reportInfoPath;
//CSRender.exeを実行
Process process = Process.Start(processStartInfo);
......@@ -121,8 +128,7 @@ namespace CSRender
//NGの含まれる場合レポート名の頭に【NG】を付与
NGReportName(TargetName, reportName);
//return workDir;
}
//指定先にレポートを移動
......@@ -158,16 +164,27 @@ namespace CSRender
{
//string searchName = "report_" + inTargetName;
string searchfile = System.IO.Path.GetFileNameWithoutExtension(inTargetName) + "&*";
var reportFileName = Directory.GetFiles(inReportPath, searchfile);
if (reportFileName.Length > 0)
var NGreportFileName = Directory.GetFiles(inReportPath, searchfile);
var OKreportFileName = Directory.GetFiles(inReportPath, System.IO.Path.GetFileName(inTargetName));
int NGCount = NGreportFileName.Length;
if (NGCount > 0)
{
foreach (var oldPathName in reportFileName)
foreach (var oldPathName in NGreportFileName)
{
string oldFile = System.IO.Path.GetFileName(oldPathName);
File.Copy(oldPathName, System.IO.Path.Combine(inReportPath, "【NG】" + oldFile), true);
File.Delete(oldPathName);
}
}
else
{
foreach (var beforePathName in OKreportFileName)
{
string oldFile = System.IO.Path.GetFileName(beforePathName);
File.Copy(beforePathName, System.IO.Path.Combine(inReportPath, "【OK】" + oldFile), true);
File.Delete(beforePathName);
}
}
}
}
......
This diff is collapsed.
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