private void UserDialogExitProcessing(PopdownReason popdownReason) { // Log to Honorbuddy why we're exiting behavior... if (popdownReason.IsReasonKnown()) { string directiveRequester = (IsStopOnContinue ? "Profile Writer request" : popdownReason.IsPopdown() ? "Notification criteria no longer valid" : popdownReason.IsTimerExpiry() ? "Profile Writer request" : popdownReason.IsUserResponse() ? "User request" : "Profile Writer request"); string messageType = (popdownReason.IsTimerExpiry() ? "timer expired" : popdownReason.IsUserResponse() ? "user response" : popdownReason.IsPopdown() ? "completion criteria" : "info"); string terminationMessage = string.Format("{0} {1}", (popdownReason.IsBotStop() ? "Honorbuddy stopped due to " : "Continuing profile due to"), directiveRequester); TreeRoot.StatusText = terminationMessage; LogMessage(messageType, terminationMessage); } if (popdownReason.IsBotStop()) { TreeRoot.Stop(); } }
private void UserDialogExitProcessing(PopdownReason popdownReason) { // Log to Honorbuddy why we're exiting behavior... if (popdownReason.IsReasonKnown()) { string directiveRequester = (IsStopOnContinue ? "Profile Writer request" : popdownReason.IsPopdown() ? "Notification criteria no longer valid" : popdownReason.IsTimerExpiry() ? "Profile Writer request" : popdownReason.IsUserResponse() ? "User request" : "Profile Writer request"); string messageType = (popdownReason.IsTimerExpiry() ? "timer expired" : popdownReason.IsUserResponse() ? "user response" : popdownReason.IsPopdown() ? "completion criteria" : "info"); string terminationMessage = string.Format("{0} {1}", (popdownReason.IsBotStop() ? "Honorbuddy stopped due to " : "Continuing profile due to"), directiveRequester); TreeRoot.StatusText = terminationMessage; DialogText = DialogText.Replace(@"\n", System.Environment.NewLine).Replace(@"\t", "\t"); QBCLog.DeveloperInfo("[{0}, {1}] {2}\nDisposition: {3}", DialogTitle, messageType, DialogText, terminationMessage); } if (popdownReason.IsBotStop()) { TreeRoot.Stop(); } }