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
0a6b9a61
Commit
0a6b9a61
authored
Dec 14, 2021
by
tsuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
検版レポート入力の設定を修正(aaaで実行すると落ちる不具合)
parent
d820414f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
23 deletions
+39
-23
FilePathSelect.cs
Code/CSRender/CSRender/FilePathSelect.cs
+37
-6
MainWindow.xaml.cs
Code/CSRender/CSRender/MainWindow.xaml.cs
+2
-17
No files found.
Code/CSRender/CSRender/FilePathSelect.cs
View file @
0a6b9a61
...
@@ -63,11 +63,7 @@ namespace CSRender
...
@@ -63,11 +63,7 @@ namespace CSRender
workBox
.
Text
=
dropFiles
[
0
];
workBox
.
Text
=
dropFiles
[
0
];
workBox
.
Focus
();
workBox
.
Focus
();
workBox
.
Select
(
this
.
workBox
.
Text
.
Length
,
0
);
workBox
.
Select
(
this
.
workBox
.
Text
.
Length
,
0
);
if
(
reportBox
.
Text
==
""
)
//検版レポートが未入力ならば作業フォルダ先に指定
{
reportBox
.
Text
=
System
.
IO
.
Path
.
Combine
(
workBox
.
Text
,
"report"
);
reportBox
.
Text
+=
@"\"
;
}
}
}
private
void
ReportBox_Drop
(
object
sender
,
System
.
Windows
.
DragEventArgs
e
)
private
void
ReportBox_Drop
(
object
sender
,
System
.
Windows
.
DragEventArgs
e
)
...
@@ -163,7 +159,7 @@ namespace CSRender
...
@@ -163,7 +159,7 @@ namespace CSRender
writeText
+=
"**WorkDirRoot: \""
+
workFolderPath
+
"\"\r\n"
;
writeText
+=
"**WorkDirRoot: \""
+
workFolderPath
+
"\"\r\n"
;
writeText
+=
"**InspQuality: \"3\"\r\n"
;
writeText
+=
"**InspQuality: \"3\"\r\n"
;
writeText
+=
"**MarkDistance: \"50\"\r\n"
;
writeText
+=
"**MarkDistance: \"50\"\r\n"
;
writeText
+=
"**ReportEncodeType: \"
1
\"\r\n"
;
writeText
+=
"**ReportEncodeType: \"
2
\"\r\n"
;
writeText
+=
"**WndPosLeft: \"348\"\r\n"
;
writeText
+=
"**WndPosLeft: \"348\"\r\n"
;
writeText
+=
"**WndPosTop: \"125\"\r\n"
;
writeText
+=
"**WndPosTop: \"125\"\r\n"
;
writeText
+=
"**WndPosRight: \"933\"\r\n"
;
writeText
+=
"**WndPosRight: \"933\"\r\n"
;
...
@@ -178,5 +174,40 @@ namespace CSRender
...
@@ -178,5 +174,40 @@ namespace CSRender
streamWriter
.
Close
();
streamWriter
.
Close
();
}
}
//レポート出力パスの確認
private
bool
checkReportPath
()
{
bool
reportFlag
=
false
;
string
pdfReportPath
=
""
;
string
pdfReportName
=
""
;
int
directoryCount
=
0
;
if
(
reportBox
.
Text
!=
""
)
//入力があるか
{
directoryCount
=
reportBox
.
Text
.
Split
(
char
.
Parse
(
@"\"
)).
Length
-
1
;
//入力文字列がファイル名のみかディレクトリも含むか
if
(
directoryCount
==
0
)
//ファイル名のみならば作業ディレクトリのreportフォルダに出力
{
reportBox
.
Text
=
System
.
IO
.
Path
.
Combine
(
workBox
.
Text
,
"report"
,
reportBox
.
Text
);
}
pdfReportPath
=
reportBox
.
Text
.
Substring
(
0
,
reportBox
.
Text
.
LastIndexOf
(
@"\"
));
//メニュー入力から出力パスを取得
pdfReportName
=
reportBox
.
Text
.
Substring
(
reportBox
.
Text
.
LastIndexOf
(
@"\"
));
//メニュー入力から出力パスを取得
if
(!
System
.
IO
.
Path
.
IsPathRooted
(
pdfReportPath
))
//指定したパス文字列にルートが含まれているかどうか
{
pdfReportPath
=
System
.
IO
.
Path
.
Combine
(
workBox
.
Text
,
"report"
,
pdfReportPath
);
//含まれていなければ作業フォルダのreportフォルダに出力
}
if
(!
Directory
.
Exists
(
pdfReportPath
))
//指定先のフォルダが存在するか
{
Directory
.
CreateDirectory
(
pdfReportPath
);
//なければ作成
}
pdfReportPath
=
System
.
IO
.
Path
.
GetFullPath
(
pdfReportPath
);
//フルパスを取得
if
(
pdfReportName
.
Length
<
4
||
pdfReportName
.
Substring
(
pdfReportName
.
Length
-
4
)
!=
".pdf"
)
//入力に拡張子がついているか
{
pdfReportName
+=
".pdf"
;
}
reportBox
.
Text
=
pdfReportPath
+
pdfReportName
;
reportFlag
=
true
;
}
return
reportFlag
;
}
}
}
}
}
Code/CSRender/CSRender/MainWindow.xaml.cs
View file @
0a6b9a61
...
@@ -192,21 +192,7 @@ namespace CSRender
...
@@ -192,21 +192,7 @@ namespace CSRender
DoEvents
();
DoEvents
();
//検版レポートの入力チェック
//検版レポートの入力チェック
bool
reportFlag
=
false
;
bool
reportFlag
=
checkReportPath
();
string
pdfReportPath
=
""
;
if
(
reportBox
.
Text
!=
""
)
//入力があるか
{
pdfReportPath
=
reportBox
.
Text
.
Substring
(
0
,
reportBox
.
Text
.
LastIndexOf
(
@"\"
));
if
(!
Directory
.
Exists
(
pdfReportPath
))
//指定先のフォルダが存在するか
{
Directory
.
CreateDirectory
(
pdfReportPath
);
}
if
(
reportBox
.
Text
.
Substring
(
reportBox
.
Text
.
Length
-
4
)
!=
".pdf"
)
//入力に拡張子がついているか
{
reportBox
.
Text
+=
".pdf"
;
}
reportFlag
=
true
;
}
//PureVerifyの実行
//PureVerifyの実行
string
workDir
=
CompareTIFF
.
runPureVerify
(
targetTIFFPath
,
referenceTIFFPath
,
workBox
.
Text
string
workDir
=
CompareTIFF
.
runPureVerify
(
targetTIFFPath
,
referenceTIFFPath
,
workBox
.
Text
...
@@ -289,8 +275,7 @@ namespace CSRender
...
@@ -289,8 +275,7 @@ namespace CSRender
/// </summary>
/// </summary>
/// <param name="pageFlag">ページ範囲の指定があるかどうかを示すフラグ</param>
/// <param name="pageFlag">ページ範囲の指定があるかどうかを示すフラグ</param>
/// <param name="selectedPage">入力されたページ数</param>
/// <param name="selectedPage">入力されたページ数</param>
/// <param name="e"></param>
/// <param name="TIFFresult">CSRenderの処理出力文</param>
/// <param name="e"></param>
///
///
private
void
TIFFButtonClick
(
object
sender
,
RoutedEventArgs
e
)
private
void
TIFFButtonClick
(
object
sender
,
RoutedEventArgs
e
)
{
{
...
...
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