コード例 #1
0
        public WifiControllerViewModel(ICommandGenerator commandGenerator, ISettingAccess settingAccess, INavigator navigator, IHTTPClient httpClient,
                                       IPlatformToast platformToast) : base(navigator)
        {
            _commandGenerator = commandGenerator;
            _settingAccess    = settingAccess;
            _httpClient       = httpClient;
            _platformToast    = platformToast;

            InitializeCommands();
        }
コード例 #2
0
 public SettingsViewModel(ISettingAccess settingAccess, ICommandGenerator commandGenerator, INavigator INavigator, IPlatformToast platformToast) : base(INavigator)
 {
     _settingAccess      = settingAccess;
     _commandGenerator   = commandGenerator;
     _platformToast      = platformToast;
     SaveSettingsCommand = _commandGenerator.GenerateCommand(async() =>
     {
         try
         {
             await SaveSettings(Settings);
         }
         catch (ArgumentNullException)
         {
             _platformToast.ShowToast("Could not save settings...try again");
         }
     });
 }