Beispiel #1
0
        private void UpdateTopicsOfDiscussion(Discussion d)
        {
            TopicsOfDiscussion.Clear();

            if (d == null)
            {
                return;
            }

            int selfId             = SessionInfo.Get().person.Id;
            var topicsOfDiscussion = d.Topic;

            foreach (Topic t in topicsOfDiscussion)
            {
                if (t.Person.Any(p0 => p0.Id == selfId))
                {
                    TopicsOfDiscussion.Add(t);
                }
            }

            if (TopicsOfDiscussion.Count > 0)
            {
                lstTopics.SelectedIndex = 0;
            }
        }
Beispiel #2
0
        private void DiscussionSelectionChanged()
        {
            OwnArgPoints.Clear();
            TopicsOfDiscussion.Clear();
            if (!initializing)
            {
                theBadge.RemoveFocusFromInputControls();
                theBadge.DataContext = null;
            }

            var dis = selectedDiscussion();

            if (dis == null)
            {
                return;
            }

            //badges of other users
            ArgPointsOfOtherUser.Clear();

            UpdateTopicsOfDiscussion(dis);

            UpdateOtherUsers(dis.Id, SessionInfo.Get().person.Id);
        }