コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }