public MainWindow() { InitializeComponent(); clientUiConfiguration = LoadClientUiConfiguration(); httpClientProvider = new HttpClientProvider(clientUiConfiguration.ServerAddress, clientUiConfiguration.TimeoutMs, clientUiConfiguration.UserLogin, clientUiConfiguration.UserPassword); DataGridDisciplines.LoadTable(typeof(DisciplineBasedProxy)); DataGridGroups.LoadTable(typeof(GroupBasedProxy)); DataGridStudents.LoadTable(typeof(StudentBasedProxy)); DataGridUsers.LoadTable(typeof(UserBasedProxy)); }
private ClientUiConfiguration LoadClientUiConfiguration() { var configuration = ClientUiConfiguration.ReadConfiguration(); TextBoxServerAddress.Text = configuration.ServerAddress; TextBoxRequestTimeoutMs.Text = configuration.TimeoutMs.ToString(); TextBoxUserLogin.Text = configuration.UserLogin; PasswordBoxUserPassword.Password = configuration.UserPassword; CheckBoxSaveLoginAndPassword.IsChecked = configuration.SaveLoginAndPassword; return(configuration); }