Beispiel #1
0
 private void ForgetDBDiscussionState()
 {
     //forget cached state
     PublicBoardCtx.DropContext();
     _discussion = SessionInfo.Get().discussion;
     DataContext = this;
 }
        private void btnRefresh_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            PublicBoardCtx.DropContext();

            _sessions = new ObservableCollection <Session>(PublicBoardCtx.Get().Session);

            //trigger update of seat/users
            var prevSelSession = lstSessions.SelectedItem;

            lstSessions.SelectedItem = null;
            lstSessions.SelectedItem = prevSelSession;
        }
Beispiel #3
0
        private void LogoutProcedures()
        {
            if (sharedClient.clienRt != null)
            {
                sharedClient.clienRt.SendLiveRequest();
            }

            SetListeners(sharedClient, false);

            _discWindows.CloseAndDispose();

            SessionInfo.Reset();
            PublicBoardCtx.DropContext();
            PrivateCenterCtx.DropContext();
        }
Beispiel #4
0
        private void btnRemovePoint_Click(object sender, RoutedEventArgs e)
        {
            if (DateTime.Now.Subtract(_recentRemovalStamp).TotalSeconds < 2.0)
            {
                return;
            }
            _recentRemovalStamp = DateTime.Now;

            ArgPoint ap;
            Topic    t;

            getPointAndTopic(out ap, out t);
            if (ap == null)
            {
                return;
            }
            if (ap.Person.Id != SessionInfo.Get().person.Id)
            {
                return;
            }

            BusyWndSingleton.Show("Removing argument...");
            try
            {
                if (ap.Topic != null)
                {
                    Topic t1 = ap.Topic;

                    recentlyDeleted        = new PointRemoveRecord();
                    recentlyDeleted.person = ap.Person;
                    recentlyDeleted.point  = ap;
                    recentlyDeleted.topic  = ap.Topic;

                    PublicBoardCtx.DropContext();
                    DaoUtils.UnattachPoint(ap);

                    RenumberPointsAfterDeletion(t1, SessionInfo.Get().person.Id);

                    UpdatePointsOfTopic(t1);

                    saveProcedure(ap, t1.Id);
                }
            }
            finally
            {
                BusyWndSingleton.Hide();
            }
        }
Beispiel #5
0
 void ctxDropper_Tick(object sender, EventArgs e)
 {
     PublicBoardCtx.DropContext();
 }