Exemplo n.º 1
0
        public PrivateCenter3(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing)
        {
            InitializeComponent();

            _closing      = closing;
            _sharedClient = sharedClient;

            theBadge.Hide();

            PrivateCenterCtx.DropContext();
            TimingCtx.Drop();

            SetListeners(true);

            Title2 = string.Format("{0} on {1} - private dashboard",
                                   SessionInfo.Get().person.Name,
                                   SessionInfo.Get().discussion.Subject);

            lstTopics.ItemsSource            = TopicsOfDiscussion;
            lstPoints.ItemsSource            = OwnArgPoints;
            lstOtherUsers.ItemsSource        = OtherUsers;
            lstBadgesOfOtherUser.ItemsSource = ArgPointsOfOtherUser;

            lblWelcome.Content = SessionInfo.Get().person.Name;

            _commentDismissalRecognizer         = new CommentDismissalRecognizer(bigBadgeScroller, OnDismiss);
            theBadge.CommentDismissalRecognizer = _commentDismissalRecognizer;

            initializing = true;
            DiscussionSelectionChanged();
            initializing = false;
        }
Exemplo n.º 2
0
        public PrivateCenter3(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing)
        {
            InitializeComponent();

            _closing = closing;
            _sharedClient = sharedClient;

            theBadge.Hide();

            PrivateCenterCtx.DropContext();
            TimingCtx.Drop();

            SetListeners(true);

            Title2 = string.Format("{0} on {1} - private dashboard",
                                  SessionInfo.Get().person.Name,
                                  SessionInfo.Get().discussion.Subject);

            lstTopics.ItemsSource = TopicsOfDiscussion;
            lstPoints.ItemsSource = OwnArgPoints;
            lstOtherUsers.ItemsSource = OtherUsers;
            lstBadgesOfOtherUser.ItemsSource = ArgPointsOfOtherUser;

            lblWelcome.Content = SessionInfo.Get().person.Name;

            _commentDismissalRecognizer = new CommentDismissalRecognizer(bigBadgeScroller, OnDismiss);
            theBadge.CommentDismissalRecognizer = _commentDismissalRecognizer;

            initializing = true;
            DiscussionSelectionChanged();
            initializing = false;
        }
Exemplo n.º 3
0
        void HandleRecontext()
        {
            var ap = DataContext as ArgPoint;

            SetStyle();

            if (DataContext == null)
            {
                Opacity = 0;
            }
            else
            {
                Opacity = 1;
            }

            //Drawing.HandleRecontext();

            if (DataContext == null)
            {
                EditingMode = false;
            }
            else
            {
                if (ap != null)
                {
                    EditingMode = SessionInfo.Get().person.Id == ap.Person.Id;
                }
            }

            UpdateOrderedSources();
            UpdateOrderedMedia();
            BeginSrcNumberInjection();
            BeginAttachmentNumberInjection();

            if (ap != null)
            {
                UpdateLocalReadCounts(PrivateCenterCtx.Get(), ap);
                UpdateRemoteReadCounts(PrivateCenterCtx.Get(), ap);
                new CommentNotificationDeferral(Dispatcher, PrivateCenterCtx.Get(), lstBxComments);
            }

            if (ap != null)
            {
                DaoUtils.RemoveDuplicateComments(ap);
            }

            if (CommentDismissalRecognizer != null)
            {
                CommentDismissalRecognizer.Reset(DataContext as ArgPoint);
                CommentDismissalRecognizer.CheckScrollState();
            }
        }
Exemplo n.º 4
0
        public LargeBadgeView()
        {
            InitializeComponent();

            //  RichTextBoxFormatBarManagerStatic.SetFormatBar(rtb, fmtBar);

            //  Drawing.dataContextHandled += DrawingDataContextHandled;

            _rnd = new Random();

            _mediaDoubleClick = new MultiClickRecognizer(badgeDoubleTap, null);

            _commentDismissalRecognizer = new CommentDismissalRecognizer(scrollViewer, OnDismiss);

            txtNewComment.Text = DaoUtils.NEW_COMMENT;

            lstBxSources.DataContext     = this;
            lstBxAttachments.DataContext = this;

            BeginAttachmentNumberInjection();
        }
Exemplo n.º 5
0
        void OnDismiss(ArgPoint ap)
        {
            //Console.Beep();

            CommentDismissalRecognizer.pushDismissal(ap, PrivateCenterCtx.Get());
        }
Exemplo n.º 6
0
        public LargeBadgeView()
        {
            InitializeComponent();

            //  RichTextBoxFormatBarManagerStatic.SetFormatBar(rtb, fmtBar);

            //  Drawing.dataContextHandled += DrawingDataContextHandled; 

            _rnd = new Random();

            _mediaDoubleClick = new MultiClickRecognizer(badgeDoubleTap, null);

            _commentDismissalRecognizer = new CommentDismissalRecognizer(scrollViewer, OnDismiss);

            txtNewComment.Text = DaoUtils.NEW_COMMENT;      

            lstBxSources.DataContext = this;
            lstBxAttachments.DataContext = this;

            BeginAttachmentNumberInjection();
        }
Exemplo n.º 7
0
 private void SetNumUnreadComments(List <NewCommentsFrom> newCommentBins)
 {
     notifications.ItemsSource = newCommentBins;
     lblComments.Content       = CommentDismissalRecognizer.FormatNumUnreadComments(newCommentBins.Total());
 }