Beispiel #1
0
        public MainPageViewModel(AuthorizeHealthCommand authorizer, ExportSpreadsheetCommand exporter, ISettingsStore settings, INavigationService nav, IAnalytics analytics) : base(analytics)
        {
            _settings = settings;

            Exporter = exporter;
            AuthorizeHealthCommand = authorizer.GetCommand(() =>
            {
                OnPropertyChanged(nameof(NeedsHealthAuthorization));
                Exporter.Command.ChangeCanExecute();
            });

            GoToSettings = new Command(async() => await nav.Modal <SettingsViewModel>());
        }
Beispiel #2
0
        public SettingsViewModel(AuthorizeHealthCommand commander, ISettingsStore settings, INavigationService nav, IAnalytics analytics) : base(analytics)
        {
            _settings  = settings;
            _analytics = analytics;

            AuthorizeHealthCommand = commander.GetCommand(() =>
                                                          OnPropertyChanged(nameof(HealthAuthorizationStatusText)));

            Dismiss            = new Command(() => nav.DismissModal());
            GoToExportSettings = new Command(() => nav.Modal <ExportSettingsViewModel>());
            GoToOnboarding     = new Command(() => nav.PresentAsMainPage <OnboardingPageViewModel>());
            GoToSEP            = new Command(async() => await Browser.OpenAsync("https://www.sep.com", BrowserLaunchMode.SystemPreferred));
            GoToJmDesignz      = new Command(async() => await Browser.OpenAsync("https://twitter.com/jm_designz", BrowserLaunchMode.SystemPreferred));
        }
 public OnboardingAuthViewModel(INavigationService nav, AuthorizeHealthCommand authorizer, IAnalytics analytics) : base(nav, analytics)
 {
     AuthorizeHealthCommand = authorizer.GetCommand();
 }