public async Task SelectForum(ForumDetailViewModel forum)
 {
     if (forum == null)
     {
         return;
     }
     SelectedForum = forum;
     await _pageService.PushAsync(new ForumDetailPage(SelectedForum));
 }
Exemple #2
0
        public void SetLatestForumFields(Forum latestForum)
        {
            if (latestForum == null)
            {
                ForumVisibility = false;
                NoForumWarning  = true;
                Debug.WriteLine("[SelectForum]: noForumWarning is set to: " + _noForumWarning);
            }
            else
            {
                ForumVisibility = true;
                NoForumWarning  = false;

                ForumTitle     = latestForum.Title;
                ForumPlace     = latestForum.Place;
                ForumSchedules = latestForum.Schedules;
                ForumDate      = latestForum.Date;
                ForumHour      = latestForum.Hour;

                Debug.WriteLine("[SelectForum]: gets a non null forum");
                Debug.WriteLine("[SelectForum]: title: " + ForumTitle);
                Debug.WriteLine("[SelectForum]: place: " + ForumPlace);
                Debug.WriteLine("[SelectForum]: schedules: " + ForumSchedules);

                SelectedForum = new ForumDetailViewModel(_pageService)
                {
                    Title     = latestForum.Title,
                    Place     = latestForum.Place,
                    Schedules = latestForum.Schedules,
                    Date      = latestForum.Date,
                    Hour      = latestForum.Hour,
                    RemoteId  = latestForum.RemoteId
                };

                IsLoaded = true;

                Debug.WriteLine("[SelectNextForum]: title " + SelectedForum.Title);
                Debug.WriteLine("[SelectNextForum]: place " + SelectedForum.Place);
                Debug.WriteLine("[SelectNextForum]: schedules " + SelectedForum.Schedules);
            }
        }