Exemplo n.º 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;
        }
Exemplo n.º 2
0
        public DetailsViewModel(IMvxNavigationService navigationService,
                                GardianAppContext appContext,
                                NavCommand navCommand,
                                ShareCommand shareCommand)
        {
            _navigationService = navigationService;

            this.appContext = appContext;

            //Commands
            NavMenuTriggerCommand = new MvxCommand(NavPanelTrigger);
            NavCommand            = navCommand;
            ShareCommand          = shareCommand;
            //Ring
            ProgressRingIsActive   = true;
            ProgressRingVisibility = true;
            PageTitle = "Details";
        }
Exemplo n.º 3
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();
        }
Exemplo n.º 4
0
 public NavCommand(IMvxNavigationService navigationService, GardianAppContext appContext)
 {
     _navigationService = navigationService;
     _appContext        = appContext;
 }