/// <summary> /// Saves the and close. /// </summary> public void SaveAndClose() { var settings = new ApplicationSettings { DownloadFolderPath = DownloadFolderPath, StopTorrentsWhenFinished = StopTorrentsWhenFinished, TurtleModeUploadLimit = UploadLimit.Equals("Unlimited") ? 0 : int.Parse(UploadLimit) * 1000, TurtleModeDownloadLimit = DownloadLimit.Equals("Unlimited") ? 0 : int.Parse(DownloadLimit) * 1000 }; _appSettingsService.ApplyNewValues(settings); _appSettingsService.SaveChanges(); _dialogService.Close(this); }