private void LoadHttpClientProviderSettings(ClientUiConfiguration configuration) { CommonMethods.SafeRunMethod.WithoutReturn(() => { httpClientProvider.GetParameretsClient().SetServerAddress(configuration.ServerAddress, configuration.TimeoutMs); httpClientProvider.GetParameretsClient().SignIn(configuration.Login, configuration.Password); }, false); RewriteClientUiConfiguration(configuration); }
private void SetServerAddress() { var errors = GetConnectToServerErrors().ToArray(); if (errors.Any()) { throw new ArgumentException(string.Join("\n", errors)); } httpClientProvider.GetParameretsClient().SetServerAddressAndTimeoutMs(TextBoxServerAddress.Text, TextBoxRequestTimeoutMs.Text.ToInt()); TextBoxServerAddress.Text = httpClientProvider.ServerAddress; }
public void ActionBeforeTrueDialogResultClose() { httpClientProvider.GetParameretsClient().SetServerAddress(TextBoxServerAddress.Text, TextBoxRequestTimeoutMs.Text.ToInt()); clientConfiguration.ServerAddress = httpClientProvider.ServerAddress; clientConfiguration.TimeoutMs = httpClientProvider.TimeoutMs; clientConfiguration.WriteConfiguration(); }