Esempio n. 1
0
 private ClientConfig?TryGetConfig(IClientConfigManager manager)
 {
     try
     {
         return(manager.LoadConfig());
     }
     catch (ClientConfigException e)
     {
         MessageBox.Show(e.Message, "Client configuration error:", MessageBoxButton.OK, MessageBoxImage.Error);
         return(null);
     }
 }
Esempio n. 2
0
        /// <summary>
        ///     Constructs a <see cref="LoginViewModel"/>, retrieving all
        ///     default server information from the client config.
        /// </summary>
        /// <param name="configManager">
        ///     The <see cref="IClientConfigManager"/> from which all default
        ///     server information will be read.
        /// </param>
        public LoginViewModel(IClientConfigManager configManager)
        {
            var config = configManager.LoadConfig();

            _username = config.DefaultUsername;
        }