Ejemplo n.º 1
0
        public async void GetPageAmount()
        {
            if (_isInDesignMode)
            {
                for (int i = 1; i <= 3; i++)
                {
                    RelayCommand <int> rc = new RelayCommand <int>((x) => { });
                    NewsPageNavCommandList.Add(new PageNavigationCommand(i.ToString(), rc));
                }
                return;
            }

            int pageAmount = 0;

            pageAmount = await Resources.APIWebTeam.NewsManagment.GetTotalPages();

            for (int i = 1; i <= pageAmount; i++)
            {
                RelayCommand <int> rc = new RelayCommand <int>((x) =>
                {
                    IsLoading = true;
                    RaisePropertyChanged("IsLoading");

                    ArticleList.Clear();
                    RaisePropertyChanged("ArticleList");
                    GetArticlesInPage(x);
                });
                NewsPageNavCommandList.Add(new PageNavigationCommand(i.ToString(), rc));
            }

            RaisePropertyChanged("NewsPageNavCommandList");
        }
Ejemplo n.º 2
0
        public void Login(string Email, string Password)
        {
            Info("Please Wait: Prepare Login");
            ArticleList.Clear();

            Author.Email    = Email;
            Author.Password = Password;

            NavigateTo(Navigation.LoginCheck);
        }
Ejemplo n.º 3
0
 public void Logout()
 {
     Info("Please Wait: Prepare Logout");
     ArticleList.Clear();
     NavigateTo(Navigation.Logout);
 }