public SettingsViewModel(Settings settings, ILogger logger)
 {
     SaveCorrectCommand = new SettingsSaveCorrectCommand(this, logger);
     SaveCriticalFailCommand = new SettingsSaveCriticalFailCommand(this, logger);
     SaveErrorCommand = new SettingsSaveErrorCommand(this, logger);
     CancelCommand = new SettingsCancelCommand(this, logger);
     NewSettings = (Settings) settings.Clone();
 }
 public virtual void SaveError(Settings settings)
 {
     //simulate failing save to file
     throw new FileNotFoundException("Access denied to file Settings.xml.");
 }
 public virtual void SaveCriticalFail(Settings settings)
 {
     //simulate critical fail
     throw new Exception("Critical error occured.");
 }
 public virtual void SaveCorrect(Settings settings)
 {
     //simulate successful save to file
     Storage.Settings = settings;
 }