示例#1
0
 public SettingsViewModel(INavigationService navigationService, SettingsDatabaseController settingsDatabase) : base(settingsDatabase)
 {
     GetSettings();
     SaveSettingsCommand = new DelegateCommand(async() =>
     {
         if (BasicSettings.WinningScore <= 0)
         {
             BasicSettings.WinningScore = 200;
         }
         await SettingsDatabase.SaveBasicSettingsAsync(BasicSettings);
         await navigationService.GoBackAsync();
     });
     ReturnToGameCommand = new DelegateCommand(async() =>
     {
         await navigationService.GoBackAsync();
     });
 }