Skip to content

Commit

Permalink
ログ出力の上書きと追記が逆になっていたバグの修正
Browse files Browse the repository at this point in the history
コマンドライン出力のテスト実装
  • Loading branch information
ggslyman committed Feb 24, 2015
1 parent 24e5673 commit 74fb7ea
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 88 deletions.
10 changes: 9 additions & 1 deletion SpeechCast/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,13 @@ private void StartSpeaking()
isSpeakingWarningMessage = false;
isSpeaking = true;
StartSpeaking(text);
//コマンドライン引渡し
//ターゲット指定が空でなければ実行
if (UserConfig.CommandLineTargetPath != "")
{
System.Diagnostics.Process.Start(UserConfig.CommandLineTargetPath, @UserConfig.CommandLineParam);
}

//レスの出力処理とクリップボードコピー
if (UserConfig.OutputLog || UserConfig.CopyLog)
{
Expand Down Expand Up @@ -1035,7 +1042,8 @@ private void StartSpeaking()
//それを配列の数だけループ
foreach (string resText in ResArray)
{
using (var writer = new StreamWriter(UserConfig.OutputLogPath.Replace(".", fileNameIndex.ToString() + "."), UserConfig.LogAppendMode, OutputEncoding))
//using (var writer = new StreamWriter(UserConfig.OutputLogPath.Replace(".", fileNameIndex.ToString() + "."), UserConfig.LogAppendMode, OutputEncoding))
using (var writer = new StreamWriter(UserConfig.OutputLogPath, UserConfig.LogAppendMode, OutputEncoding))
{
var LogText = UserConfig.OutputLogFormat.Replace("#Res#", resText);
LogText = LogText.Replace("#Name#", res.Name);
Expand Down
Loading

0 comments on commit 74fb7ea

Please sign in to comment.