public NotebookDetailsViewModel(IPageService pageService, ViewNotebookStudent Notebook)
        {
            _pageService = pageService;

            Busy         = true;
            IsOneStars   = false;
            IsTwoStars   = false;
            IsThreeStars = false;
            IsFourStars  = false;
            IsFiveStars  = false;

            OneStarCommand   = new Command(OnOneStarTapped);
            TwoStarCommand   = new Command(OnTwoStarTapped);
            ThreeStarCommand = new Command(OnThreeStarTapped);
            FourStarCommand  = new Command(OnFourStarTapped);
            FiveStarCommand  = new Command(OnFiveStarTapped);

            ViewNotebookStudent = Notebook;

            RatesDictionary = new Dictionary <int, int>();

            Task init = InitProperties();

            if (Settings.StudentId == ViewNotebookStudent.StudentId)
            {
                IsDeleteButtonVisible = true;
            }
            else
            {
                IsDeleteButtonVisible = false;
            }
        }
 public void ViewFavoriteNotebookSelected(ViewNotebookStudent viewNotebookStudent)
 {
     _pageService.PushAsync(new Views.NotebooksDB.NotebookDetails(viewNotebookStudent));
 }
示例#3
0
 private async void ViewNotebookSelected(ViewNotebookStudent viewNotebookStudent)
 {
     await _pageService.PushAsync(new Views.NotebooksDB.NotebookDetails(viewNotebookStudent));
 }