コード例 #1
0
        public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state)
        {
            string error;

            try
            {
                if (TrophyScrollingCollection == null || !TrophyScrollingCollection.Any())
                {
                    if (!string.IsNullOrEmpty(parameter as string))
                    {
                        Username = parameter as string;
                    }
                    else
                    {
                        Username = Shell.Instance.ViewModel.CurrentUser.Username;
                    }
                    SetTrophyList();
                }
                return;
            }
            catch (Exception ex)
            {
                error = ex.Message;
            }

            await ResultChecker.SendMessageDialogAsync(error, false);
        }
コード例 #2
0
        public async void SetupSampleData()
        {
            var items = await SampleData.GetSampleTrophyFeed();

            foreach (var item in items)
            {
                TrophyScrollingCollection.Add(item);
            }
        }
コード例 #3
0
 public void SetTrophyList(string userName)
 {
     TrophyScrollingCollection = new TrophyScrollingCollection
     {
         CompareUsername = Locator.ViewModels.MainPageVm.CurrentUser.Username,
         Username        = userName,
         Offset          = 0
     };
 }
コード例 #4
0
 public void SetTrophyList()
 {
     TrophyScrollingCollection = new TrophyScrollingCollection
     {
         CompareUsername = Shell.Instance.ViewModel.CurrentUser.Username,
         Username = Username,
         Offset = 0
     };
 }
コード例 #5
0
 public void SetTrophyList(string userName)
 {
     TrophyScrollingCollection = new TrophyScrollingCollection
     {
         UserAccountEntity = App.UserAccountEntity,
         Username          = userName,
         Offset            = 0
     };
 }
コード例 #6
0
 public void SetTrophyList()
 {
     TrophyScrollingCollection = new TrophyScrollingCollection
     {
         CompareUsername = Shell.Instance.ViewModel.CurrentUser.Username,
         Username        = Username,
         Offset          = 0
     };
 }
コード例 #7
0
 public TrophiesViewModel()
 {
     if (DesignMode.DesignModeEnabled)
     {
         TrophyScrollingCollection = new TrophyScrollingCollection()
         {
             HasMoreItems = false
         };
     }
 }
コード例 #8
0
 public void SetTrophyList(string userName)
 {
     Username = userName;
     TrophyScrollingCollection = new TrophyScrollingCollection
     {
         CompareUsername = Locator.ViewModels.MainPageVm.CurrentUser.Username,
         Username = userName,
         Offset = 0
     };
 }
コード例 #9
0
        public TrophiesViewModel()
        {
            if (DesignMode.DesignModeEnabled)
            {
                TrophyScrollingCollection = new TrophyScrollingCollection()
                {
                    HasMoreItems = false
                };

            }
        }