Skip to content

Commit

Permalink
Add custom message when no stream quality provided upon launching stream
Browse files Browse the repository at this point in the history
  • Loading branch information
laurencee committed Aug 8, 2016
1 parent 664ab68 commit 66c55a8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Livestream.Monitor/Model/StreamLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private void StartLivestreamer(string livestreamerArgs, string streamQuality, Me
EnableRaisingEvents = true
};
bool preventClose = string.IsNullOrEmpty(streamQuality);
bool preventClose = false;
// see below for output handler
proc.ErrorDataReceived +=
Expand Down Expand Up @@ -209,6 +209,13 @@ private void StartLivestreamer(string livestreamerArgs, string streamQuality, Me
// open the message box if it was somehow closed prior to the error being displayed
if (!messageBoxViewModel.IsActive) windowManager.ShowWindow(messageBoxViewModel, null, new WindowSettingsBuilder().SizeToContent().NoResizeBorderless().Create());
}
else if (string.IsNullOrEmpty(streamQuality))
{
messageBoxViewModel.MessageText += Environment.NewLine + Environment.NewLine +
"No stream quality provided: Manually close this window when you've finished reading the livestreamer output.";
if (!messageBoxViewModel.IsActive) windowManager.ShowWindow(messageBoxViewModel, null, new WindowSettingsBuilder().SizeToContent().NoResizeBorderless().Create());
}
else
messageBoxViewModel.TryClose();
});
Expand Down

0 comments on commit 66c55a8

Please sign in to comment.