/// <summary>
        /// Constructor - Note: Initiates async loading of data for the view
        /// </summary>
        public EventRankingViewModel()
        {
            // reset this because we overrode it.
            refreshCommand = new DelegateCommand(RefreshList);

            // Load the data
            EventData        = new NotifyTaskCompletion <EventInformation>(LoadEventData(svm.EventKey));
            EventRankingData = new NotifyTaskCompletion <ObservableCollection <EventRankingInformation> >(LoadEventRankingData(svm.EventKey));
        }
        /// <summary>
        /// Constructor - Note: Initiates async loading of data for the view
        /// </summary>
        public DistrictRankingViewModel()
        {
            // reset this because we overrode it.
            refreshCommand = new DelegateCommand(RefreshList);

            // Load our data
            DistrictName        = new NotifyTaskCompletion <string>(LoadDistrictName(svm.DistrictKey));
            DistrictRankingData = new NotifyTaskCompletion <ObservableCollection <DistrictRankingInformation> >(LoadDistrictRankingData(svm.DistrictKey));
        }
Esempio n. 3
0
        /// <summary>
        /// Constructor - Note: Initiates async loading of data for the view
        /// </summary>
        public TeamMatchViewModel()
        {
            // reset this because we overrode it
            refreshCommand  = new DelegateCommand(RefreshList);
            sortListCommand = new DelegateCommand(SortList);

            // Load the data
            EventData     = new NotifyTaskCompletion <EventInformation>(LoadEventData(svm.EventKey));
            TeamMatchData = new NotifyTaskCompletion <ObservableCollection <MatchInformation> >(LoadEventMatchData(svm.TeamNumber, svm.EventKey));
        }
Esempio n. 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 public TeamInfoViewModel()
 {
     IsTeamInDistrict           = false; // will be changed in LoadDistrictKey if the team is in a district
     changeSettingsCommand      = new DelegateCommand(ChangeSettings);
     showDistrictRankingCommand = new DelegateCommand(ShowDistrictRanking);
     showEventAwardsCommand     = new DelegateCommand(ShowEventAwards);
     showEventMatchesCommand    = new DelegateCommand(ShowEventMatches);
     showEventRankingCommand    = new DelegateCommand(ShowEventRanking);
     showEventTeamsCommand      = new DelegateCommand(ShowEventTeams);
     showTeamMatchesCommand     = new DelegateCommand(ShowTeamMatches);
     sortListCommand            = new DelegateCommand(SortList);
     svm           = new SettingsViewModel();
     apiClient     = new ApiClient(svm.LocalStorage);
     TeamData      = new NotifyTaskCompletion <TeamInformation>(LoadTeamData(svm.TeamNumber));
     TeamEventData = new NotifyTaskCompletion <ObservableCollection <EventInformation> >(LoadTeamEventData(svm.TeamNumber));
     DistrictKey   = new NotifyTaskCompletion <string>(LoadDistrictKey(svm.TeamNumber));
 }
 /// <summary>
 /// Code for the Refresh Command
 /// </summary>
 /// <param name="p"></param>
 protected override void RefreshList(object p)
 {
     EventRankingData = new NotifyTaskCompletion <ObservableCollection <EventRankingInformation> >(LoadEventRankingData(svm.EventKey));
 }
Esempio n. 6
0
 /// <summary>
 /// Sort List Command Execute
 /// </summary>
 /// <param name="p"></param>
 private void SortList(object p)
 {
     ChangeSortOrder();
     TeamMatchData = new NotifyTaskCompletion <ObservableCollection <MatchInformation> >(SortMatchListAsync(TeamMatchData.Result));
 }
Esempio n. 7
0
 /// <summary>
 /// Refresh List Command Execute
 /// </summary>
 /// <param name="p"></param>
 protected override void RefreshList(object p)
 {
     TeamMatchData = new NotifyTaskCompletion <ObservableCollection <MatchInformation> >(LoadEventMatchData(svm.TeamNumber, svm.EventKey));
 }