Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KenPanCS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QCD
Tools
KenPanCS
Commits
23f1987b
Commit
23f1987b
authored
Mar 16, 2022
by
tsuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
・UIへの結果出力を合計に修正
ファイル毎では時間がかかり過ぎるため ・検版の並列処理にスレッド数の上限を設定
parent
d0537a47
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
359 additions
and
38 deletions
+359
-38
CompareTIFF.cs
Code/CSRender/CSRender/CompareTIFF.cs
+30
-13
MainWindow.xaml.cs
Code/CSRender/CSRender/MainWindow.xaml.cs
+329
-25
No files found.
Code/CSRender/CSRender/CompareTIFF.cs
View file @
23f1987b
...
...
@@ -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
NG
reportFileName
)
{
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
);
}
}
}
}
...
...
Code/CSRender/CSRender/MainWindow.xaml.cs
View file @
23f1987b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment