Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GetAdocUI
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
GetAdocUI
Commits
67012275
Commit
67012275
authored
Dec 14, 2021
by
tsuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同じディレクトリで2回目を実行するとImageフォルダが初期化される不具合を修正
parent
a52ec000
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
36 deletions
+8
-36
MainWindow.xaml.cs
GetADoc/MainWindow.xaml.cs
+1
-1
RunBatch.cs
GetADoc/RunBatch.cs
+7
-35
No files found.
GetADoc/MainWindow.xaml.cs
View file @
67012275
...
...
@@ -148,7 +148,7 @@ namespace GetADoc
MessageBoxButton
.
YesNo
,
MessageBoxImage
.
None
);
if
(
OverwriteADoc
==
MessageBoxResult
.
Yes
)
{
RunBatch
.
deleteFolder
(
filePath
,
fileName
,
IconFlag
,
SepaFlag
);
}
else
if
(
OverwriteADoc
==
MessageBoxResult
.
No
)
{
...
...
GetADoc/RunBatch.cs
View file @
67012275
...
...
@@ -22,38 +22,10 @@ namespace GetADoc
return
inFileName
;
}
//先に同名フォルダが存在すれば削除(エラー回避のため)
public
static
void
deleteFolder
(
string
filePath
,
string
fileName
,
bool
icon
,
bool
sepa
)
{
File
.
Delete
(
filePath
+
fileName
+
".adoc"
);
File
.
Delete
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"config.adoc"
));
if
(
sepa
==
true
)
{
File
.
Delete
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"IncDoc.adoc"
));
}
if
(
Directory
.
Exists
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"Images"
)))
{
Directory
.
Delete
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"Images"
),
true
);
}
if
(
Directory
.
Exists
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"icons"
))
&&
icon
==
true
)
{
Directory
.
Delete
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"icons"
),
true
);
}
if
(
Directory
.
Exists
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"Sub_First"
))
&&
sepa
==
true
)
{
Directory
.
Delete
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"Sub_First"
),
true
);
}
if
(
Directory
.
Exists
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"Sub_Second"
))
&&
sepa
==
true
)
{
Directory
.
Delete
(
System
.
IO
.
Path
.
Combine
(
filePath
,
"Sub_Second"
),
true
);
}
}
//バッチファイルの実行
public
static
void
runBatch
(
bool
icon
,
bool
screen
,
bool
sepa
,
string
fileName
,
string
filePath
)
{
//テンポラリフォルダの作成
var
tempPath
=
TemporaryFolder
.
MakeTempFolder
();
//コンソール呼び出し
ProcessStartInfo
processStartInfo
=
new
ProcessStartInfo
();
...
...
@@ -77,7 +49,11 @@ namespace GetADoc
{
processStartInfo
.
Arguments
+=
"/SepaDoc "
;
}
var
pathAndName
=
System
.
IO
.
Path
.
Combine
(
tempPath
,
fileName
);
//既存の生成物が指定先フォルダに存在する場合は上書きする
processStartInfo
.
Arguments
+=
"/Force "
;
var
pathAndName
=
System
.
IO
.
Path
.
Combine
(
filePath
,
fileName
);
processStartInfo
.
Arguments
+=
pathAndName
;
//GetADoc.batを実行
...
...
@@ -85,11 +61,7 @@ namespace GetADoc
process
.
WaitForExit
();
process
.
Close
();
//指定されたフォルダに生成物を移動
RunBatch
.
MoveDirectory
(
tempPath
,
filePath
);
//テンポラリフォルダの消去
TemporaryFolder
.
DeleteTempFolder
(
tempPath
);
}
/// <summary>
...
...
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