private void AskIfConfigurationSufficient(ConfigurationCompletedEventArgs args) { var message = TextKey.MessageBox_ClientConfigurationQuestion; var title = TextKey.MessageBox_ClientConfigurationQuestionTitle; var result = messageBox.Show(message, title, MessageBoxAction.YesNo, MessageBoxIcon.Question, runtimeWindow); args.AbortStartup = result == MessageBoxResult.Yes; }
private bool AbortAfterClientConfiguration() { var args = new ConfigurationCompletedEventArgs(); ActionRequired?.Invoke(args); logger.Info($"The user chose to {(args.AbortStartup ? "abort" : "continue")} startup after successful client configuration."); return(args.AbortStartup); }
public void Operations_MustAllowToAbortStartupForClientConfiguration() { var args = new ConfigurationCompletedEventArgs(); messageBox.Setup(m => m.Show(It.IsAny <TextKey>(), It.IsAny <TextKey>(), It.IsAny <MessageBoxAction>(), It.IsAny <MessageBoxIcon>(), It.IsAny <IWindow>())).Returns(MessageBoxResult.Yes); sut.TryStart(); sessionSequence.Raise(s => s.ActionRequired += null, args); Assert.IsTrue(args.AbortStartup); }