/// <summary>
 /// Saves the configuration.
 /// </summary>
 /// <param name="win">The win.</param>
 public void SaveConfiguration(ICloseable win)
 {
     _repository.Save(this.AppSettings);
       ((ICloseable) win)?.Close();
 }