/// <summary> /// The send response. /// </summary> /// <param name="response"> /// The response. /// </param> public static void SendResponse(SBString response) { SBPlus.Current.SetInputState(SBInputState.Dormant, "Sending response to SB/XA server."); SBPlusClient.LogInformation( "Responded to message." + response.GetStandardString() + "(" + Convert.ToString(DateTime.Now.Millisecond) + ")"); try { SBPlus.Current.SBPlusRuntime.RespondToLastMessage(response); } catch (SBApplicationException exception) { if (exception.ErrorCode.Equals("CS0049")) { SBDisplay.Display(SBDisplayTypes.Fatal, "An Encoding error occurred handing a message", exception); SBPlus.Current.SetInputState(SBInputState.WaitingForInput, "Encoding error."); } } catch (Exception exception2) { SBPlusClient.LogError("An error occurred handing a message.", exception2); SBPlus.Current.SetInputState(SBInputState.WaitingForInput, "An error occurred handing a message."); } }