Skip to content

Commit

Permalink
Merge pull request #9 from kphillpotts/Confrim-StreamCommand-Actions
Browse files Browse the repository at this point in the history
Added confirmation dialog if testing StreamCommand
  • Loading branch information
nuttylmao committed Jul 29, 2021
2 parents 49745be + 88375d5 commit 9b877e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,14 @@ private void TestCommands(List<Command> commandList)
MessageBox.Show(@"Please restart in admin mode to install OBSCommand.", "OBSCommand Not Installed", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}


if (commandList.OfType<StreamCommand>().Count() > 0)
{
var result = MessageBox.Show("You are about to execute a command that starts or stops your stream. Are you sure you want to continue?", "Potentially Risky Command", MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.No)
return;
}

string strCmdText;
strCmdText = string.Format(@"/server={0}:{1} /password=""{2}""", ServerText.Text, PortText.Text, PasswordText.Password);

Expand Down

0 comments on commit 9b877e1

Please sign in to comment.