コード例 #1
0
        /// <summary>
        /// Update the observable collection of votes.
        /// </summary>
        private void UpdateVotesCollection()
        /// <param name="e">The <see cref="PropertyChangedEventArgs"/> instance containing the event data.</param>
        {
            var votesWithSupporters = VoteCounter.GetVotesCollection(VoteType.Vote);

            List <string> votes = votesWithSupporters.Keys
                                  .Concat(VoteCounter.GetCondensedRankVotes())
                                  .Distinct(Agnostic.StringComparer).ToList();

            AllVotesCollection.Replace(votes);

            OnPropertyChanged(nameof(AllVotesCollection));
        }
コード例 #2
0
ファイル: ViewModel.cs プロジェクト: MizMahem/NetTally
        /// <summary>
        /// Update the observable collection of votes.
        /// </summary>
        private void UpdateVotesCollection()
        {
            AllVotesCollection.Replace(VoteCounter.GetAllVotes());

            OnPropertyChanged(nameof(AllVotesCollection));
        }