private void GetAccountSettings()
 {
     _getAccountSettingsCommand.SetCanExecute(false);
     try
     {
         var scsOauth    = new SwisscomOauth(APP_KEY, APP_SECRET);
         var credentials = scsOauth.GetCredentials();
         UserName          = credentials.Username;
         ClearTextPassword = credentials.Password;
         Password          = SecureStringUtility.ToSecureString(credentials.Password);
         CalenderUrl       = credentials.Url;
     }
     catch (Exception x)
     {
         s_logger.Error("Exception while getting account settings.", x);
         string message = null;
         for (Exception ex = x; ex != null; ex = ex.InnerException)
         {
             message += ex.Message + Environment.NewLine;
         }
         MessageBox.Show(message, "Account settings");
     }
     finally
     {
         _getAccountSettingsCommand.SetCanExecute(true);
     }
 }
 public void AutoFillServerSettings(OptionsModel optionsModel)
 {
   var scsOauth = new SwisscomOauth(APP_KEY, APP_SECRET);
   var credentials = scsOauth.GetCredentials();
   optionsModel.UserName = credentials.Username;
   optionsModel.Password = SecureStringUtility.ToSecureString(credentials.Password);
   optionsModel.CalenderUrl = credentials.Url;
 }