Ejemplo n.º 1
0
 public static void CloseForm()
 {
     if (messageBox != null)
     {
         messageBox.Close();
         messageBox = null;
     }
 }
Ejemplo n.º 2
0
        public static void Show(string fname, string json, List <string> highlights = null)
        {
            TCLinkResponse response = Helper.DeserializeLinkResponse(json);

            json = response == null ? json : Helper.Stringify(response);
            if (json.IndexOf("{") == 0)
            {
                json = RemoveCardWorkflowControls(json);
            }
            messageBox = new JsonMessageBox();
            messageBox.SetLabel(fname);
            messageBox.SetContents(json);
            Highlight(messageBox.richTextBox1, highlights);
            messageBox.Show();
        }
Ejemplo n.º 3
0
        public static async Task SendRequest(string endpoint, string contents, int timeout = 100)
        {
            if (endpoint?.StartsWith("http", StringComparison.OrdinalIgnoreCase) ?? false)
            {
                try
                {
                    var response = await CallWebService(endpoint, contents, timeout);

                    SessionData.SawOutput("SSEOutput", response);
                }
                catch (Exception xcp)
                {
                    JsonMessageBox.Show("Error", xcp.Message);
                }
                return;
            }
            System.Diagnostics.Debug.WriteLine($"Unable to send message to {endpoint} :: {contents}");
        }