private void ExecuteHandler(object sender, EventArgs e) { try { var textToExecute = textEditor.SelectedText; if (string.IsNullOrEmpty(textToExecute)) { textToExecute = textEditor.Text; } var login = Login.Text; var password = Password.Text; var host = Host.Text; int port = int.Parse(Port.Text); var connector = new EsConnector(host, port, login, password); string result = connector.Execute(textToExecute); output.Text = result.BeautifyJson(); } catch (Exception ex) { var message = ex.Message; message = System.Text.RegularExpressions.Regex.Unescape(message); output.Text = "Error : \r\n" + message; } }
private void ExecuteHandler(object sender, EventArgs e) { try { var textToExecute = textEditor.SelectedText; if (string.IsNullOrEmpty(textToExecute)) { textToExecute = textEditor.Text; } var login = Login.Text; var password = Password.Text; var host = Host.Text; int port = int.Parse(Port.Text); var connector = new EsConnector(host, port, login, password); string result = connector.Execute(textToExecute); output.Text = result.BeautifyJson(); } catch (Exception ex) { output.Text = "Exception : " + ex; } }
private void ExecuteHandler(object sender, EventArgs e) { try { var textToExecute = textEditor.SelectedText; if (string.IsNullOrEmpty(textToExecute)) textToExecute = textEditor.Text; var host = Host.Text; int port = int.Parse(Port.Text); var connector = new EsConnector(host, port); string result = connector.Execute(textToExecute); output.Text = result.ButifyJson(); } catch (Exception ex) { output.Text = "Exception : " + ex; } }
private void ExecuteHandler(object sender, EventArgs e) { try { var textToExecute = textEditor.SelectedText; if (string.IsNullOrEmpty(textToExecute)) textToExecute = textEditor.Text; var login = Login.Text; var password = Password.Text; var host = Host.Text; int port = int.Parse(Port.Text); var connector = new EsConnector(host, port, login, password); string result = connector.Execute(textToExecute); output.Text = result.BeautifyJson(); } catch (Exception ex) { var message = ex.Message; message = System.Text.RegularExpressions.Regex.Unescape(message); output.Text = "Error : \r\n" + message; } }