예제 #1
0
        public SectionViewModel(IMvxNavigationService navigationService,
                                GardianAppContext appContext,
                                NavCommand navCommand,
                                ShareCommand shareCommand)
        {
            this.appContext = appContext;
            //Command
            GoToNewsDetailsCommand = new GoToNewsDetailsCommand(navigationService);
            NavMenuTriggerCommand  = new MvxCommand(NavPanelTrigger);
            NavCommand             = navCommand;
            ShareCommand           = shareCommand;

            PageTitle              = appContext.Settings.PageSettings;
            ProgressRingIsActive   = true;
            ProgressRingVisibility = true;
        }
예제 #2
0
        public HomeViewModel(IMvxNavigationService navigationService,
                             GardianAppContext appContext,
                             NavCommand navCommand,
                             ShareCommand shareCommand)
        {
            this.appContext     = appContext;
            appContext.Settings = new AppSettings("All News", string.Empty);
            appContext.SaveSettings(appContext.Settings);

            //Command
            GoToNewsDetailsCommand = new GoToNewsDetailsCommand(navigationService);
            NavMenuTriggerCommand  = new MvxCommand(NavPanelTrigger);
            NavCommand             = navCommand;
            ShareCommand           = shareCommand;

            PageTitle      = "All News";
            IsPaneOpen     = true;
            NewsCollection = new ObservableCollection <StoryHeader>();

            ProgressRingIsActive   = true;
            ProgressRingVisibility = true;
            Initialize();
        }