diff --git a/driver/connect.c b/driver/connect.c index 7afa1245..683f30ee 100644 --- a/driver/connect.c +++ b/driver/connect.c @@ -583,6 +583,37 @@ static SQLRETURN dbc_curl_init(esodbc_dbc_st *dbc) INFOH(dbc, "no username provided: auth disabled."); } + /* proxy parameters */ + if (dbc->proxy_url.cnt) { + dbc->curl_err = curl_easy_setopt(curl, CURLOPT_PROXY, + dbc->proxy_url.str); + if (dbc->curl_err != CURLE_OK) { + ERRH(dbc, "libcurl: failed to set the proxy URL."); + goto err; + } + if (dbc->proxy_uid.cnt) { + dbc->curl_err = curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, + dbc->proxy_uid.str); + if (dbc->curl_err != CURLE_OK) { + ERRH(dbc, "libcurl: failed to set the proxy username."); + goto err; + } + if (dbc->proxy_pwd.cnt) { + dbc->curl_err = curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, + dbc->proxy_pwd.str); + if (dbc->curl_err != CURLE_OK) { + ERRH(dbc, "libcurl: failed to set the proxy password."); + goto err; + } + } + } + } else { + dbc->curl_err = curl_easy_setopt(curl, CURLOPT_PROXY, ""); + if (dbc->curl_err != CURLE_OK) { + WARNH(dbc, "libcurl: failed to generally disable proxying."); + } + } + /* set the write call-back for answers */ dbc->curl_err = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); @@ -1130,7 +1161,7 @@ SQLRETURN config_dbc(esodbc_dbc_st *dbc, esodbc_dsn_attrs_st *attrs) const static wstr_st http_prefix = WSTR_INIT("http://"); const static wstr_st https_prefix = WSTR_INIT("https://"); wstr_st prefix; - int cnt, ipv6; + int cnt, ipv6, n; SQLBIGINT secure, timeout, max_body_size, max_fetch_size, varchar_limit; SQLWCHAR buff_url[ESODBC_MAX_URL_LEN]; wstr_st url = (wstr_st) { @@ -1191,7 +1222,7 @@ SQLRETURN config_dbc(esodbc_dbc_st *dbc, esodbc_dsn_attrs_st *attrs) if (secure) { if (! wstr_to_utf8(&attrs->ca_path, &dbc->ca_path)) { - ERRNH(dbc, "failed to convert CA path `" LWPDL "` to UTF8.", + ERRH(dbc, "failed to convert CA path `" LWPDL "` to UTF8.", LWSTR(&attrs->ca_path)); SET_HDIAG(dbc, SQL_STATE_HY000, "reading the CA file path " "failed", 0); @@ -1222,7 +1253,7 @@ SQLRETURN config_dbc(esodbc_dbc_st *dbc, esodbc_dsn_attrs_st *attrs) url.cnt = (size_t)cnt; } if (! wstr_to_utf8(&url, &dbc->close_url)) { - ERRNH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", LWSTR(&url)); + ERRH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", LWSTR(&url)); SET_HDIAG(dbc, SQL_STATE_HY000, "server SQL URL's UTF8 conversion " "failed", 0); goto err; @@ -1233,7 +1264,7 @@ SQLRETURN config_dbc(esodbc_dbc_st *dbc, esodbc_dsn_attrs_st *attrs) * dup'ed since libcurl needs the 0 terminator */ url.cnt -= sizeof(ELASTIC_SQL_CLOSE_SUBPATH) - /*\0*/1; if (! wstr_to_utf8(&url, &dbc->url)) { - ERRNH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", LWSTR(&url)); + ERRH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", LWSTR(&url)); SET_HDIAG(dbc, SQL_STATE_HY000, "server SQL URL's UTF8 conversion " "failed", 0); goto err; @@ -1258,7 +1289,7 @@ SQLRETURN config_dbc(esodbc_dbc_st *dbc, esodbc_dsn_attrs_st *attrs) url.cnt = (size_t)cnt; } if (! wstr_to_utf8(&url, &dbc->root_url)) { - ERRNH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", LWSTR(&url)); + ERRH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", LWSTR(&url)); SET_HDIAG(dbc, SQL_STATE_HY000, "server root URL's UTF8 conversion " "failed", 0); goto err; @@ -1312,6 +1343,74 @@ SQLRETURN config_dbc(esodbc_dbc_st *dbc, esodbc_dsn_attrs_st *attrs) dbc->timeout = (SQLUINTEGER)timeout; INFOH(dbc, "timeout: %lu.", dbc->timeout); + /* + * proxy settings + */ + if (wstr2bool(&attrs->proxy_enabled)) { + ipv6 = wcsnstr(attrs->proxy_host.str, attrs->proxy_host.cnt, L':') != + NULL; + cnt = swprintf(url.str, sizeof(buff_url)/sizeof(*buff_url), + L"" WPFWP_LDESC "://" WPFCP_DESC WPFWP_LDESC WPFCP_DESC, + LWSTR(&attrs->proxy_type), + ipv6 ? "[" : "", LWSTR(&attrs->proxy_host), ipv6 ? "]" : ""); + if (cnt > 0 && attrs->proxy_port.cnt) { + n = swprintf(url.str + cnt, + sizeof(buff_url)/sizeof(*buff_url) - cnt, + L":" WPFWP_LDESC, LWSTR(&attrs->proxy_port)); + } else { + n = 0; + } + if (cnt <= 0 || n < 0) { + ERRNH(dbc, "failed to print proxy URL out of type: `" LWPDL "`, " + "host: `" LWPDL "` and port: `" LWPDL "`.", + LWSTR(&attrs->proxy_type), LWSTR(&attrs->proxy_host), + LWSTR(&attrs->proxy_port)); + SET_HDIAG(dbc, SQL_STATE_HY000, "printing proxy URL failed", 0); + goto err; + } else { + url.cnt = cnt + n; + } + if (! wstr_to_utf8(&url, &dbc->proxy_url)) { + ERRH(dbc, "failed to convert URL `" LWPDL "` to UTF8.", + LWSTR(&url)); + SET_HDIAG(dbc, SQL_STATE_HY000, "proxy URL's UTF8 conversion " + "failed", 0); + goto err; + } + INFOH(dbc, "proxy URL: `%s`.", dbc->proxy_url.str); + + if (wstr2bool(&attrs->proxy_auth_enabled)) { + if (attrs->proxy_auth_uid.cnt) { + if (! wstr_to_utf8(&attrs->proxy_auth_uid, &dbc->proxy_uid)) { + ERRH(dbc, "failed to convert proxy user ID `" LWPDL "` to" + " UTF8.", LWSTR(&attrs->proxy_auth_uid)); + SET_HDIAG(dbc, SQL_STATE_HY000, "proxy UID's UTF8 " + "conversion failed", 0); + goto err; + } + INFOH(dbc, "proxy UID: `%s`.", dbc->proxy_uid.str); + + if (attrs->proxy_auth_pwd.cnt) { + if (! wstr_to_utf8(&attrs->proxy_auth_pwd, + &dbc->proxy_pwd)) { + ERRH(dbc, "failed to convert proxy password [%zu] `%s`" + " to UTF8", attrs->proxy_auth_pwd.cnt, + ESODBC_PWD_VAL_SUBST); + SET_HDIAG(dbc, SQL_STATE_HY000, "proxy password's " + "UTF8 conversion failed", 0); + goto err; + } + /* indicates the presence of a non-empty password */ + INFOH(dbc, "proxy PWD: " ESODBC_PWD_VAL_SUBST "."); + } + } + } else { + INFOH(dbc, "proxy authentication disabled."); + } + } else { + INFOH(dbc, "proxy disabled."); + } + /* * set max body size */ @@ -1513,6 +1612,21 @@ void cleanup_dbc(esodbc_dbc_st *dbc) } else { assert(dbc->pwd.cnt == 0); } + if (dbc->proxy_url.str) { + free(dbc->proxy_url.str); + dbc->proxy_url.str = NULL; + dbc->proxy_url.cnt = 0; + } + if (dbc->proxy_uid.str) { + free(dbc->proxy_uid.str); + dbc->proxy_uid.str = NULL; + dbc->proxy_uid.cnt = 0; + } + if (dbc->proxy_pwd.str) { + free(dbc->proxy_pwd.str); + dbc->proxy_pwd.str = NULL; + dbc->proxy_pwd.cnt = 0; + } if (dbc->fetch.str) { free(dbc->fetch.str); dbc->fetch.str = NULL; diff --git a/driver/defs.h b/driver/defs.h index c9b22f7c..973be647 100644 --- a/driver/defs.h +++ b/driver/defs.h @@ -126,7 +126,7 @@ #define ESODBC_MAX_URL_LEN 2048 /* maximum DNS attribute value length (should be long enought to accomodate a * decently long FQ file path name) */ -#define ESODBC_DSN_MAX_ATTR_LEN 1024 +#define ESODBC_DSN_MAX_ATTR_LEN 768 /* SQL plugin's REST endpoint for SQL */ #define ELASTIC_SQL_PATH "/_sql" @@ -167,7 +167,7 @@ /* default global request timeout (0: no timeout) */ #define ESODBC_DEF_TIMEOUT "0" /* don't follow redirection from the server */ -#define ESODBC_DEF_FOLLOW "yes" +#define ESODBC_DEF_FOLLOW "true" /* packing of REST bodies (JSON or CBOR) */ #define ESODBC_DEF_PACKING ESODBC_DSN_PACK_CBOR /* zlib compression of REST bodies (auto/true/false) */ @@ -177,9 +177,9 @@ /* default tracing level */ #define ESODBC_DEF_TRACE_LEVEL "WARN" /* default TZ handling */ -#define ESODBC_DEF_APPLY_TZ "no" +#define ESODBC_DEF_APPLY_TZ "false" /* default early execution flag */ -#define ESODBC_DEF_EARLY_EXEC "yes" +#define ESODBC_DEF_EARLY_EXEC "true" /* default of scientific floats printing */ #define ESODBC_DEF_SCI_FLOATS ESODBC_DSN_FLTS_DEF #define ESODBC_PWD_VAL_SUBST "" @@ -187,6 +187,8 @@ #define ESODBC_DEF_ESC_PVA "true" #define ESODBC_DEF_IDX_INC_FROZEN "false" #define ESODBC_DEF_VARCHAR_LIMIT "0" +#define ESODBC_DEF_PROXY_ENABLED "false" +#define ESODBC_DEF_PROXY_AUTH_ENA "false" /* * diff --git a/driver/dsn.c b/driver/dsn.c index 4343283e..5fdc5eb6 100644 --- a/driver/dsn.c +++ b/driver/dsn.c @@ -82,6 +82,13 @@ int assign_dsn_attr(esodbc_dsn_attrs_st *attrs, {&MK_WSTR(ESODBC_DSN_MFIELD_LENIENT), &attrs->mfield_lenient}, {&MK_WSTR(ESODBC_DSN_ESC_PVA), &attrs->auto_esc_pva}, {&MK_WSTR(ESODBC_DSN_IDX_INC_FROZEN), &attrs->idx_inc_frozen}, + {&MK_WSTR(ESODBC_DSN_PROXY_ENABLED), &attrs->proxy_enabled}, + {&MK_WSTR(ESODBC_DSN_PROXY_TYPE), &attrs->proxy_type}, + {&MK_WSTR(ESODBC_DSN_PROXY_HOST), &attrs->proxy_host}, + {&MK_WSTR(ESODBC_DSN_PROXY_PORT), &attrs->proxy_port}, + {&MK_WSTR(ESODBC_DSN_PROXY_AUTH_ENA), &attrs->proxy_auth_enabled}, + {&MK_WSTR(ESODBC_DSN_PROXY_AUTH_UID), &attrs->proxy_auth_uid}, + {&MK_WSTR(ESODBC_DSN_PROXY_AUTH_PWD), &attrs->proxy_auth_pwd}, {&MK_WSTR(ESODBC_DSN_TRACE_ENABLED), &attrs->trace_enabled}, {&MK_WSTR(ESODBC_DSN_TRACE_FILE), &attrs->trace_file}, {&MK_WSTR(ESODBC_DSN_TRACE_LEVEL), &attrs->trace_level}, @@ -418,6 +425,13 @@ long TEST_API write_00_list(esodbc_dsn_attrs_st *attrs, {&MK_WSTR(ESODBC_DSN_MFIELD_LENIENT), &attrs->mfield_lenient}, {&MK_WSTR(ESODBC_DSN_ESC_PVA), &attrs->auto_esc_pva}, {&MK_WSTR(ESODBC_DSN_IDX_INC_FROZEN), &attrs->idx_inc_frozen}, + {&MK_WSTR(ESODBC_DSN_PROXY_ENABLED), &attrs->proxy_enabled}, + {&MK_WSTR(ESODBC_DSN_PROXY_TYPE), &attrs->proxy_type}, + {&MK_WSTR(ESODBC_DSN_PROXY_HOST), &attrs->proxy_host}, + {&MK_WSTR(ESODBC_DSN_PROXY_PORT), &attrs->proxy_port}, + {&MK_WSTR(ESODBC_DSN_PROXY_AUTH_ENA), &attrs->proxy_auth_enabled}, + {&MK_WSTR(ESODBC_DSN_PROXY_AUTH_UID), &attrs->proxy_auth_uid}, + {&MK_WSTR(ESODBC_DSN_PROXY_AUTH_PWD), &attrs->proxy_auth_pwd}, {&MK_WSTR(ESODBC_DSN_TRACE_ENABLED), &attrs->trace_enabled}, {&MK_WSTR(ESODBC_DSN_TRACE_FILE), &attrs->trace_file}, {&MK_WSTR(ESODBC_DSN_TRACE_LEVEL), &attrs->trace_level}, @@ -704,6 +718,35 @@ BOOL write_system_dsn(esodbc_dsn_attrs_st *new_attrs, &new_attrs->idx_inc_frozen, old_attrs ? &old_attrs->idx_inc_frozen : NULL }, + { + &MK_WSTR(ESODBC_DSN_PROXY_ENABLED), &new_attrs->proxy_enabled, + old_attrs ? &old_attrs->proxy_enabled : NULL + }, + { + &MK_WSTR(ESODBC_DSN_PROXY_TYPE), &new_attrs->proxy_type, + old_attrs ? &old_attrs->proxy_type : NULL + }, + { + &MK_WSTR(ESODBC_DSN_PROXY_HOST), &new_attrs->proxy_host, + old_attrs ? &old_attrs->proxy_host : NULL + }, + { + &MK_WSTR(ESODBC_DSN_PROXY_PORT), &new_attrs->proxy_port, + old_attrs ? &old_attrs->proxy_port : NULL + }, + { + &MK_WSTR(ESODBC_DSN_PROXY_AUTH_ENA), + &new_attrs->proxy_auth_enabled, + old_attrs ? &old_attrs->proxy_auth_enabled : NULL + }, + { + &MK_WSTR(ESODBC_DSN_PROXY_AUTH_UID), &new_attrs->proxy_auth_uid, + old_attrs ? &old_attrs->proxy_auth_uid : NULL + }, + { + &MK_WSTR(ESODBC_DSN_PROXY_AUTH_PWD), &new_attrs->proxy_auth_pwd, + old_attrs ? &old_attrs->proxy_auth_pwd : NULL + }, { &MK_WSTR(ESODBC_DSN_TRACE_ENABLED), &new_attrs->trace_enabled, old_attrs ? &old_attrs->trace_enabled : NULL @@ -797,6 +840,13 @@ long TEST_API write_connection_string(esodbc_dsn_attrs_st *attrs, {&attrs->mfield_lenient, &MK_WSTR(ESODBC_DSN_MFIELD_LENIENT)}, {&attrs->auto_esc_pva, &MK_WSTR(ESODBC_DSN_ESC_PVA)}, {&attrs->idx_inc_frozen, &MK_WSTR(ESODBC_DSN_IDX_INC_FROZEN)}, + {&attrs->proxy_enabled, &MK_WSTR(ESODBC_DSN_PROXY_ENABLED)}, + {&attrs->proxy_type, &MK_WSTR(ESODBC_DSN_PROXY_TYPE)}, + {&attrs->proxy_host, &MK_WSTR(ESODBC_DSN_PROXY_HOST)}, + {&attrs->proxy_port, &MK_WSTR(ESODBC_DSN_PROXY_PORT)}, + {&attrs->proxy_auth_enabled, &MK_WSTR(ESODBC_DSN_PROXY_AUTH_ENA)}, + {&attrs->proxy_auth_uid, &MK_WSTR(ESODBC_DSN_PROXY_AUTH_UID)}, + {&attrs->proxy_auth_pwd, &MK_WSTR(ESODBC_DSN_PROXY_AUTH_PWD)}, {&attrs->trace_enabled, &MK_WSTR(ESODBC_DSN_TRACE_ENABLED)}, {&attrs->trace_file, &MK_WSTR(ESODBC_DSN_TRACE_FILE)}, {&attrs->trace_level, &MK_WSTR(ESODBC_DSN_TRACE_LEVEL)}, @@ -909,6 +959,13 @@ void assign_dsn_defaults(esodbc_dsn_attrs_st *attrs) &MK_WSTR(ESODBC_DSN_IDX_INC_FROZEN), &MK_WSTR(ESODBC_DEF_IDX_INC_FROZEN), /*overwrite?*/FALSE); + res |= assign_dsn_attr(attrs, + &MK_WSTR(ESODBC_DSN_PROXY_ENABLED), + &MK_WSTR(ESODBC_DEF_PROXY_ENABLED), /*overwrite?*/FALSE); + res |= assign_dsn_attr(attrs, + &MK_WSTR(ESODBC_DSN_PROXY_AUTH_ENA), + &MK_WSTR(ESODBC_DEF_PROXY_AUTH_ENA), /*overwrite?*/FALSE); + /* default: no trace file */ res |= assign_dsn_attr(attrs, &MK_WSTR(ESODBC_DSN_TRACE_ENABLED), diff --git a/driver/dsn.h b/driver/dsn.h index 55465547..ed4ac56a 100644 --- a/driver/dsn.h +++ b/driver/dsn.h @@ -41,6 +41,13 @@ #define ESODBC_DSN_MFIELD_LENIENT "MultiFieldLenient" #define ESODBC_DSN_ESC_PVA "AutoEscapePVA" #define ESODBC_DSN_IDX_INC_FROZEN "IndexIncludeFrozen" +#define ESODBC_DSN_PROXY_ENABLED "ProxyEnabled" +#define ESODBC_DSN_PROXY_TYPE "ProxyType" +#define ESODBC_DSN_PROXY_HOST "ProxyHost" +#define ESODBC_DSN_PROXY_PORT "ProxyPort" +#define ESODBC_DSN_PROXY_AUTH_ENA "ProxyAuthEnabled" +#define ESODBC_DSN_PROXY_AUTH_UID "ProxyAuthUID" +#define ESODBC_DSN_PROXY_AUTH_PWD "ProxyAuthPWD" #define ESODBC_DSN_TRACE_ENABLED "TraceEnabled" #define ESODBC_DSN_TRACE_FILE "TraceFile" #define ESODBC_DSN_TRACE_LEVEL "TraceLevel" @@ -85,10 +92,18 @@ typedef struct { wstr_st mfield_lenient; wstr_st auto_esc_pva; wstr_st idx_inc_frozen; + wstr_st proxy_enabled; + wstr_st proxy_type; + wstr_st proxy_host; + wstr_st proxy_port; + wstr_st proxy_auth_enabled; + wstr_st proxy_auth_uid; + wstr_st proxy_auth_pwd; wstr_st trace_enabled; wstr_st trace_file; wstr_st trace_level; -#define ESODBC_DSN_ATTRS_COUNT 29 +#define ESODBC_DSN_ATTRS_COUNT 36 + SQLWCHAR buff[ESODBC_DSN_ATTRS_COUNT * ESODBC_DSN_MAX_ATTR_LEN]; /* DSN reading/writing functions are passed a SQLSMALLINT length param */ #if SHRT_MAX < ESODBC_DSN_ATTRS_COUNT * ESODBC_DSN_MAX_ATTR_LEN diff --git a/driver/handles.h b/driver/handles.h index 98789927..6dc74874 100644 --- a/driver/handles.h +++ b/driver/handles.h @@ -133,6 +133,10 @@ typedef struct struct_dbc { wstr_st server; /* ~ name; requested with SQLGetInfo(SQL_SERVER_NAME) */ wstr_st catalog; /* cached value; checked against if app setting it */ wstr_st srv_ver; /* server version: SQLGetInfo(SQL_DBMS_VER) */ + + cstr_st proxy_url; + cstr_st proxy_uid; + cstr_st proxy_pwd; cstr_st url; /* SQL URL (posts) */ cstr_st close_url; /* SQL close URL (posts) */ cstr_st root_url; /* root URL (gets) */ @@ -145,6 +149,7 @@ typedef struct struct_dbc { ESODBC_SEC_MAX /* meta */ } secure; cstr_st ca_path; + cstr_st uid; cstr_st pwd; SQLUINTEGER timeout; diff --git a/driver/odbc.c b/driver/odbc.c index 491cdd90..18f31629 100644 --- a/driver/odbc.c +++ b/driver/odbc.c @@ -68,6 +68,7 @@ BOOL WINAPI DllMain( DWORD fdwReason, // reason for calling function LPVOID lpReserved) // reserved { + SQLWCHAR path[MAX_PATH]; // Perform actions based on the reason for calling. switch (fdwReason) { // Initialize once for each new process. @@ -77,6 +78,10 @@ BOOL WINAPI DllMain( return FALSE; } INFO("process %u attached.", GetCurrentProcessId()); + if (GetModuleFileNameW(NULL, path, sizeof(path)/sizeof(*path)) + > 0) { + INFO("process path: `" PFWP_DESC "`.", path); + } break; // Do thread-specific initialization. diff --git a/driver/util.c b/driver/util.c index 8536a998..68314811 100644 --- a/driver/util.c +++ b/driver/util.c @@ -19,7 +19,7 @@ BOOL wstr2bool(wstr_st *val) case /*""*/0: return FALSE; case /*0*/1: return ! EQ_CASE_WSTR(val, &MK_WSTR("0")); case /*no*/2: return ! EQ_CASE_WSTR(val, &MK_WSTR("no")); - case /*no*/3: return ! EQ_CASE_WSTR(val, &MK_WSTR("off")); + case /*off*/3: return ! EQ_CASE_WSTR(val, &MK_WSTR("off")); case /*false*/5: return ! EQ_CASE_WSTR(val, &MK_WSTR("false")); } /*INDENT-ON*/ diff --git a/dsneditor/EsOdbcDsnEditor/DSNEditorForm.Designer.cs b/dsneditor/EsOdbcDsnEditor/DSNEditorForm.Designer.cs index d54646cb..f84c4007 100644 --- a/dsneditor/EsOdbcDsnEditor/DSNEditorForm.Designer.cs +++ b/dsneditor/EsOdbcDsnEditor/DSNEditorForm.Designer.cs @@ -40,61 +40,7 @@ private void InitializeComponent() this.cancelButton = new System.Windows.Forms.Button(); this.testButton = new System.Windows.Forms.Button(); this.header = new System.Windows.Forms.PictureBox(); - this.certificatePathButton = new System.Windows.Forms.Button(); - this.textCertificatePath = new System.Windows.Forms.TextBox(); - this.labelCertificatePath = new System.Windows.Forms.Label(); - this.groupSSL = new System.Windows.Forms.GroupBox(); - this.radioEnabledFull = new System.Windows.Forms.RadioButton(); - this.radioEnabledHostname = new System.Windows.Forms.RadioButton(); - this.radioEnabledNoHostname = new System.Windows.Forms.RadioButton(); - this.radioEnabledNoValidation = new System.Windows.Forms.RadioButton(); - this.radioButtonDisabled = new System.Windows.Forms.RadioButton(); - this.numericUpDownPort = new System.Windows.Forms.NumericUpDown(); - this.textPassword = new System.Windows.Forms.TextBox(); - this.labelPassword = new System.Windows.Forms.Label(); - this.textUsername = new System.Windows.Forms.TextBox(); - this.labelUsername = new System.Windows.Forms.Label(); - this.textHostname = new System.Windows.Forms.TextBox(); - this.labelPort = new System.Windows.Forms.Label(); - this.labelHostname = new System.Windows.Forms.Label(); this.certificateFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.tabConfiguration = new System.Windows.Forms.TabControl(); - this.pageBasic = new System.Windows.Forms.TabPage(); - this.labelCloudID = new System.Windows.Forms.Label(); - this.textDescription = new System.Windows.Forms.TextBox(); - this.textCloudID = new System.Windows.Forms.TextBox(); - this.labelDescription = new System.Windows.Forms.Label(); - this.textName = new System.Windows.Forms.TextBox(); - this.labelName = new System.Windows.Forms.Label(); - this.pageSecurity = new System.Windows.Forms.TabPage(); - this.pageMisc = new System.Windows.Forms.TabPage(); - this.labelVarcharLimit = new System.Windows.Forms.Label(); - this.numericUpDownVarcharLimit = new System.Windows.Forms.NumericUpDown(); - this.checkBoxEarlyExecution = new System.Windows.Forms.CheckBox(); - this.comboBoxDataCompression = new System.Windows.Forms.ComboBox(); - this.labelDataCompression = new System.Windows.Forms.Label(); - this.comboBoxDataEncoding = new System.Windows.Forms.ComboBox(); - this.labelDataEncoding = new System.Windows.Forms.Label(); - this.checkBoxAutoEscapePVA = new System.Windows.Forms.CheckBox(); - this.comboBoxFloatsFormat = new System.Windows.Forms.ComboBox(); - this.labelFloatsFormat = new System.Windows.Forms.Label(); - this.checkBoxIndexIncludeFrozen = new System.Windows.Forms.CheckBox(); - this.checkBoxMultiFieldLenient = new System.Windows.Forms.CheckBox(); - this.checkBoxApplyTZ = new System.Windows.Forms.CheckBox(); - this.checkBoxFollowRedirects = new System.Windows.Forms.CheckBox(); - this.labelBodySize = new System.Windows.Forms.Label(); - this.numericUpDownBodySize = new System.Windows.Forms.NumericUpDown(); - this.labelFetchSize = new System.Windows.Forms.Label(); - this.numericUpDownFetchSize = new System.Windows.Forms.NumericUpDown(); - this.labelTimeout = new System.Windows.Forms.Label(); - this.numericUpDownTimeout = new System.Windows.Forms.NumericUpDown(); - this.pageLogging = new System.Windows.Forms.TabPage(); - this.checkLoggingEnabled = new System.Windows.Forms.CheckBox(); - this.comboLogLevel = new System.Windows.Forms.ComboBox(); - this.labelLogLevel = new System.Windows.Forms.Label(); - this.logDirectoryPathButton = new System.Windows.Forms.Button(); - this.textLogDirectoryPath = new System.Windows.Forms.TextBox(); - this.labelLogDirectory = new System.Windows.Forms.Label(); this.folderLogDirectoryDialog = new System.Windows.Forms.FolderBrowserDialog(); this.toolTipName = new System.Windows.Forms.ToolTip(this.components); this.toolTipDescription = new System.Windows.Forms.ToolTip(this.components); @@ -125,26 +71,102 @@ private void InitializeComponent() this.toolTipDataCompression = new System.Windows.Forms.ToolTip(this.components); this.toolTipEarlyExecution = new System.Windows.Forms.ToolTip(this.components); this.toolTipVarcharLimit = new System.Windows.Forms.ToolTip(this.components); + this.pageLogging = new System.Windows.Forms.TabPage(); + this.checkLoggingEnabled = new System.Windows.Forms.CheckBox(); + this.comboLogLevel = new System.Windows.Forms.ComboBox(); + this.labelLogLevel = new System.Windows.Forms.Label(); + this.logDirectoryPathButton = new System.Windows.Forms.Button(); + this.textLogDirectoryPath = new System.Windows.Forms.TextBox(); + this.labelLogDirectory = new System.Windows.Forms.Label(); + this.pageMisc = new System.Windows.Forms.TabPage(); + this.labelVarcharLimit = new System.Windows.Forms.Label(); + this.numericUpDownVarcharLimit = new System.Windows.Forms.NumericUpDown(); + this.checkBoxEarlyExecution = new System.Windows.Forms.CheckBox(); + this.comboBoxDataCompression = new System.Windows.Forms.ComboBox(); + this.labelDataCompression = new System.Windows.Forms.Label(); + this.comboBoxDataEncoding = new System.Windows.Forms.ComboBox(); + this.labelDataEncoding = new System.Windows.Forms.Label(); + this.checkBoxAutoEscapePVA = new System.Windows.Forms.CheckBox(); + this.comboBoxFloatsFormat = new System.Windows.Forms.ComboBox(); + this.labelFloatsFormat = new System.Windows.Forms.Label(); + this.checkBoxIndexIncludeFrozen = new System.Windows.Forms.CheckBox(); + this.checkBoxMultiFieldLenient = new System.Windows.Forms.CheckBox(); + this.checkBoxApplyTZ = new System.Windows.Forms.CheckBox(); + this.checkBoxFollowRedirects = new System.Windows.Forms.CheckBox(); + this.labelBodySize = new System.Windows.Forms.Label(); + this.numericUpDownBodySize = new System.Windows.Forms.NumericUpDown(); + this.labelFetchSize = new System.Windows.Forms.Label(); + this.numericUpDownFetchSize = new System.Windows.Forms.NumericUpDown(); + this.labelTimeout = new System.Windows.Forms.Label(); + this.numericUpDownTimeout = new System.Windows.Forms.NumericUpDown(); + this.pageSecurity = new System.Windows.Forms.TabPage(); + this.certificatePathButton = new System.Windows.Forms.Button(); + this.groupSSL = new System.Windows.Forms.GroupBox(); + this.radioEnabledFull = new System.Windows.Forms.RadioButton(); + this.radioEnabledHostname = new System.Windows.Forms.RadioButton(); + this.radioEnabledNoHostname = new System.Windows.Forms.RadioButton(); + this.radioEnabledNoValidation = new System.Windows.Forms.RadioButton(); + this.radioButtonDisabled = new System.Windows.Forms.RadioButton(); + this.textCertificatePath = new System.Windows.Forms.TextBox(); + this.labelCertificatePath = new System.Windows.Forms.Label(); + this.pageBasic = new System.Windows.Forms.TabPage(); + this.labelCloudID = new System.Windows.Forms.Label(); + this.textDescription = new System.Windows.Forms.TextBox(); + this.textCloudID = new System.Windows.Forms.TextBox(); + this.textName = new System.Windows.Forms.TextBox(); + this.textHostname = new System.Windows.Forms.TextBox(); + this.textUsername = new System.Windows.Forms.TextBox(); + this.textPassword = new System.Windows.Forms.TextBox(); + this.labelDescription = new System.Windows.Forms.Label(); + this.labelName = new System.Windows.Forms.Label(); + this.labelHostname = new System.Windows.Forms.Label(); + this.labelPort = new System.Windows.Forms.Label(); + this.labelUsername = new System.Windows.Forms.Label(); + this.numericUpDownPort = new System.Windows.Forms.NumericUpDown(); + this.labelPassword = new System.Windows.Forms.Label(); + this.tabConfiguration = new System.Windows.Forms.TabControl(); + this.pageProxy = new System.Windows.Forms.TabPage(); + this.textBoxProxyUsername = new System.Windows.Forms.TextBox(); + this.textBoxProxyPassword = new System.Windows.Forms.TextBox(); + this.labelProxyUsername = new System.Windows.Forms.Label(); + this.labelProxyPassword = new System.Windows.Forms.Label(); + this.checkProxyAuthEnabled = new System.Windows.Forms.CheckBox(); + this.comboBoxProxyType = new System.Windows.Forms.ComboBox(); + this.labelProxyType = new System.Windows.Forms.Label(); + this.textProxyHostname = new System.Windows.Forms.TextBox(); + this.labelProxyHostname = new System.Windows.Forms.Label(); + this.labelProxyPort = new System.Windows.Forms.Label(); + this.numericUpDownProxyPort = new System.Windows.Forms.NumericUpDown(); + this.checkProxyEnabled = new System.Windows.Forms.CheckBox(); + this.toolTipProxyEnabled = new System.Windows.Forms.ToolTip(this.components); + this.toolTipProxyType = new System.Windows.Forms.ToolTip(this.components); + this.toolTipProxyHostname = new System.Windows.Forms.ToolTip(this.components); + this.toolTipProxyPort = new System.Windows.Forms.ToolTip(this.components); + this.toolTipProxyAuthEnabled = new System.Windows.Forms.ToolTip(this.components); + this.toolTipProxyUsername = new System.Windows.Forms.ToolTip(this.components); + this.toolTipProxyPassword = new System.Windows.Forms.ToolTip(this.components); ((System.ComponentModel.ISupportInitialize)(this.header)).BeginInit(); - this.groupSSL.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).BeginInit(); - this.tabConfiguration.SuspendLayout(); - this.pageBasic.SuspendLayout(); - this.pageSecurity.SuspendLayout(); + this.pageLogging.SuspendLayout(); this.pageMisc.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownVarcharLimit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownBodySize)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownFetchSize)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); - this.pageLogging.SuspendLayout(); + this.pageSecurity.SuspendLayout(); + this.groupSSL.SuspendLayout(); + this.pageBasic.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).BeginInit(); + this.tabConfiguration.SuspendLayout(); + this.pageProxy.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownProxyPort)).BeginInit(); this.SuspendLayout(); // // saveButton // - this.saveButton.Location = new System.Drawing.Point(457, 541); - this.saveButton.Margin = new System.Windows.Forms.Padding(4); + this.saveButton.Location = new System.Drawing.Point(628, 812); + this.saveButton.Margin = new System.Windows.Forms.Padding(6); this.saveButton.Name = "saveButton"; - this.saveButton.Size = new System.Drawing.Size(100, 28); + this.saveButton.Size = new System.Drawing.Size(138, 42); this.saveButton.TabIndex = 17; this.saveButton.Text = "Save"; this.saveButton.UseVisualStyleBackColor = true; @@ -152,10 +174,10 @@ private void InitializeComponent() // // cancelButton // - this.cancelButton.Location = new System.Drawing.Point(560, 541); - this.cancelButton.Margin = new System.Windows.Forms.Padding(4); + this.cancelButton.Location = new System.Drawing.Point(770, 812); + this.cancelButton.Margin = new System.Windows.Forms.Padding(6); this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(100, 28); + this.cancelButton.Size = new System.Drawing.Size(138, 42); this.cancelButton.TabIndex = 18; this.cancelButton.Text = "Cancel"; this.cancelButton.UseVisualStyleBackColor = true; @@ -163,10 +185,10 @@ private void InitializeComponent() // // testButton // - this.testButton.Location = new System.Drawing.Point(17, 541); - this.testButton.Margin = new System.Windows.Forms.Padding(4); + this.testButton.Location = new System.Drawing.Point(23, 812); + this.testButton.Margin = new System.Windows.Forms.Padding(6); this.testButton.Name = "testButton"; - this.testButton.Size = new System.Drawing.Size(156, 28); + this.testButton.Size = new System.Drawing.Size(214, 42); this.testButton.TabIndex = 16; this.testButton.Text = "Test Connection"; this.testButton.UseVisualStyleBackColor = true; @@ -180,39 +202,409 @@ private void InitializeComponent() this.header.Location = new System.Drawing.Point(0, 0); this.header.Margin = new System.Windows.Forms.Padding(0); this.header.Name = "header"; - this.header.Size = new System.Drawing.Size(680, 58); + this.header.Size = new System.Drawing.Size(935, 87); this.header.TabIndex = 5; this.header.TabStop = false; // + // certificateFileDialog + // + this.certificateFileDialog.Filter = "X509 Certificate|*.pem;*.der|All Files|*.*"; + // + // pageLogging + // + this.pageLogging.Controls.Add(this.checkLoggingEnabled); + this.pageLogging.Controls.Add(this.comboLogLevel); + this.pageLogging.Controls.Add(this.labelLogLevel); + this.pageLogging.Controls.Add(this.logDirectoryPathButton); + this.pageLogging.Controls.Add(this.textLogDirectoryPath); + this.pageLogging.Controls.Add(this.labelLogDirectory); + this.pageLogging.Location = new System.Drawing.Point(4, 33); + this.pageLogging.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.pageLogging.Name = "pageLogging"; + this.pageLogging.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.pageLogging.Size = new System.Drawing.Size(883, 653); + this.pageLogging.TabIndex = 2; + this.pageLogging.Text = "Logging"; + this.pageLogging.UseVisualStyleBackColor = true; + // + // checkLoggingEnabled + // + this.checkLoggingEnabled.AutoSize = true; + this.checkLoggingEnabled.Checked = true; + this.checkLoggingEnabled.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkLoggingEnabled.Location = new System.Drawing.Point(22, 32); + this.checkLoggingEnabled.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkLoggingEnabled.Name = "checkLoggingEnabled"; + this.checkLoggingEnabled.Size = new System.Drawing.Size(174, 29); + this.checkLoggingEnabled.TabIndex = 22; + this.checkLoggingEnabled.Text = "Enable Logging"; + this.checkLoggingEnabled.UseVisualStyleBackColor = true; + this.checkLoggingEnabled.CheckedChanged += new System.EventHandler(this.CheckLoggingEnabled_CheckedChanged); + // + // comboLogLevel + // + this.comboLogLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboLogLevel.FormattingEnabled = true; + this.comboLogLevel.Items.AddRange(new object[] { + "DEBUG", + "INFO", + "WARN", + "ERROR"}); + this.comboLogLevel.Location = new System.Drawing.Point(170, 147); + this.comboLogLevel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.comboLogLevel.Name = "comboLogLevel"; + this.comboLogLevel.Size = new System.Drawing.Size(147, 32); + this.comboLogLevel.TabIndex = 25; + // + // labelLogLevel + // + this.labelLogLevel.AutoSize = true; + this.labelLogLevel.Location = new System.Drawing.Point(22, 152); + this.labelLogLevel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelLogLevel.Name = "labelLogLevel"; + this.labelLogLevel.Size = new System.Drawing.Size(103, 25); + this.labelLogLevel.TabIndex = 20; + this.labelLogLevel.Text = "Log Level:"; + // + // logDirectoryPathButton + // + this.logDirectoryPathButton.Location = new System.Drawing.Point(723, 82); + this.logDirectoryPathButton.Margin = new System.Windows.Forms.Padding(6); + this.logDirectoryPathButton.Name = "logDirectoryPathButton"; + this.logDirectoryPathButton.Size = new System.Drawing.Size(138, 42); + this.logDirectoryPathButton.TabIndex = 24; + this.logDirectoryPathButton.Text = "Browse..."; + this.logDirectoryPathButton.UseVisualStyleBackColor = true; + this.logDirectoryPathButton.Click += new System.EventHandler(this.LogDirectoryPathButton_Click); + // + // textLogDirectoryPath + // + this.textLogDirectoryPath.Location = new System.Drawing.Point(170, 86); + this.textLogDirectoryPath.Margin = new System.Windows.Forms.Padding(6); + this.textLogDirectoryPath.MaxLength = 512; + this.textLogDirectoryPath.Name = "textLogDirectoryPath"; + this.textLogDirectoryPath.Size = new System.Drawing.Size(538, 29); + this.textLogDirectoryPath.TabIndex = 23; + // + // labelLogDirectory + // + this.labelLogDirectory.AutoSize = true; + this.labelLogDirectory.Location = new System.Drawing.Point(22, 93); + this.labelLogDirectory.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelLogDirectory.Name = "labelLogDirectory"; + this.labelLogDirectory.Size = new System.Drawing.Size(133, 25); + this.labelLogDirectory.TabIndex = 16; + this.labelLogDirectory.Text = "Log Directory:"; + // + // pageMisc + // + this.pageMisc.Controls.Add(this.labelVarcharLimit); + this.pageMisc.Controls.Add(this.numericUpDownVarcharLimit); + this.pageMisc.Controls.Add(this.checkBoxEarlyExecution); + this.pageMisc.Controls.Add(this.comboBoxDataCompression); + this.pageMisc.Controls.Add(this.labelDataCompression); + this.pageMisc.Controls.Add(this.comboBoxDataEncoding); + this.pageMisc.Controls.Add(this.labelDataEncoding); + this.pageMisc.Controls.Add(this.checkBoxAutoEscapePVA); + this.pageMisc.Controls.Add(this.comboBoxFloatsFormat); + this.pageMisc.Controls.Add(this.labelFloatsFormat); + this.pageMisc.Controls.Add(this.checkBoxIndexIncludeFrozen); + this.pageMisc.Controls.Add(this.checkBoxMultiFieldLenient); + this.pageMisc.Controls.Add(this.checkBoxApplyTZ); + this.pageMisc.Controls.Add(this.checkBoxFollowRedirects); + this.pageMisc.Controls.Add(this.labelBodySize); + this.pageMisc.Controls.Add(this.numericUpDownBodySize); + this.pageMisc.Controls.Add(this.labelFetchSize); + this.pageMisc.Controls.Add(this.numericUpDownFetchSize); + this.pageMisc.Controls.Add(this.labelTimeout); + this.pageMisc.Controls.Add(this.numericUpDownTimeout); + this.pageMisc.Location = new System.Drawing.Point(4, 33); + this.pageMisc.Margin = new System.Windows.Forms.Padding(4); + this.pageMisc.Name = "pageMisc"; + this.pageMisc.Padding = new System.Windows.Forms.Padding(4); + this.pageMisc.Size = new System.Drawing.Size(883, 653); + this.pageMisc.TabIndex = 3; + this.pageMisc.Text = "Misc"; + this.pageMisc.UseVisualStyleBackColor = true; + // + // labelVarcharLimit + // + this.labelVarcharLimit.AutoSize = true; + this.labelVarcharLimit.Location = new System.Drawing.Point(33, 184); + this.labelVarcharLimit.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelVarcharLimit.Name = "labelVarcharLimit"; + this.labelVarcharLimit.Size = new System.Drawing.Size(132, 25); + this.labelVarcharLimit.TabIndex = 12; + this.labelVarcharLimit.Text = "Varchar Limit:"; + // + // numericUpDownVarcharLimit + // + this.numericUpDownVarcharLimit.Location = new System.Drawing.Point(250, 182); + this.numericUpDownVarcharLimit.Margin = new System.Windows.Forms.Padding(4); + this.numericUpDownVarcharLimit.Maximum = new decimal(new int[] { + 32766, + 0, + 0, + 0}); + this.numericUpDownVarcharLimit.Name = "numericUpDownVarcharLimit"; + this.numericUpDownVarcharLimit.Size = new System.Drawing.Size(143, 29); + this.numericUpDownVarcharLimit.TabIndex = 13; + // + // checkBoxEarlyExecution + // + this.checkBoxEarlyExecution.AutoSize = true; + this.checkBoxEarlyExecution.Checked = true; + this.checkBoxEarlyExecution.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxEarlyExecution.Location = new System.Drawing.Point(465, 286); + this.checkBoxEarlyExecution.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkBoxEarlyExecution.Name = "checkBoxEarlyExecution"; + this.checkBoxEarlyExecution.Size = new System.Drawing.Size(232, 29); + this.checkBoxEarlyExecution.TabIndex = 18; + this.checkBoxEarlyExecution.Text = "Early Query Execution"; + this.checkBoxEarlyExecution.UseVisualStyleBackColor = true; + // + // comboBoxDataCompression + // + this.comboBoxDataCompression.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxDataCompression.FormattingEnabled = true; + this.comboBoxDataCompression.Items.AddRange(new object[] { + "auto", + "on", + "off"}); + this.comboBoxDataCompression.Location = new System.Drawing.Point(250, 340); + this.comboBoxDataCompression.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.comboBoxDataCompression.Name = "comboBoxDataCompression"; + this.comboBoxDataCompression.Size = new System.Drawing.Size(147, 32); + this.comboBoxDataCompression.TabIndex = 19; + // + // labelDataCompression + // + this.labelDataCompression.AutoSize = true; + this.labelDataCompression.Location = new System.Drawing.Point(33, 351); + this.labelDataCompression.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDataCompression.Name = "labelDataCompression"; + this.labelDataCompression.Size = new System.Drawing.Size(175, 25); + this.labelDataCompression.TabIndex = 18; + this.labelDataCompression.Text = "Data compression:"; + // + // comboBoxDataEncoding + // + this.comboBoxDataEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxDataEncoding.FormattingEnabled = true; + this.comboBoxDataEncoding.Items.AddRange(new object[] { + "CBOR", + "JSON"}); + this.comboBoxDataEncoding.Location = new System.Drawing.Point(250, 286); + this.comboBoxDataEncoding.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.comboBoxDataEncoding.Name = "comboBoxDataEncoding"; + this.comboBoxDataEncoding.Size = new System.Drawing.Size(147, 32); + this.comboBoxDataEncoding.TabIndex = 17; + // + // labelDataEncoding + // + this.labelDataEncoding.AutoSize = true; + this.labelDataEncoding.Location = new System.Drawing.Point(33, 291); + this.labelDataEncoding.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDataEncoding.Name = "labelDataEncoding"; + this.labelDataEncoding.Size = new System.Drawing.Size(144, 25); + this.labelDataEncoding.TabIndex = 16; + this.labelDataEncoding.Text = "Data encoding:"; + // + // checkBoxAutoEscapePVA + // + this.checkBoxAutoEscapePVA.AutoSize = true; + this.checkBoxAutoEscapePVA.Checked = true; + this.checkBoxAutoEscapePVA.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxAutoEscapePVA.Location = new System.Drawing.Point(466, 129); + this.checkBoxAutoEscapePVA.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkBoxAutoEscapePVA.Name = "checkBoxAutoEscapePVA"; + this.checkBoxAutoEscapePVA.Size = new System.Drawing.Size(206, 29); + this.checkBoxAutoEscapePVA.TabIndex = 12; + this.checkBoxAutoEscapePVA.Text = "Auto-escape PVAs"; + this.checkBoxAutoEscapePVA.UseVisualStyleBackColor = true; + // + // comboBoxFloatsFormat + // + this.comboBoxFloatsFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxFloatsFormat.FormattingEnabled = true; + this.comboBoxFloatsFormat.Items.AddRange(new object[] { + "default", + "scientific", + "auto"}); + this.comboBoxFloatsFormat.Location = new System.Drawing.Point(250, 232); + this.comboBoxFloatsFormat.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.comboBoxFloatsFormat.Name = "comboBoxFloatsFormat"; + this.comboBoxFloatsFormat.Size = new System.Drawing.Size(147, 32); + this.comboBoxFloatsFormat.TabIndex = 15; + // + // labelFloatsFormat + // + this.labelFloatsFormat.AutoSize = true; + this.labelFloatsFormat.Location = new System.Drawing.Point(33, 237); + this.labelFloatsFormat.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFloatsFormat.Name = "labelFloatsFormat"; + this.labelFloatsFormat.Size = new System.Drawing.Size(130, 25); + this.labelFloatsFormat.TabIndex = 14; + this.labelFloatsFormat.Text = "Floats format:"; + // + // checkBoxIndexIncludeFrozen + // + this.checkBoxIndexIncludeFrozen.AutoSize = true; + this.checkBoxIndexIncludeFrozen.Location = new System.Drawing.Point(466, 231); + this.checkBoxIndexIncludeFrozen.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkBoxIndexIncludeFrozen.Name = "checkBoxIndexIncludeFrozen"; + this.checkBoxIndexIncludeFrozen.Size = new System.Drawing.Size(226, 29); + this.checkBoxIndexIncludeFrozen.TabIndex = 16; + this.checkBoxIndexIncludeFrozen.Text = "Include frozen indices"; + this.checkBoxIndexIncludeFrozen.UseVisualStyleBackColor = true; + // + // checkBoxMultiFieldLenient + // + this.checkBoxMultiFieldLenient.AutoSize = true; + this.checkBoxMultiFieldLenient.Checked = true; + this.checkBoxMultiFieldLenient.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxMultiFieldLenient.Location = new System.Drawing.Point(466, 178); + this.checkBoxMultiFieldLenient.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkBoxMultiFieldLenient.Name = "checkBoxMultiFieldLenient"; + this.checkBoxMultiFieldLenient.Size = new System.Drawing.Size(233, 29); + this.checkBoxMultiFieldLenient.TabIndex = 14; + this.checkBoxMultiFieldLenient.Text = "Multi value field lenient"; + this.checkBoxMultiFieldLenient.UseVisualStyleBackColor = true; + // + // checkBoxApplyTZ + // + this.checkBoxApplyTZ.AutoSize = true; + this.checkBoxApplyTZ.Location = new System.Drawing.Point(466, 80); + this.checkBoxApplyTZ.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkBoxApplyTZ.Name = "checkBoxApplyTZ"; + this.checkBoxApplyTZ.Size = new System.Drawing.Size(202, 29); + this.checkBoxApplyTZ.TabIndex = 10; + this.checkBoxApplyTZ.Text = "Use local timezone"; + this.checkBoxApplyTZ.UseVisualStyleBackColor = true; + // + // checkBoxFollowRedirects + // + this.checkBoxFollowRedirects.AutoSize = true; + this.checkBoxFollowRedirects.Checked = true; + this.checkBoxFollowRedirects.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxFollowRedirects.Location = new System.Drawing.Point(466, 30); + this.checkBoxFollowRedirects.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkBoxFollowRedirects.Name = "checkBoxFollowRedirects"; + this.checkBoxFollowRedirects.Size = new System.Drawing.Size(231, 29); + this.checkBoxFollowRedirects.TabIndex = 8; + this.checkBoxFollowRedirects.Text = "Follow HTTP redirects"; + this.checkBoxFollowRedirects.UseVisualStyleBackColor = true; + // + // labelBodySize + // + this.labelBodySize.AutoSize = true; + this.labelBodySize.Location = new System.Drawing.Point(33, 132); + this.labelBodySize.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelBodySize.Name = "labelBodySize"; + this.labelBodySize.Size = new System.Drawing.Size(212, 25); + this.labelBodySize.TabIndex = 10; + this.labelBodySize.Text = "Max page length (MB):"; + // + // numericUpDownBodySize + // + this.numericUpDownBodySize.Location = new System.Drawing.Point(250, 129); + this.numericUpDownBodySize.Margin = new System.Windows.Forms.Padding(4); + this.numericUpDownBodySize.Maximum = new decimal(new int[] { + -1, + 0, + 0, + 0}); + this.numericUpDownBodySize.Name = "numericUpDownBodySize"; + this.numericUpDownBodySize.Size = new System.Drawing.Size(143, 29); + this.numericUpDownBodySize.TabIndex = 11; + this.numericUpDownBodySize.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + // + // labelFetchSize + // + this.labelFetchSize.AutoSize = true; + this.labelFetchSize.Location = new System.Drawing.Point(33, 80); + this.labelFetchSize.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFetchSize.Name = "labelFetchSize"; + this.labelFetchSize.Size = new System.Drawing.Size(205, 25); + this.labelFetchSize.TabIndex = 8; + this.labelFetchSize.Text = "Max page size (rows):"; + // + // numericUpDownFetchSize + // + this.numericUpDownFetchSize.Increment = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownFetchSize.Location = new System.Drawing.Point(250, 76); + this.numericUpDownFetchSize.Margin = new System.Windows.Forms.Padding(4); + this.numericUpDownFetchSize.Maximum = new decimal(new int[] { + -1, + 0, + 0, + 0}); + this.numericUpDownFetchSize.Name = "numericUpDownFetchSize"; + this.numericUpDownFetchSize.Size = new System.Drawing.Size(143, 29); + this.numericUpDownFetchSize.TabIndex = 9; + this.numericUpDownFetchSize.Value = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + // + // labelTimeout + // + this.labelTimeout.AutoSize = true; + this.labelTimeout.Location = new System.Drawing.Point(33, 30); + this.labelTimeout.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTimeout.Name = "labelTimeout"; + this.labelTimeout.Size = new System.Drawing.Size(187, 25); + this.labelTimeout.TabIndex = 6; + this.labelTimeout.Text = "Request timeout (s):"; + // + // numericUpDownTimeout + // + this.numericUpDownTimeout.Location = new System.Drawing.Point(250, 27); + this.numericUpDownTimeout.Margin = new System.Windows.Forms.Padding(4); + this.numericUpDownTimeout.Maximum = new decimal(new int[] { + -1, + 0, + 0, + 0}); + this.numericUpDownTimeout.Name = "numericUpDownTimeout"; + this.numericUpDownTimeout.Size = new System.Drawing.Size(143, 29); + this.numericUpDownTimeout.TabIndex = 7; + // + // pageSecurity + // + this.pageSecurity.Controls.Add(this.certificatePathButton); + this.pageSecurity.Controls.Add(this.groupSSL); + this.pageSecurity.Controls.Add(this.textCertificatePath); + this.pageSecurity.Controls.Add(this.labelCertificatePath); + this.pageSecurity.Location = new System.Drawing.Point(4, 33); + this.pageSecurity.Margin = new System.Windows.Forms.Padding(4); + this.pageSecurity.Name = "pageSecurity"; + this.pageSecurity.Padding = new System.Windows.Forms.Padding(4); + this.pageSecurity.Size = new System.Drawing.Size(883, 653); + this.pageSecurity.TabIndex = 1; + this.pageSecurity.Text = "Security"; + this.pageSecurity.UseVisualStyleBackColor = true; + // // certificatePathButton // - this.certificatePathButton.Location = new System.Drawing.Point(524, 206); - this.certificatePathButton.Margin = new System.Windows.Forms.Padding(4); + this.certificatePathButton.Location = new System.Drawing.Point(720, 309); + this.certificatePathButton.Margin = new System.Windows.Forms.Padding(6); this.certificatePathButton.Name = "certificatePathButton"; - this.certificatePathButton.Size = new System.Drawing.Size(100, 28); + this.certificatePathButton.Size = new System.Drawing.Size(138, 42); this.certificatePathButton.TabIndex = 15; this.certificatePathButton.Text = "Browse..."; this.certificatePathButton.UseVisualStyleBackColor = true; this.certificatePathButton.Click += new System.EventHandler(this.CertificatePathButton_Click); // - // textCertificatePath - // - this.textCertificatePath.Location = new System.Drawing.Point(124, 209); - this.textCertificatePath.Margin = new System.Windows.Forms.Padding(4); - this.textCertificatePath.MaxLength = 512; - this.textCertificatePath.Name = "textCertificatePath"; - this.textCertificatePath.Size = new System.Drawing.Size(392, 22); - this.textCertificatePath.TabIndex = 14; - // - // labelCertificatePath - // - this.labelCertificatePath.AutoSize = true; - this.labelCertificatePath.Location = new System.Drawing.Point(16, 212); - this.labelCertificatePath.Name = "labelCertificatePath"; - this.labelCertificatePath.Size = new System.Drawing.Size(101, 17); - this.labelCertificatePath.TabIndex = 11; - this.labelCertificatePath.Text = "Certificate File:"; - // // groupSSL // this.groupSSL.Controls.Add(this.radioEnabledFull); @@ -220,9 +612,11 @@ private void InitializeComponent() this.groupSSL.Controls.Add(this.radioEnabledNoHostname); this.groupSSL.Controls.Add(this.radioEnabledNoValidation); this.groupSSL.Controls.Add(this.radioButtonDisabled); - this.groupSSL.Location = new System.Drawing.Point(16, 16); + this.groupSSL.Location = new System.Drawing.Point(22, 24); + this.groupSSL.Margin = new System.Windows.Forms.Padding(4); this.groupSSL.Name = "groupSSL"; - this.groupSSL.Size = new System.Drawing.Size(608, 176); + this.groupSSL.Padding = new System.Windows.Forms.Padding(4); + this.groupSSL.Size = new System.Drawing.Size(836, 264); this.groupSSL.TabIndex = 10; this.groupSSL.TabStop = false; this.groupSSL.Text = "Secure Sockets Layer (SSL):"; @@ -230,9 +624,10 @@ private void InitializeComponent() // radioEnabledFull // this.radioEnabledFull.AutoSize = true; - this.radioEnabledFull.Location = new System.Drawing.Point(16, 139); + this.radioEnabledFull.Location = new System.Drawing.Point(22, 208); + this.radioEnabledFull.Margin = new System.Windows.Forms.Padding(4); this.radioEnabledFull.Name = "radioEnabledFull"; - this.radioEnabledFull.Size = new System.Drawing.Size(304, 21); + this.radioEnabledFull.Size = new System.Drawing.Size(412, 29); this.radioEnabledFull.TabIndex = 13; this.radioEnabledFull.TabStop = true; this.radioEnabledFull.Text = "Enabled. Certificate identity chain validated."; @@ -241,9 +636,10 @@ private void InitializeComponent() // radioEnabledHostname // this.radioEnabledHostname.AutoSize = true; - this.radioEnabledHostname.Location = new System.Drawing.Point(16, 112); + this.radioEnabledHostname.Location = new System.Drawing.Point(22, 168); + this.radioEnabledHostname.Margin = new System.Windows.Forms.Padding(4); this.radioEnabledHostname.Name = "radioEnabledHostname"; - this.radioEnabledHostname.Size = new System.Drawing.Size(362, 21); + this.radioEnabledHostname.Size = new System.Drawing.Size(493, 29); this.radioEnabledHostname.TabIndex = 12; this.radioEnabledHostname.TabStop = true; this.radioEnabledHostname.Text = "Enabled. Certificate is validated; hostname validated."; @@ -252,9 +648,10 @@ private void InitializeComponent() // radioEnabledNoHostname // this.radioEnabledNoHostname.AutoSize = true; - this.radioEnabledNoHostname.Location = new System.Drawing.Point(16, 85); + this.radioEnabledNoHostname.Location = new System.Drawing.Point(22, 128); + this.radioEnabledNoHostname.Margin = new System.Windows.Forms.Padding(4); this.radioEnabledNoHostname.Name = "radioEnabledNoHostname"; - this.radioEnabledNoHostname.Size = new System.Drawing.Size(386, 21); + this.radioEnabledNoHostname.Size = new System.Drawing.Size(525, 29); this.radioEnabledNoHostname.TabIndex = 11; this.radioEnabledNoHostname.TabStop = true; this.radioEnabledNoHostname.Text = "Enabled. Certificate is validated; hostname not validated."; @@ -263,9 +660,10 @@ private void InitializeComponent() // radioEnabledNoValidation // this.radioEnabledNoValidation.AutoSize = true; - this.radioEnabledNoValidation.Location = new System.Drawing.Point(16, 58); + this.radioEnabledNoValidation.Location = new System.Drawing.Point(22, 87); + this.radioEnabledNoValidation.Margin = new System.Windows.Forms.Padding(4); this.radioEnabledNoValidation.Name = "radioEnabledNoValidation"; - this.radioEnabledNoValidation.Size = new System.Drawing.Size(241, 21); + this.radioEnabledNoValidation.Size = new System.Drawing.Size(326, 29); this.radioEnabledNoValidation.TabIndex = 10; this.radioEnabledNoValidation.TabStop = true; this.radioEnabledNoValidation.Text = "Enabled. Certificate not validated."; @@ -274,133 +672,55 @@ private void InitializeComponent() // radioButtonDisabled // this.radioButtonDisabled.AutoSize = true; - this.radioButtonDisabled.Location = new System.Drawing.Point(16, 31); + this.radioButtonDisabled.Location = new System.Drawing.Point(22, 46); + this.radioButtonDisabled.Margin = new System.Windows.Forms.Padding(4); this.radioButtonDisabled.Name = "radioButtonDisabled"; - this.radioButtonDisabled.Size = new System.Drawing.Size(299, 21); + this.radioButtonDisabled.Size = new System.Drawing.Size(409, 29); this.radioButtonDisabled.TabIndex = 9; this.radioButtonDisabled.TabStop = true; this.radioButtonDisabled.Text = "Disabled. All communications unencrypted."; this.radioButtonDisabled.UseVisualStyleBackColor = true; // - // numericUpDownPort - // - this.numericUpDownPort.Location = new System.Drawing.Point(112, 241); - this.numericUpDownPort.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.numericUpDownPort.Name = "numericUpDownPort"; - this.numericUpDownPort.Size = new System.Drawing.Size(104, 22); - this.numericUpDownPort.TabIndex = 6; - this.numericUpDownPort.Value = new decimal(new int[] { - 9200, - 0, - 0, - 0}); - this.numericUpDownPort.ValueChanged += new System.EventHandler(this.NumericUpDownPort_ValueChanged); - // - // textPassword - // - this.textPassword.Location = new System.Drawing.Point(112, 343); - this.textPassword.Margin = new System.Windows.Forms.Padding(4); - this.textPassword.MaxLength = 512; - this.textPassword.Name = "textPassword"; - this.textPassword.PasswordChar = '*'; - this.textPassword.Size = new System.Drawing.Size(229, 22); - this.textPassword.TabIndex = 8; - // - // labelPassword - // - this.labelPassword.AutoSize = true; - this.labelPassword.Location = new System.Drawing.Point(16, 346); - this.labelPassword.Name = "labelPassword"; - this.labelPassword.Size = new System.Drawing.Size(73, 17); - this.labelPassword.TabIndex = 6; - this.labelPassword.Text = "Password:"; - // - // textUsername - // - this.textUsername.Location = new System.Drawing.Point(112, 303); - this.textUsername.Margin = new System.Windows.Forms.Padding(4); - this.textUsername.MaxLength = 512; - this.textUsername.Name = "textUsername"; - this.textUsername.Size = new System.Drawing.Size(229, 22); - this.textUsername.TabIndex = 7; - // - // labelUsername - // - this.labelUsername.AutoSize = true; - this.labelUsername.Location = new System.Drawing.Point(16, 306); - this.labelUsername.Name = "labelUsername"; - this.labelUsername.Size = new System.Drawing.Size(77, 17); - this.labelUsername.TabIndex = 4; - this.labelUsername.Text = "Username:"; - // - // textHostname - // - this.textHostname.Location = new System.Drawing.Point(112, 203); - this.textHostname.Margin = new System.Windows.Forms.Padding(4); - this.textHostname.MaxLength = 512; - this.textHostname.Name = "textHostname"; - this.textHostname.Size = new System.Drawing.Size(506, 22); - this.textHostname.TabIndex = 5; - this.textHostname.TextChanged += new System.EventHandler(this.TextHostname_TextChanged); - // - // labelPort - // - this.labelPort.AutoSize = true; - this.labelPort.Location = new System.Drawing.Point(16, 243); - this.labelPort.Name = "labelPort"; - this.labelPort.Size = new System.Drawing.Size(38, 17); - this.labelPort.TabIndex = 2; - this.labelPort.Text = "Port:"; - // - // labelHostname - // - this.labelHostname.AutoSize = true; - this.labelHostname.Location = new System.Drawing.Point(16, 206); - this.labelHostname.Name = "labelHostname"; - this.labelHostname.Size = new System.Drawing.Size(76, 17); - this.labelHostname.TabIndex = 0; - this.labelHostname.Text = "Hostname:"; - // - // certificateFileDialog + // textCertificatePath // - this.certificateFileDialog.Filter = "X509 Certificate|*.pem;*.der|All Files|*.*"; + this.textCertificatePath.Location = new System.Drawing.Point(170, 314); + this.textCertificatePath.Margin = new System.Windows.Forms.Padding(6); + this.textCertificatePath.MaxLength = 512; + this.textCertificatePath.Name = "textCertificatePath"; + this.textCertificatePath.Size = new System.Drawing.Size(538, 29); + this.textCertificatePath.TabIndex = 14; // - // tabConfiguration + // labelCertificatePath // - this.tabConfiguration.Controls.Add(this.pageBasic); - this.tabConfiguration.Controls.Add(this.pageSecurity); - this.tabConfiguration.Controls.Add(this.pageMisc); - this.tabConfiguration.Controls.Add(this.pageLogging); - this.tabConfiguration.Location = new System.Drawing.Point(17, 74); - this.tabConfiguration.Name = "tabConfiguration"; - this.tabConfiguration.SelectedIndex = 0; - this.tabConfiguration.Size = new System.Drawing.Size(648, 460); - this.tabConfiguration.TabIndex = 8; + this.labelCertificatePath.AutoSize = true; + this.labelCertificatePath.Location = new System.Drawing.Point(22, 318); + this.labelCertificatePath.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelCertificatePath.Name = "labelCertificatePath"; + this.labelCertificatePath.Size = new System.Drawing.Size(141, 25); + this.labelCertificatePath.TabIndex = 11; + this.labelCertificatePath.Text = "Certificate File:"; // // pageBasic // this.pageBasic.Controls.Add(this.labelCloudID); this.pageBasic.Controls.Add(this.textDescription); this.pageBasic.Controls.Add(this.textCloudID); - this.pageBasic.Controls.Add(this.labelDescription); this.pageBasic.Controls.Add(this.textName); - this.pageBasic.Controls.Add(this.labelName); this.pageBasic.Controls.Add(this.textHostname); + this.pageBasic.Controls.Add(this.textUsername); + this.pageBasic.Controls.Add(this.textPassword); + this.pageBasic.Controls.Add(this.labelDescription); + this.pageBasic.Controls.Add(this.labelName); this.pageBasic.Controls.Add(this.labelHostname); this.pageBasic.Controls.Add(this.labelPort); this.pageBasic.Controls.Add(this.labelUsername); - this.pageBasic.Controls.Add(this.textUsername); this.pageBasic.Controls.Add(this.numericUpDownPort); this.pageBasic.Controls.Add(this.labelPassword); - this.pageBasic.Controls.Add(this.textPassword); - this.pageBasic.Location = new System.Drawing.Point(4, 25); + this.pageBasic.Location = new System.Drawing.Point(4, 33); + this.pageBasic.Margin = new System.Windows.Forms.Padding(4); this.pageBasic.Name = "pageBasic"; - this.pageBasic.Padding = new System.Windows.Forms.Padding(3); - this.pageBasic.Size = new System.Drawing.Size(640, 431); + this.pageBasic.Padding = new System.Windows.Forms.Padding(4); + this.pageBasic.Size = new System.Drawing.Size(883, 653); this.pageBasic.TabIndex = 0; this.pageBasic.Text = "Basic"; this.pageBasic.UseVisualStyleBackColor = true; @@ -408,434 +728,343 @@ private void InitializeComponent() // labelCloudID // this.labelCloudID.AutoSize = true; - this.labelCloudID.Location = new System.Drawing.Point(16, 118); + this.labelCloudID.Location = new System.Drawing.Point(22, 177); + this.labelCloudID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.labelCloudID.Name = "labelCloudID"; - this.labelCloudID.Size = new System.Drawing.Size(65, 17); + this.labelCloudID.Size = new System.Drawing.Size(94, 25); this.labelCloudID.TabIndex = 12; this.labelCloudID.Text = "Cloud ID:"; // // textDescription // - this.textDescription.Location = new System.Drawing.Point(112, 56); - this.textDescription.Margin = new System.Windows.Forms.Padding(4); + this.textDescription.Location = new System.Drawing.Point(154, 84); + this.textDescription.Margin = new System.Windows.Forms.Padding(6); this.textDescription.MaxLength = 256; this.textDescription.Name = "textDescription"; - this.textDescription.Size = new System.Drawing.Size(506, 22); + this.textDescription.Size = new System.Drawing.Size(694, 29); this.textDescription.TabIndex = 3; // // textCloudID // - this.textCloudID.Location = new System.Drawing.Point(112, 115); - this.textCloudID.Margin = new System.Windows.Forms.Padding(4); + this.textCloudID.Location = new System.Drawing.Point(154, 172); + this.textCloudID.Margin = new System.Windows.Forms.Padding(6); this.textCloudID.MaxLength = 512; this.textCloudID.Multiline = true; this.textCloudID.Name = "textCloudID"; - this.textCloudID.Size = new System.Drawing.Size(506, 72); + this.textCloudID.Size = new System.Drawing.Size(694, 106); this.textCloudID.TabIndex = 4; this.textCloudID.TextChanged += new System.EventHandler(this.TextCloudID_TextChanged); // - // labelDescription - // - this.labelDescription.AutoSize = true; - this.labelDescription.Location = new System.Drawing.Point(16, 59); - this.labelDescription.Name = "labelDescription"; - this.labelDescription.Size = new System.Drawing.Size(83, 17); - this.labelDescription.TabIndex = 10; - this.labelDescription.Text = "Description:"; - // // textName // - this.textName.Location = new System.Drawing.Point(112, 18); - this.textName.Margin = new System.Windows.Forms.Padding(4); + this.textName.Location = new System.Drawing.Point(154, 27); + this.textName.Margin = new System.Windows.Forms.Padding(6); this.textName.MaxLength = 256; this.textName.Name = "textName"; - this.textName.Size = new System.Drawing.Size(506, 22); + this.textName.Size = new System.Drawing.Size(694, 29); this.textName.TabIndex = 2; this.textName.TextChanged += new System.EventHandler(this.TextName_TextChanged); // - // labelName - // - this.labelName.AutoSize = true; - this.labelName.Location = new System.Drawing.Point(16, 21); - this.labelName.Name = "labelName"; - this.labelName.Size = new System.Drawing.Size(49, 17); - this.labelName.TabIndex = 8; - this.labelName.Text = "Name:"; - // - // pageSecurity - // - this.pageSecurity.Controls.Add(this.certificatePathButton); - this.pageSecurity.Controls.Add(this.groupSSL); - this.pageSecurity.Controls.Add(this.textCertificatePath); - this.pageSecurity.Controls.Add(this.labelCertificatePath); - this.pageSecurity.Location = new System.Drawing.Point(4, 25); - this.pageSecurity.Name = "pageSecurity"; - this.pageSecurity.Padding = new System.Windows.Forms.Padding(3); - this.pageSecurity.Size = new System.Drawing.Size(640, 431); - this.pageSecurity.TabIndex = 1; - this.pageSecurity.Text = "Security"; - this.pageSecurity.UseVisualStyleBackColor = true; - // - // pageMisc - // - this.pageMisc.Controls.Add(this.labelVarcharLimit); - this.pageMisc.Controls.Add(this.numericUpDownVarcharLimit); - this.pageMisc.Controls.Add(this.checkBoxEarlyExecution); - this.pageMisc.Controls.Add(this.comboBoxDataCompression); - this.pageMisc.Controls.Add(this.labelDataCompression); - this.pageMisc.Controls.Add(this.comboBoxDataEncoding); - this.pageMisc.Controls.Add(this.labelDataEncoding); - this.pageMisc.Controls.Add(this.checkBoxAutoEscapePVA); - this.pageMisc.Controls.Add(this.comboBoxFloatsFormat); - this.pageMisc.Controls.Add(this.labelFloatsFormat); - this.pageMisc.Controls.Add(this.checkBoxIndexIncludeFrozen); - this.pageMisc.Controls.Add(this.checkBoxMultiFieldLenient); - this.pageMisc.Controls.Add(this.checkBoxApplyTZ); - this.pageMisc.Controls.Add(this.checkBoxFollowRedirects); - this.pageMisc.Controls.Add(this.labelBodySize); - this.pageMisc.Controls.Add(this.numericUpDownBodySize); - this.pageMisc.Controls.Add(this.labelFetchSize); - this.pageMisc.Controls.Add(this.numericUpDownFetchSize); - this.pageMisc.Controls.Add(this.labelTimeout); - this.pageMisc.Controls.Add(this.numericUpDownTimeout); - this.pageMisc.Location = new System.Drawing.Point(4, 25); - this.pageMisc.Name = "pageMisc"; - this.pageMisc.Padding = new System.Windows.Forms.Padding(3); - this.pageMisc.Size = new System.Drawing.Size(640, 431); - this.pageMisc.TabIndex = 3; - this.pageMisc.Text = "Misc"; - this.pageMisc.UseVisualStyleBackColor = true; - // - // labelVarcharLimit - // - this.labelVarcharLimit.AutoSize = true; - this.labelVarcharLimit.Location = new System.Drawing.Point(24, 123); - this.labelVarcharLimit.Name = "labelVarcharLimit"; - this.labelVarcharLimit.Size = new System.Drawing.Size(95, 17); - this.labelVarcharLimit.TabIndex = 12; - this.labelVarcharLimit.Text = "Varchar Limit:"; - // - // numericUpDownVarcharLimit - // - this.numericUpDownVarcharLimit.Location = new System.Drawing.Point(182, 121); - this.numericUpDownVarcharLimit.Maximum = new decimal(new int[] { - 32766, - 0, - 0, - 0}); - this.numericUpDownVarcharLimit.Name = "numericUpDownVarcharLimit"; - this.numericUpDownVarcharLimit.Size = new System.Drawing.Size(104, 22); - this.numericUpDownVarcharLimit.TabIndex = 13; - // - // checkBoxEarlyExecution - // - this.checkBoxEarlyExecution.AutoSize = true; - this.checkBoxEarlyExecution.Checked = true; - this.checkBoxEarlyExecution.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxEarlyExecution.Location = new System.Drawing.Point(338, 191); - this.checkBoxEarlyExecution.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkBoxEarlyExecution.Name = "checkBoxEarlyExecution"; - this.checkBoxEarlyExecution.Size = new System.Drawing.Size(170, 21); - this.checkBoxEarlyExecution.TabIndex = 18; - this.checkBoxEarlyExecution.Text = "Early Query Execution"; - this.checkBoxEarlyExecution.UseVisualStyleBackColor = true; - // - // comboBoxDataCompression - // - this.comboBoxDataCompression.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxDataCompression.FormattingEnabled = true; - this.comboBoxDataCompression.Items.AddRange(new object[] { - "auto", - "on", - "off"}); - this.comboBoxDataCompression.Location = new System.Drawing.Point(182, 227); - this.comboBoxDataCompression.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.comboBoxDataCompression.Name = "comboBoxDataCompression"; - this.comboBoxDataCompression.Size = new System.Drawing.Size(108, 24); - this.comboBoxDataCompression.TabIndex = 19; - // - // labelDataCompression - // - this.labelDataCompression.AutoSize = true; - this.labelDataCompression.Location = new System.Drawing.Point(24, 234); - this.labelDataCompression.Name = "labelDataCompression"; - this.labelDataCompression.Size = new System.Drawing.Size(126, 17); - this.labelDataCompression.TabIndex = 18; - this.labelDataCompression.Text = "Data compression:"; - // - // comboBoxDataEncoding - // - this.comboBoxDataEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxDataEncoding.FormattingEnabled = true; - this.comboBoxDataEncoding.Items.AddRange(new object[] { - "CBOR", - "JSON"}); - this.comboBoxDataEncoding.Location = new System.Drawing.Point(182, 191); - this.comboBoxDataEncoding.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.comboBoxDataEncoding.Name = "comboBoxDataEncoding"; - this.comboBoxDataEncoding.Size = new System.Drawing.Size(108, 24); - this.comboBoxDataEncoding.TabIndex = 17; - // - // labelDataEncoding - // - this.labelDataEncoding.AutoSize = true; - this.labelDataEncoding.Location = new System.Drawing.Point(24, 194); - this.labelDataEncoding.Name = "labelDataEncoding"; - this.labelDataEncoding.Size = new System.Drawing.Size(104, 17); - this.labelDataEncoding.TabIndex = 16; - this.labelDataEncoding.Text = "Data encoding:"; - // - // checkBoxAutoEscapePVA - // - this.checkBoxAutoEscapePVA.AutoSize = true; - this.checkBoxAutoEscapePVA.Checked = true; - this.checkBoxAutoEscapePVA.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxAutoEscapePVA.Location = new System.Drawing.Point(339, 86); - this.checkBoxAutoEscapePVA.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkBoxAutoEscapePVA.Name = "checkBoxAutoEscapePVA"; - this.checkBoxAutoEscapePVA.Size = new System.Drawing.Size(148, 21); - this.checkBoxAutoEscapePVA.TabIndex = 12; - this.checkBoxAutoEscapePVA.Text = "Auto-escape PVAs"; - this.checkBoxAutoEscapePVA.UseVisualStyleBackColor = true; + // textHostname // - // comboBoxFloatsFormat + this.textHostname.Location = new System.Drawing.Point(154, 304); + this.textHostname.Margin = new System.Windows.Forms.Padding(6); + this.textHostname.MaxLength = 512; + this.textHostname.Name = "textHostname"; + this.textHostname.Size = new System.Drawing.Size(694, 29); + this.textHostname.TabIndex = 5; + this.textHostname.TextChanged += new System.EventHandler(this.TextHostname_TextChanged); // - this.comboBoxFloatsFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxFloatsFormat.FormattingEnabled = true; - this.comboBoxFloatsFormat.Items.AddRange(new object[] { - "default", - "scientific", - "auto"}); - this.comboBoxFloatsFormat.Location = new System.Drawing.Point(182, 155); - this.comboBoxFloatsFormat.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.comboBoxFloatsFormat.Name = "comboBoxFloatsFormat"; - this.comboBoxFloatsFormat.Size = new System.Drawing.Size(108, 24); - this.comboBoxFloatsFormat.TabIndex = 15; + // textUsername // - // labelFloatsFormat + this.textUsername.Location = new System.Drawing.Point(154, 454); + this.textUsername.Margin = new System.Windows.Forms.Padding(6); + this.textUsername.MaxLength = 512; + this.textUsername.Name = "textUsername"; + this.textUsername.Size = new System.Drawing.Size(313, 29); + this.textUsername.TabIndex = 7; // - this.labelFloatsFormat.AutoSize = true; - this.labelFloatsFormat.Location = new System.Drawing.Point(24, 158); - this.labelFloatsFormat.Name = "labelFloatsFormat"; - this.labelFloatsFormat.Size = new System.Drawing.Size(94, 17); - this.labelFloatsFormat.TabIndex = 14; - this.labelFloatsFormat.Text = "Floats format:"; + // textPassword // - // checkBoxIndexIncludeFrozen + this.textPassword.Location = new System.Drawing.Point(154, 514); + this.textPassword.Margin = new System.Windows.Forms.Padding(6); + this.textPassword.MaxLength = 512; + this.textPassword.Name = "textPassword"; + this.textPassword.PasswordChar = '*'; + this.textPassword.Size = new System.Drawing.Size(313, 29); + this.textPassword.TabIndex = 8; // - this.checkBoxIndexIncludeFrozen.AutoSize = true; - this.checkBoxIndexIncludeFrozen.Location = new System.Drawing.Point(339, 154); - this.checkBoxIndexIncludeFrozen.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkBoxIndexIncludeFrozen.Name = "checkBoxIndexIncludeFrozen"; - this.checkBoxIndexIncludeFrozen.Size = new System.Drawing.Size(167, 21); - this.checkBoxIndexIncludeFrozen.TabIndex = 16; - this.checkBoxIndexIncludeFrozen.Text = "Include frozen indices"; - this.checkBoxIndexIncludeFrozen.UseVisualStyleBackColor = true; + // labelDescription // - // checkBoxMultiFieldLenient + this.labelDescription.AutoSize = true; + this.labelDescription.Location = new System.Drawing.Point(22, 88); + this.labelDescription.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDescription.Name = "labelDescription"; + this.labelDescription.Size = new System.Drawing.Size(115, 25); + this.labelDescription.TabIndex = 10; + this.labelDescription.Text = "Description:"; // - this.checkBoxMultiFieldLenient.AutoSize = true; - this.checkBoxMultiFieldLenient.Checked = true; - this.checkBoxMultiFieldLenient.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxMultiFieldLenient.Location = new System.Drawing.Point(339, 119); - this.checkBoxMultiFieldLenient.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkBoxMultiFieldLenient.Name = "checkBoxMultiFieldLenient"; - this.checkBoxMultiFieldLenient.Size = new System.Drawing.Size(173, 21); - this.checkBoxMultiFieldLenient.TabIndex = 14; - this.checkBoxMultiFieldLenient.Text = "Multi value field lenient"; - this.checkBoxMultiFieldLenient.UseVisualStyleBackColor = true; + // labelName // - // checkBoxApplyTZ + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(22, 32); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(70, 25); + this.labelName.TabIndex = 8; + this.labelName.Text = "Name:"; // - this.checkBoxApplyTZ.AutoSize = true; - this.checkBoxApplyTZ.Location = new System.Drawing.Point(339, 53); - this.checkBoxApplyTZ.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkBoxApplyTZ.Name = "checkBoxApplyTZ"; - this.checkBoxApplyTZ.Size = new System.Drawing.Size(149, 21); - this.checkBoxApplyTZ.TabIndex = 10; - this.checkBoxApplyTZ.Text = "Use local timezone"; - this.checkBoxApplyTZ.UseVisualStyleBackColor = true; + // labelHostname // - // checkBoxFollowRedirects + this.labelHostname.AutoSize = true; + this.labelHostname.Location = new System.Drawing.Point(22, 309); + this.labelHostname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelHostname.Name = "labelHostname"; + this.labelHostname.Size = new System.Drawing.Size(107, 25); + this.labelHostname.TabIndex = 0; + this.labelHostname.Text = "Hostname:"; // - this.checkBoxFollowRedirects.AutoSize = true; - this.checkBoxFollowRedirects.Checked = true; - this.checkBoxFollowRedirects.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxFollowRedirects.Location = new System.Drawing.Point(339, 20); - this.checkBoxFollowRedirects.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkBoxFollowRedirects.Name = "checkBoxFollowRedirects"; - this.checkBoxFollowRedirects.Size = new System.Drawing.Size(169, 21); - this.checkBoxFollowRedirects.TabIndex = 8; - this.checkBoxFollowRedirects.Text = "Follow HTTP redirects"; - this.checkBoxFollowRedirects.UseVisualStyleBackColor = true; + // labelPort // - // labelBodySize + this.labelPort.AutoSize = true; + this.labelPort.Location = new System.Drawing.Point(22, 364); + this.labelPort.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelPort.Name = "labelPort"; + this.labelPort.Size = new System.Drawing.Size(53, 25); + this.labelPort.TabIndex = 2; + this.labelPort.Text = "Port:"; // - this.labelBodySize.AutoSize = true; - this.labelBodySize.Location = new System.Drawing.Point(24, 88); - this.labelBodySize.Name = "labelBodySize"; - this.labelBodySize.Size = new System.Drawing.Size(150, 17); - this.labelBodySize.TabIndex = 10; - this.labelBodySize.Text = "Max page length (MB):"; + // labelUsername // - // numericUpDownBodySize + this.labelUsername.AutoSize = true; + this.labelUsername.Location = new System.Drawing.Point(22, 459); + this.labelUsername.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelUsername.Name = "labelUsername"; + this.labelUsername.Size = new System.Drawing.Size(108, 25); + this.labelUsername.TabIndex = 4; + this.labelUsername.Text = "Username:"; // - this.numericUpDownBodySize.Location = new System.Drawing.Point(182, 86); - this.numericUpDownBodySize.Maximum = new decimal(new int[] { - -1, + // numericUpDownPort + // + this.numericUpDownPort.Location = new System.Drawing.Point(154, 362); + this.numericUpDownPort.Margin = new System.Windows.Forms.Padding(4); + this.numericUpDownPort.Maximum = new decimal(new int[] { + 65535, 0, 0, 0}); - this.numericUpDownBodySize.Name = "numericUpDownBodySize"; - this.numericUpDownBodySize.Size = new System.Drawing.Size(104, 22); - this.numericUpDownBodySize.TabIndex = 11; - this.numericUpDownBodySize.Value = new decimal(new int[] { - 100, + this.numericUpDownPort.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownPort.Name = "numericUpDownPort"; + this.numericUpDownPort.Size = new System.Drawing.Size(143, 29); + this.numericUpDownPort.TabIndex = 6; + this.numericUpDownPort.Value = new decimal(new int[] { + 9200, 0, 0, 0}); + this.numericUpDownPort.ValueChanged += new System.EventHandler(this.NumericUpDownPort_ValueChanged); // - // labelFetchSize + // labelPassword // - this.labelFetchSize.AutoSize = true; - this.labelFetchSize.Location = new System.Drawing.Point(24, 53); - this.labelFetchSize.Name = "labelFetchSize"; - this.labelFetchSize.Size = new System.Drawing.Size(145, 17); - this.labelFetchSize.TabIndex = 8; - this.labelFetchSize.Text = "Max page size (rows):"; + this.labelPassword.AutoSize = true; + this.labelPassword.Location = new System.Drawing.Point(22, 519); + this.labelPassword.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelPassword.Name = "labelPassword"; + this.labelPassword.Size = new System.Drawing.Size(104, 25); + this.labelPassword.TabIndex = 6; + this.labelPassword.Text = "Password:"; // - // numericUpDownFetchSize + // tabConfiguration // - this.numericUpDownFetchSize.Increment = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownFetchSize.Location = new System.Drawing.Point(182, 51); - this.numericUpDownFetchSize.Maximum = new decimal(new int[] { - -1, + this.tabConfiguration.Controls.Add(this.pageBasic); + this.tabConfiguration.Controls.Add(this.pageSecurity); + this.tabConfiguration.Controls.Add(this.pageProxy); + this.tabConfiguration.Controls.Add(this.pageMisc); + this.tabConfiguration.Controls.Add(this.pageLogging); + this.tabConfiguration.Location = new System.Drawing.Point(23, 111); + this.tabConfiguration.Margin = new System.Windows.Forms.Padding(4); + this.tabConfiguration.Name = "tabConfiguration"; + this.tabConfiguration.SelectedIndex = 0; + this.tabConfiguration.Size = new System.Drawing.Size(891, 690); + this.tabConfiguration.TabIndex = 8; + // + // pageProxy + // + this.pageProxy.Controls.Add(this.textBoxProxyUsername); + this.pageProxy.Controls.Add(this.textBoxProxyPassword); + this.pageProxy.Controls.Add(this.labelProxyUsername); + this.pageProxy.Controls.Add(this.labelProxyPassword); + this.pageProxy.Controls.Add(this.checkProxyAuthEnabled); + this.pageProxy.Controls.Add(this.comboBoxProxyType); + this.pageProxy.Controls.Add(this.labelProxyType); + this.pageProxy.Controls.Add(this.textProxyHostname); + this.pageProxy.Controls.Add(this.labelProxyHostname); + this.pageProxy.Controls.Add(this.labelProxyPort); + this.pageProxy.Controls.Add(this.numericUpDownProxyPort); + this.pageProxy.Controls.Add(this.checkProxyEnabled); + this.pageProxy.Location = new System.Drawing.Point(4, 33); + this.pageProxy.Name = "pageProxy"; + this.pageProxy.Padding = new System.Windows.Forms.Padding(3); + this.pageProxy.Size = new System.Drawing.Size(883, 653); + this.pageProxy.TabIndex = 4; + this.pageProxy.Text = "Proxy"; + this.pageProxy.UseVisualStyleBackColor = true; + // + // textBoxProxyUsername + // + this.textBoxProxyUsername.Location = new System.Drawing.Point(166, 355); + this.textBoxProxyUsername.Margin = new System.Windows.Forms.Padding(6); + this.textBoxProxyUsername.MaxLength = 512; + this.textBoxProxyUsername.Name = "textBoxProxyUsername"; + this.textBoxProxyUsername.Size = new System.Drawing.Size(313, 29); + this.textBoxProxyUsername.TabIndex = 33; + // + // textBoxProxyPassword + // + this.textBoxProxyPassword.Location = new System.Drawing.Point(166, 415); + this.textBoxProxyPassword.Margin = new System.Windows.Forms.Padding(6); + this.textBoxProxyPassword.MaxLength = 512; + this.textBoxProxyPassword.Name = "textBoxProxyPassword"; + this.textBoxProxyPassword.PasswordChar = '*'; + this.textBoxProxyPassword.Size = new System.Drawing.Size(313, 29); + this.textBoxProxyPassword.TabIndex = 34; + // + // labelProxyUsername + // + this.labelProxyUsername.AutoSize = true; + this.labelProxyUsername.Location = new System.Drawing.Point(34, 360); + this.labelProxyUsername.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelProxyUsername.Name = "labelProxyUsername"; + this.labelProxyUsername.Size = new System.Drawing.Size(108, 25); + this.labelProxyUsername.TabIndex = 31; + this.labelProxyUsername.Text = "Username:"; + // + // labelProxyPassword + // + this.labelProxyPassword.AutoSize = true; + this.labelProxyPassword.Location = new System.Drawing.Point(34, 420); + this.labelProxyPassword.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelProxyPassword.Name = "labelProxyPassword"; + this.labelProxyPassword.Size = new System.Drawing.Size(104, 25); + this.labelProxyPassword.TabIndex = 32; + this.labelProxyPassword.Text = "Password:"; + // + // checkProxyAuthEnabled + // + this.checkProxyAuthEnabled.AutoSize = true; + this.checkProxyAuthEnabled.Checked = true; + this.checkProxyAuthEnabled.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkProxyAuthEnabled.Location = new System.Drawing.Point(25, 294); + this.checkProxyAuthEnabled.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkProxyAuthEnabled.Name = "checkProxyAuthEnabled"; + this.checkProxyAuthEnabled.Size = new System.Drawing.Size(228, 29); + this.checkProxyAuthEnabled.TabIndex = 30; + this.checkProxyAuthEnabled.Text = "Enable Authentication"; + this.checkProxyAuthEnabled.UseVisualStyleBackColor = true; + this.checkProxyAuthEnabled.CheckedChanged += new System.EventHandler(this.CheckProxyAuthEnabled_CheckedChanged); + // + // comboBoxProxyType + // + this.comboBoxProxyType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxProxyType.FormattingEnabled = true; + this.comboBoxProxyType.Items.AddRange(new object[] { + "HTTP", + "SOCKS4", + "SOCKS4a", + "SOCKS5", + "SOCKS5h"}); + this.comboBoxProxyType.Location = new System.Drawing.Point(166, 100); + this.comboBoxProxyType.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.comboBoxProxyType.Name = "comboBoxProxyType"; + this.comboBoxProxyType.Size = new System.Drawing.Size(147, 32); + this.comboBoxProxyType.TabIndex = 29; + this.comboBoxProxyType.SelectedIndexChanged += new System.EventHandler(this.ComboBoxProxyType_SelectedIndexChanged); + // + // labelProxyType + // + this.labelProxyType.AutoSize = true; + this.labelProxyType.Location = new System.Drawing.Point(34, 107); + this.labelProxyType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelProxyType.Name = "labelProxyType"; + this.labelProxyType.Size = new System.Drawing.Size(63, 25); + this.labelProxyType.TabIndex = 28; + this.labelProxyType.Text = "Type:"; + // + // textProxyHostname + // + this.textProxyHostname.Location = new System.Drawing.Point(166, 165); + this.textProxyHostname.Margin = new System.Windows.Forms.Padding(6); + this.textProxyHostname.MaxLength = 512; + this.textProxyHostname.Name = "textProxyHostname"; + this.textProxyHostname.Size = new System.Drawing.Size(658, 29); + this.textProxyHostname.TabIndex = 26; + // + // labelProxyHostname + // + this.labelProxyHostname.AutoSize = true; + this.labelProxyHostname.Location = new System.Drawing.Point(34, 170); + this.labelProxyHostname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelProxyHostname.Name = "labelProxyHostname"; + this.labelProxyHostname.Size = new System.Drawing.Size(107, 25); + this.labelProxyHostname.TabIndex = 24; + this.labelProxyHostname.Text = "Hostname:"; + // + // labelProxyPort + // + this.labelProxyPort.AutoSize = true; + this.labelProxyPort.Location = new System.Drawing.Point(34, 225); + this.labelProxyPort.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelProxyPort.Name = "labelProxyPort"; + this.labelProxyPort.Size = new System.Drawing.Size(53, 25); + this.labelProxyPort.TabIndex = 25; + this.labelProxyPort.Text = "Port:"; + // + // numericUpDownProxyPort + // + this.numericUpDownProxyPort.Location = new System.Drawing.Point(166, 223); + this.numericUpDownProxyPort.Margin = new System.Windows.Forms.Padding(4); + this.numericUpDownProxyPort.Maximum = new decimal(new int[] { + 65535, 0, 0, 0}); - this.numericUpDownFetchSize.Name = "numericUpDownFetchSize"; - this.numericUpDownFetchSize.Size = new System.Drawing.Size(104, 22); - this.numericUpDownFetchSize.TabIndex = 9; - this.numericUpDownFetchSize.Value = new decimal(new int[] { - 1000, + this.numericUpDownProxyPort.Minimum = new decimal(new int[] { + 1, 0, 0, 0}); - // - // labelTimeout - // - this.labelTimeout.AutoSize = true; - this.labelTimeout.Location = new System.Drawing.Point(24, 20); - this.labelTimeout.Name = "labelTimeout"; - this.labelTimeout.Size = new System.Drawing.Size(136, 17); - this.labelTimeout.TabIndex = 6; - this.labelTimeout.Text = "Request timeout (s):"; - // - // numericUpDownTimeout - // - this.numericUpDownTimeout.Location = new System.Drawing.Point(182, 18); - this.numericUpDownTimeout.Maximum = new decimal(new int[] { - -1, + this.numericUpDownProxyPort.Name = "numericUpDownProxyPort"; + this.numericUpDownProxyPort.Size = new System.Drawing.Size(143, 29); + this.numericUpDownProxyPort.TabIndex = 27; + this.numericUpDownProxyPort.Value = new decimal(new int[] { + 1080, 0, 0, 0}); - this.numericUpDownTimeout.Name = "numericUpDownTimeout"; - this.numericUpDownTimeout.Size = new System.Drawing.Size(104, 22); - this.numericUpDownTimeout.TabIndex = 7; - // - // pageLogging - // - this.pageLogging.Controls.Add(this.checkLoggingEnabled); - this.pageLogging.Controls.Add(this.comboLogLevel); - this.pageLogging.Controls.Add(this.labelLogLevel); - this.pageLogging.Controls.Add(this.logDirectoryPathButton); - this.pageLogging.Controls.Add(this.textLogDirectoryPath); - this.pageLogging.Controls.Add(this.labelLogDirectory); - this.pageLogging.Location = new System.Drawing.Point(4, 25); - this.pageLogging.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.pageLogging.Name = "pageLogging"; - this.pageLogging.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.pageLogging.Size = new System.Drawing.Size(640, 431); - this.pageLogging.TabIndex = 2; - this.pageLogging.Text = "Logging"; - this.pageLogging.UseVisualStyleBackColor = true; - // - // checkLoggingEnabled - // - this.checkLoggingEnabled.AutoSize = true; - this.checkLoggingEnabled.Checked = true; - this.checkLoggingEnabled.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkLoggingEnabled.Location = new System.Drawing.Point(16, 21); - this.checkLoggingEnabled.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.checkLoggingEnabled.Name = "checkLoggingEnabled"; - this.checkLoggingEnabled.Size = new System.Drawing.Size(137, 21); - this.checkLoggingEnabled.TabIndex = 22; - this.checkLoggingEnabled.Text = "Enable Logging?"; - this.checkLoggingEnabled.UseVisualStyleBackColor = true; - this.checkLoggingEnabled.CheckedChanged += new System.EventHandler(this.CheckLoggingEnabled_CheckedChanged); - // - // comboLogLevel - // - this.comboLogLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboLogLevel.FormattingEnabled = true; - this.comboLogLevel.Items.AddRange(new object[] { - "DEBUG", - "INFO", - "WARN", - "ERROR"}); - this.comboLogLevel.Location = new System.Drawing.Point(124, 98); - this.comboLogLevel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.comboLogLevel.Name = "comboLogLevel"; - this.comboLogLevel.Size = new System.Drawing.Size(108, 24); - this.comboLogLevel.TabIndex = 25; - // - // labelLogLevel - // - this.labelLogLevel.AutoSize = true; - this.labelLogLevel.Location = new System.Drawing.Point(16, 101); - this.labelLogLevel.Name = "labelLogLevel"; - this.labelLogLevel.Size = new System.Drawing.Size(74, 17); - this.labelLogLevel.TabIndex = 20; - this.labelLogLevel.Text = "Log Level:"; - // - // logDirectoryPathButton - // - this.logDirectoryPathButton.Location = new System.Drawing.Point(526, 55); - this.logDirectoryPathButton.Margin = new System.Windows.Forms.Padding(4); - this.logDirectoryPathButton.Name = "logDirectoryPathButton"; - this.logDirectoryPathButton.Size = new System.Drawing.Size(100, 28); - this.logDirectoryPathButton.TabIndex = 24; - this.logDirectoryPathButton.Text = "Browse..."; - this.logDirectoryPathButton.UseVisualStyleBackColor = true; - this.logDirectoryPathButton.Click += new System.EventHandler(this.LogDirectoryPathButton_Click); - // - // textLogDirectoryPath - // - this.textLogDirectoryPath.Location = new System.Drawing.Point(124, 57); - this.textLogDirectoryPath.Margin = new System.Windows.Forms.Padding(4); - this.textLogDirectoryPath.MaxLength = 512; - this.textLogDirectoryPath.Name = "textLogDirectoryPath"; - this.textLogDirectoryPath.Size = new System.Drawing.Size(392, 22); - this.textLogDirectoryPath.TabIndex = 23; // - // labelLogDirectory + // checkProxyEnabled // - this.labelLogDirectory.AutoSize = true; - this.labelLogDirectory.Location = new System.Drawing.Point(16, 62); - this.labelLogDirectory.Name = "labelLogDirectory"; - this.labelLogDirectory.Size = new System.Drawing.Size(97, 17); - this.labelLogDirectory.TabIndex = 16; - this.labelLogDirectory.Text = "Log Directory:"; + this.checkProxyEnabled.AutoSize = true; + this.checkProxyEnabled.Checked = true; + this.checkProxyEnabled.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkProxyEnabled.Location = new System.Drawing.Point(25, 32); + this.checkProxyEnabled.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.checkProxyEnabled.Name = "checkProxyEnabled"; + this.checkProxyEnabled.Size = new System.Drawing.Size(154, 29); + this.checkProxyEnabled.TabIndex = 23; + this.checkProxyEnabled.Text = "Enable Proxy"; + this.checkProxyEnabled.UseVisualStyleBackColor = true; + this.checkProxyEnabled.CheckedChanged += new System.EventHandler(this.CheckProxyEnabled_CheckedChanged); // // DsnEditorForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(682, 588); + this.ClientSize = new System.Drawing.Size(938, 882); this.Controls.Add(this.tabConfiguration); this.Controls.Add(this.header); this.Controls.Add(this.testButton); @@ -843,29 +1072,32 @@ private void InitializeComponent() this.Controls.Add(this.saveButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4); + this.Margin = new System.Windows.Forms.Padding(6); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "DsnEditorForm"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "Elasticsearch ODBC DSN Configuration"; ((System.ComponentModel.ISupportInitialize)(this.header)).EndInit(); - this.groupSSL.ResumeLayout(false); - this.groupSSL.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).EndInit(); - this.tabConfiguration.ResumeLayout(false); - this.pageBasic.ResumeLayout(false); - this.pageBasic.PerformLayout(); - this.pageSecurity.ResumeLayout(false); - this.pageSecurity.PerformLayout(); + this.pageLogging.ResumeLayout(false); + this.pageLogging.PerformLayout(); this.pageMisc.ResumeLayout(false); this.pageMisc.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownVarcharLimit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownBodySize)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownFetchSize)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).EndInit(); - this.pageLogging.ResumeLayout(false); - this.pageLogging.PerformLayout(); + this.pageSecurity.ResumeLayout(false); + this.pageSecurity.PerformLayout(); + this.groupSSL.ResumeLayout(false); + this.groupSSL.PerformLayout(); + this.pageBasic.ResumeLayout(false); + this.pageBasic.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPort)).EndInit(); + this.tabConfiguration.ResumeLayout(false); + this.pageProxy.ResumeLayout(false); + this.pageProxy.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownProxyPort)).EndInit(); this.ResumeLayout(false); } @@ -875,40 +1107,8 @@ private void InitializeComponent() private System.Windows.Forms.Button cancelButton; private System.Windows.Forms.Button testButton; private System.Windows.Forms.PictureBox header; - private System.Windows.Forms.TextBox textCloudID; - private System.Windows.Forms.Label labelCloudID; - private System.Windows.Forms.TextBox textHostname; - private System.Windows.Forms.Label labelPort; - private System.Windows.Forms.Label labelHostname; - private System.Windows.Forms.TextBox textPassword; - private System.Windows.Forms.Label labelPassword; - private System.Windows.Forms.TextBox textUsername; - private System.Windows.Forms.Label labelUsername; - private System.Windows.Forms.NumericUpDown numericUpDownPort; - private System.Windows.Forms.RadioButton radioButtonDisabled; - private System.Windows.Forms.GroupBox groupSSL; - private System.Windows.Forms.RadioButton radioEnabledFull; - private System.Windows.Forms.RadioButton radioEnabledHostname; - private System.Windows.Forms.RadioButton radioEnabledNoHostname; - private System.Windows.Forms.RadioButton radioEnabledNoValidation; - private System.Windows.Forms.Button certificatePathButton; - private System.Windows.Forms.TextBox textCertificatePath; - private System.Windows.Forms.Label labelCertificatePath; private System.Windows.Forms.OpenFileDialog certificateFileDialog; - private System.Windows.Forms.TabControl tabConfiguration; - private System.Windows.Forms.TabPage pageBasic; - private System.Windows.Forms.TabPage pageSecurity; - private System.Windows.Forms.Label labelDescription; - private System.Windows.Forms.TextBox textName; - private System.Windows.Forms.Label labelName; - private System.Windows.Forms.TabPage pageLogging; - private System.Windows.Forms.Label labelLogLevel; - private System.Windows.Forms.Button logDirectoryPathButton; - private System.Windows.Forms.TextBox textLogDirectoryPath; - private System.Windows.Forms.Label labelLogDirectory; private System.Windows.Forms.FolderBrowserDialog folderLogDirectoryDialog; - private System.Windows.Forms.ComboBox comboLogLevel; - private System.Windows.Forms.CheckBox checkLoggingEnabled; private System.Windows.Forms.ToolTip toolTipName; private System.Windows.Forms.ToolTip toolTipDescription; private System.Windows.Forms.ToolTip toolTipCloudID; @@ -925,21 +1125,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolTip toolTipLogDirectoryPath; private System.Windows.Forms.ToolTip toolTipLoggingEnabled; private System.Windows.Forms.ToolTip toolTipLogLevel; - private System.Windows.Forms.TextBox textDescription; - private System.Windows.Forms.TabPage pageMisc; - private System.Windows.Forms.Label labelTimeout; - private System.Windows.Forms.NumericUpDown numericUpDownTimeout; - private System.Windows.Forms.Label labelFetchSize; - private System.Windows.Forms.NumericUpDown numericUpDownFetchSize; - private System.Windows.Forms.Label labelBodySize; - private System.Windows.Forms.NumericUpDown numericUpDownBodySize; - private System.Windows.Forms.CheckBox checkBoxIndexIncludeFrozen; - private System.Windows.Forms.CheckBox checkBoxMultiFieldLenient; - private System.Windows.Forms.CheckBox checkBoxApplyTZ; - private System.Windows.Forms.CheckBox checkBoxFollowRedirects; - private System.Windows.Forms.ComboBox comboBoxFloatsFormat; - private System.Windows.Forms.Label labelFloatsFormat; - private System.Windows.Forms.CheckBox checkBoxAutoEscapePVA; private System.Windows.Forms.ToolTip toolTipTimeout; private System.Windows.Forms.ToolTip toolTipFetchSize; private System.Windows.Forms.ToolTip toolTipBodySize; @@ -949,17 +1134,84 @@ private void InitializeComponent() private System.Windows.Forms.ToolTip toolTipAutoEscapePVA; private System.Windows.Forms.ToolTip toolTipMultiFieldLenient; private System.Windows.Forms.ToolTip toolTipIndexIncludeFrozen; - private System.Windows.Forms.ComboBox comboBoxDataEncoding; - private System.Windows.Forms.Label labelDataEncoding; private System.Windows.Forms.ToolTip toolTipDataEncoding; - private System.Windows.Forms.ComboBox comboBoxDataCompression; - private System.Windows.Forms.Label labelDataCompression; private System.Windows.Forms.ToolTip toolTipDataCompression; + private System.Windows.Forms.ToolTip toolTipEarlyExecution; + private System.Windows.Forms.ToolTip toolTipVarcharLimit; + private System.Windows.Forms.TabPage pageLogging; + private System.Windows.Forms.CheckBox checkLoggingEnabled; + private System.Windows.Forms.ComboBox comboLogLevel; + private System.Windows.Forms.Label labelLogLevel; + private System.Windows.Forms.Button logDirectoryPathButton; + private System.Windows.Forms.TextBox textLogDirectoryPath; + private System.Windows.Forms.Label labelLogDirectory; + private System.Windows.Forms.TabPage pageMisc; private System.Windows.Forms.Label labelVarcharLimit; private System.Windows.Forms.NumericUpDown numericUpDownVarcharLimit; private System.Windows.Forms.CheckBox checkBoxEarlyExecution; - private System.Windows.Forms.ToolTip toolTipEarlyExecution; - private System.Windows.Forms.ToolTip toolTipVarcharLimit; + private System.Windows.Forms.ComboBox comboBoxDataCompression; + private System.Windows.Forms.Label labelDataCompression; + private System.Windows.Forms.ComboBox comboBoxDataEncoding; + private System.Windows.Forms.Label labelDataEncoding; + private System.Windows.Forms.CheckBox checkBoxAutoEscapePVA; + private System.Windows.Forms.ComboBox comboBoxFloatsFormat; + private System.Windows.Forms.Label labelFloatsFormat; + private System.Windows.Forms.CheckBox checkBoxIndexIncludeFrozen; + private System.Windows.Forms.CheckBox checkBoxMultiFieldLenient; + private System.Windows.Forms.CheckBox checkBoxApplyTZ; + private System.Windows.Forms.CheckBox checkBoxFollowRedirects; + private System.Windows.Forms.Label labelBodySize; + private System.Windows.Forms.NumericUpDown numericUpDownBodySize; + private System.Windows.Forms.Label labelFetchSize; + private System.Windows.Forms.NumericUpDown numericUpDownFetchSize; + private System.Windows.Forms.Label labelTimeout; + private System.Windows.Forms.NumericUpDown numericUpDownTimeout; + private System.Windows.Forms.TabPage pageSecurity; + private System.Windows.Forms.Button certificatePathButton; + private System.Windows.Forms.GroupBox groupSSL; + private System.Windows.Forms.RadioButton radioEnabledFull; + private System.Windows.Forms.RadioButton radioEnabledHostname; + private System.Windows.Forms.RadioButton radioEnabledNoHostname; + private System.Windows.Forms.RadioButton radioEnabledNoValidation; + private System.Windows.Forms.RadioButton radioButtonDisabled; + private System.Windows.Forms.TextBox textCertificatePath; + private System.Windows.Forms.Label labelCertificatePath; + private System.Windows.Forms.TabPage pageBasic; + private System.Windows.Forms.Label labelCloudID; + private System.Windows.Forms.TextBox textDescription; + private System.Windows.Forms.TextBox textCloudID; + private System.Windows.Forms.TextBox textName; + private System.Windows.Forms.TextBox textHostname; + private System.Windows.Forms.TextBox textUsername; + private System.Windows.Forms.TextBox textPassword; + private System.Windows.Forms.Label labelDescription; + private System.Windows.Forms.Label labelName; + private System.Windows.Forms.Label labelHostname; + private System.Windows.Forms.Label labelPort; + private System.Windows.Forms.Label labelUsername; + private System.Windows.Forms.NumericUpDown numericUpDownPort; + private System.Windows.Forms.Label labelPassword; + private System.Windows.Forms.TabControl tabConfiguration; + private System.Windows.Forms.TabPage pageProxy; + private System.Windows.Forms.TextBox textBoxProxyUsername; + private System.Windows.Forms.TextBox textBoxProxyPassword; + private System.Windows.Forms.Label labelProxyUsername; + private System.Windows.Forms.Label labelProxyPassword; + private System.Windows.Forms.CheckBox checkProxyAuthEnabled; + private System.Windows.Forms.ComboBox comboBoxProxyType; + private System.Windows.Forms.Label labelProxyType; + private System.Windows.Forms.TextBox textProxyHostname; + private System.Windows.Forms.Label labelProxyHostname; + private System.Windows.Forms.Label labelProxyPort; + private System.Windows.Forms.NumericUpDown numericUpDownProxyPort; + private System.Windows.Forms.CheckBox checkProxyEnabled; + private System.Windows.Forms.ToolTip toolTipProxyEnabled; + private System.Windows.Forms.ToolTip toolTipProxyType; + private System.Windows.Forms.ToolTip toolTipProxyHostname; + private System.Windows.Forms.ToolTip toolTipProxyPort; + private System.Windows.Forms.ToolTip toolTipProxyAuthEnabled; + private System.Windows.Forms.ToolTip toolTipProxyUsername; + private System.Windows.Forms.ToolTip toolTipProxyPassword; } } diff --git a/dsneditor/EsOdbcDsnEditor/DSNEditorForm.cs b/dsneditor/EsOdbcDsnEditor/DSNEditorForm.cs index 21939905..a66ea4b4 100644 --- a/dsneditor/EsOdbcDsnEditor/DSNEditorForm.cs +++ b/dsneditor/EsOdbcDsnEditor/DSNEditorForm.cs @@ -120,6 +120,23 @@ public DsnEditorForm( "In case the server uses a certificate that is not part of the PKI, for example using a self-signed certificate," + Environment.NewLine + "you can configure the path to a X509 certificate file that will be used by the driver to validate server's offered certificate."); + // Proxy Panel + string[] noes = {"no", "false", "0"}; + checkProxyEnabled.Checked = !noes.Contains(Builder.ContainsKey("ProxyEnabled") ? Builder["ProxyEnabled"].ToString() : "no"); + comboBoxProxyType.Text = Builder.ContainsKey("ProxyType") ? Builder["ProxyType"].ToString() : "HTTP"; + textProxyHostname.Text = Builder.ContainsKey("ProxyHost") ? Builder["ProxyHost"].ToString().StripBraces() : string.Empty; + numericUpDownProxyPort.Text = Builder.ContainsKey("ProxyPort") ? Builder["ProxyPort"].ToString() : string.Empty; + checkProxyAuthEnabled.Checked = !noes.Contains(Builder.ContainsKey("ProxyAuthEnabled") ? Builder["ProxyAuthEnabled"].ToString() : "no"); + textBoxProxyUsername.Text = Builder.ContainsKey("ProxyAuthUID") ? Builder["ProxyAuthUID"].ToString().StripBraces() : string.Empty; + textBoxProxyPassword.Text = Builder.ContainsKey("ProxyAuthPWD") ? Builder["ProxyAuthPWD"].ToString().StripBraces() : string.Empty; + toolTipProxyEnabled.SetToolTip(checkProxyEnabled, "This will enable relaying the connection to Elasticsearch over a proxy."); + toolTipProxyType.SetToolTip(comboBoxProxyType, "The protocol to use when connecting to the proxy."); + toolTipProxyHostname.SetToolTip(textProxyHostname, "The IP or domain name of the proxy server."); + toolTipProxyPort.SetToolTip(numericUpDownProxyPort, "The port the proxy is listening on for connections."); + toolTipProxyAuthEnabled.SetToolTip(checkProxyAuthEnabled, "Enables the authentication of the connection to the proxy."); + toolTipProxyUsername.SetToolTip(textBoxProxyUsername, "The ID to use when authenticating to the proxy."); + toolTipProxyPassword.SetToolTip(textBoxProxyPassword, "The password to use when authenticating to the proxy"); + // Logging Panel textLogDirectoryPath.Text = Builder.ContainsKey("tracefile") ? Builder["tracefile"].ToString().StripBraces() : string.Empty; comboLogLevel.Text = "DEBUG"; // Default setting @@ -161,7 +178,6 @@ public DsnEditorForm( comboBoxDataEncoding.Text = Builder.ContainsKey("Packing") ? Builder["Packing"].ToString() : "CBOR"; comboBoxDataCompression.Text = Builder.ContainsKey("Compression") ? Builder["Compression"].ToString() : "auto"; - string[] noes = {"no", "false", "0"}; checkBoxFollowRedirects.Checked = !noes.Contains(Builder.ContainsKey("Follow") ? Builder["Follow"].ToString().StripBraces() : "yes"); checkBoxApplyTZ.Checked = !noes.Contains(Builder.ContainsKey("ApplyTZ") ? Builder["ApplyTZ"].ToString().StripBraces() : "no"); checkBoxAutoEscapePVA.Checked = !noes.Contains(Builder.ContainsKey("AutoEscapePVA") ? Builder["AutoEscapePVA"].ToString().StripBraces() : "yes"); @@ -282,6 +298,15 @@ private bool RebuildAndValidateDsn() if (radioEnabledHostname.Checked) Builder["secure"] = 3; if (radioEnabledFull.Checked) Builder["secure"] = 4; + // Proxy Panel + Builder["ProxyEnabled"] = checkProxyEnabled.Checked ? "true" : "false"; + Builder["ProxyType"] = comboBoxProxyType.Text; + Builder["ProxyHost"] = textProxyHostname.Text; + Builder["ProxyPort"] = numericUpDownProxyPort.Text; + Builder["ProxyAuthEnabled"] = checkProxyAuthEnabled.Checked ? "true" : "false"; + Builder["ProxyAuthUID"] = textBoxProxyUsername.Text; + Builder["ProxyAuthPWD"] = textBoxProxyPassword.Text; + // Logging Panel Builder["tracefile"] = textLogDirectoryPath.Text; Builder["tracelevel"] = comboLogLevel.Text; @@ -394,6 +419,12 @@ private bool ValidateCertificateFile(string file) private void CheckLoggingEnabled_CheckedChanged(object sender, EventArgs e) => EnableDisableLoggingControls(); + private void CheckProxyEnabled_CheckedChanged(object sender, EventArgs e) => EnableDisableProxyControls(); + + private void CheckProxyAuthEnabled_CheckedChanged(object sender, EventArgs e) => EnableDisableProxyAuthControls(); + + private void ComboBoxProxyType_SelectedIndexChanged(object sender, EventArgs e) => UpdateDefaultPort(); + private void EnableDisableActionButtons() { if (string.IsNullOrEmpty(textCloudID.Text) == false) { @@ -438,6 +469,36 @@ private void EnableDisableLoggingControls() logDirectoryPathButton.Enabled = checkLoggingEnabled.Checked; } + private void EnableDisableProxyControls() + { + comboBoxProxyType.Enabled = checkProxyEnabled.Checked; + textProxyHostname.Enabled = checkProxyEnabled.Checked; + numericUpDownProxyPort.Enabled = checkProxyEnabled.Checked; + checkProxyAuthEnabled.Enabled = checkProxyEnabled.Checked; + textBoxProxyUsername.Enabled = checkProxyAuthEnabled.Checked && checkProxyEnabled.Checked; + textBoxProxyPassword.Enabled = checkProxyAuthEnabled.Checked && checkProxyEnabled.Checked; + } + + private void EnableDisableProxyAuthControls() + { + textBoxProxyUsername.Enabled = checkProxyAuthEnabled.Checked; + textBoxProxyPassword.Enabled = checkProxyAuthEnabled.Checked; + } + + private void UpdateDefaultPort() + { + switch(comboBoxProxyType.Text.ToUpperInvariant()) + { + case "HTTP": numericUpDownProxyPort.Text = "8080"; break; + // TODO: https://github.com/jeroen/curl/issues/186 : "Schannel backend doesn't support HTTPS proxy" + case "HTTPS": numericUpDownProxyPort.Text = "443"; break; + case "SOCKS4": + case "SOCKS4A": + case "SOCKS5": + case "SOCKS5H": numericUpDownProxyPort.Text = "1080"; break; + } + } + private void CancelButton_Click(object sender, EventArgs e) { // Clear the builder so that the resulting int returned to the caller is 0.