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
7d7ee434
Commit
7d7ee434
authored
Apr 06, 2022
by
tsuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
検版処理の変数定義の記述を整理
parent
d1e38770
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
30 deletions
+34
-30
CompareTIFF.cs
Code/CSRender/CSRender/CompareTIFF.cs
+13
-0
MainWindow.xaml.cs
Code/CSRender/CSRender/MainWindow.xaml.cs
+21
-30
No files found.
Code/CSRender/CSRender/CompareTIFF.cs
View file @
7d7ee434
...
@@ -231,5 +231,18 @@ namespace CSRender
...
@@ -231,5 +231,18 @@ namespace CSRender
return
DataNumSet
.
ToArray
();
return
DataNumSet
.
ToArray
();
}
}
//前回のログが内部に残っていれば削除(エラー防止)
public
static
void
deleteOldLog
(
string
inLogPath
)
{
if
(
System
.
IO
.
Directory
.
EnumerateFileSystemEntries
(
inLogPath
).
Any
())
{
DirectoryInfo
logDirctory
=
new
DirectoryInfo
(
inLogPath
);
FileInfo
[]
logFiles
=
logDirctory
.
GetFiles
();
foreach
(
FileInfo
delFile
in
logFiles
)
{
delFile
.
Delete
();
}
}
}
}
}
}
}
Code/CSRender/CSRender/MainWindow.xaml.cs
View file @
7d7ee434
...
@@ -117,6 +117,19 @@ namespace CSRender
...
@@ -117,6 +117,19 @@ namespace CSRender
string
colorMargin
=
GradationBox
.
Text
;
string
colorMargin
=
GradationBox
.
Text
;
string
removePoint
=
SmallDiffBox
.
Text
;
string
removePoint
=
SmallDiffBox
.
Text
;
string
shadingOff
=
VisualBox
.
Text
;
string
shadingOff
=
VisualBox
.
Text
;
//検版処理関係の変数
string
appPath
=
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
().
Location
;
//モジュールのパスを取得
string
appDirectory
=
appPath
.
Substring
(
0
,
appPath
.
LastIndexOf
(
@"\"
)
+
1
);
//モジュールの存在するディレクトリを取得
string
workDir
=
System
.
IO
.
Path
.
Combine
(
appDirectory
,
"PureVerify.Data"
,
"RipVerify"
);
//PureVerifyのworkパス
string
exePath
=
System
.
IO
.
Path
.
Combine
(
workDir
,
"bin"
,
"x64"
);
//exeのpathを取得
int
allPDFNum
=
0
;
//検版するPDFの総数
int
NGPDFNum
=
0
;
//検版でNGだったPDFの総数
bool
reportFlag
=
false
;
//レポート名を変えるかどうか判別するフラグ
string
reportContentsInfo
=
""
;
//レポートに記述する内容
bool
pageFlag
=
false
;
//ページ数の指定かあるかどうかのフラグ
string
selectedPage
=
""
;
//指定されたページ数
bool
dummyFlag
=
false
;
//ダミーのファイルを作るかどうかのフラグ
string
dummyFileName
=
""
;
//ダミーのファイル名
//対象フォルダのpathチェック
//対象フォルダのpathチェック
if
(!
Directory
.
Exists
(
targetBoxText
)
&&
!
File
.
Exists
(
targetBoxText
))
if
(!
Directory
.
Exists
(
targetBoxText
)
&&
!
File
.
Exists
(
targetBoxText
))
...
@@ -149,13 +162,10 @@ namespace CSRender
...
@@ -149,13 +162,10 @@ namespace CSRender
}
}
//検版対象がファイル名の場合、ファイル名が対象とリファレンスとで一致しなくても検版するように仕込み
//検版対象がファイル名の場合、ファイル名が対象とリファレンスとで一致しなくても検版するように仕込み
bool
dummyFlag
=
false
;
string
dummyFileName
=
""
;
if
(
File
.
Exists
(
referenceBoxText
)
&&
File
.
Exists
(
targetBoxText
))
if
(
File
.
Exists
(
referenceBoxText
)
&&
File
.
Exists
(
targetBoxText
))
{
{
dummyFileName
=
SelectFileTarget
(
dummyFlag
,
targetBoxText
,
referenceBoxText
,
workBoxText
);
dummyFileName
=
SelectFileTarget
(
dummyFlag
,
targetBoxText
,
referenceBoxText
,
workBoxText
);
}
}
//出力ファイルpathのチェック
//出力ファイルpathのチェック
if
(!
Directory
.
Exists
(
workBoxText
)
&&
!
File
.
Exists
(
workBoxText
))
if
(!
Directory
.
Exists
(
workBoxText
)
&&
!
File
.
Exists
(
workBoxText
))
...
@@ -172,13 +182,15 @@ namespace CSRender
...
@@ -172,13 +182,15 @@ namespace CSRender
reviveButton
();
//終了前にメニューを復帰
reviveButton
();
//終了前にメニューを復帰
return
;
return
;
}
}
//前回のログが内部に残っていれば削除(エラー防止)
CompareTIFF
.
deleteOldLog
(
System
.
IO
.
Path
.
Combine
(
workDir
,
"report"
));
string
workLogPath
=
System
.
IO
.
Path
.
Combine
(
workBoxText
,
"report"
);
//reportフォルダのパス
string
workLogPath
=
System
.
IO
.
Path
.
Combine
(
workBoxText
,
"report"
);
//reportフォルダのパス
checkDirPath
(
workLogPath
);
//なければ作成
checkDirPath
(
workLogPath
);
//なければ作成
string
outDiffPath
=
System
.
IO
.
Path
.
Combine
(
workBoxText
,
"OUT_DIFF"
);
//DIFF画像の出力先パス
string
outDiffPath
=
System
.
IO
.
Path
.
Combine
(
workBoxText
,
"OUT_DIFF"
);
//DIFF画像の出力先パス
checkDirPath
(
outDiffPath
);
//なければ作成
checkDirPath
(
outDiffPath
);
//なければ作成
bool
reportFlag
=
false
;
try
try
{
{
//検版レポートの入力チェック
//検版レポートの入力チェック
...
@@ -195,8 +207,6 @@ namespace CSRender
...
@@ -195,8 +207,6 @@ namespace CSRender
ripTime
.
Start
();
//計測開始
ripTime
.
Start
();
//計測開始
//必要に応じてページ引数を指定
//必要に応じてページ引数を指定
bool
pageFlag
=
false
;
string
selectedPage
=
""
;
if
(
PageRange
.
Text
==
"指定"
)
if
(
PageRange
.
Text
==
"指定"
)
{
{
pageFlag
=
true
;
pageFlag
=
true
;
...
@@ -259,8 +269,7 @@ namespace CSRender
...
@@ -259,8 +269,7 @@ namespace CSRender
ResultConsole
.
Text
+=
"< TIFF変換完了 >\r\n"
;
ResultConsole
.
Text
+=
"< TIFF変換完了 >\r\n"
;
ResultConsole
.
ScrollToEnd
();
ResultConsole
.
ScrollToEnd
();
DoEvents
();
DoEvents
();
string
reportContentsInfo
=
""
;
try
try
{
{
//レポートへの出力内容を編集
//レポートへの出力内容を編集
...
@@ -272,10 +281,7 @@ namespace CSRender
...
@@ -272,10 +281,7 @@ namespace CSRender
string
WorkCategory
=
"検版レポートの編集"
;
string
WorkCategory
=
"検版レポートの編集"
;
ExceptionMessage
(
ex
,
workLogPath
,
WorkCategory
);
ExceptionMessage
(
ex
,
workLogPath
,
WorkCategory
);
}
}
string
workDir
=
""
;
int
allPDFNum
=
0
;
int
NGPDFNum
=
0
;
//この時点での出力文字列を取得
//この時点での出力文字列を取得
string
tiffString
=
ResultConsole
.
Text
;
string
tiffString
=
ResultConsole
.
Text
;
try
try
...
@@ -285,22 +291,7 @@ namespace CSRender
...
@@ -285,22 +291,7 @@ namespace CSRender
//検版対象ファイル名の取得
//検版対象ファイル名の取得
string
[]
inspectionTargets
=
GetTargetList
(
targetBoxText
,
referenceBoxText
);
string
[]
inspectionTargets
=
GetTargetList
(
targetBoxText
,
referenceBoxText
);
allPDFNum
=
getNumOfTiff
(
inspectionTargets
,
targetTIFFPath
);
//検版する画像ファイルの総数
allPDFNum
=
getNumOfTiff
(
inspectionTargets
,
targetTIFFPath
);
//検版する画像ファイルの総数
string
appPath
=
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
().
Location
;
//モジュールのパスを取得
string
appDirectory
=
appPath
.
Substring
(
0
,
appPath
.
LastIndexOf
(
@"\"
)
+
1
);
//モジュールの存在するディレクトリを取得
workDir
=
System
.
IO
.
Path
.
Combine
(
appDirectory
,
"PureVerify.Data"
,
"RipVerify"
);
//前回のログが内部に残っていれば削除(エラー防止)
if
(
System
.
IO
.
Directory
.
EnumerateFileSystemEntries
(
System
.
IO
.
Path
.
Combine
(
workDir
,
"report"
)).
Any
())
{
DirectoryInfo
logDirctory
=
new
DirectoryInfo
(
System
.
IO
.
Path
.
Combine
(
workDir
,
"report"
));
FileInfo
[]
logFiles
=
logDirctory
.
GetFiles
();
foreach
(
FileInfo
delFile
in
logFiles
)
{
delFile
.
Delete
();
}
}
//exeのpathを取得
string
exePath
=
System
.
IO
.
Path
.
Combine
(
workDir
,
"bin"
,
"x64"
);
//隠しメニューの数値を初期化
//隠しメニューの数値を初期化
allNumBox
.
Text
=
allPDFNum
.
ToString
();
allNumBox
.
Text
=
allPDFNum
.
ToString
();
NGNumBox
.
Text
=
"0"
;
NGNumBox
.
Text
=
"0"
;
...
...
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