Exemple #1
0
        private void LoginProcedure()
        {
            login = LoginDriver.Run(LoginFlow.ForEventGen);
            if (login == null)
            {
                System.Windows.Application.Current.Shutdown();
                return;
            }

            if (login.discussion == null)
            {
                MessageDlg.Show(
                    "In this application even moderator should select real, existing discussion");
                System.Windows.Application.Current.Shutdown();
                return;
            }

            Topics = new ObservableCollection <Topic>(login.discussion.Topic);

            Persons = new ObservableCollection <Person>(DaoHelpers.personsOfDiscussion(login.discussion));

            setPostLoginInfo();

            FillTopics(login.discussion);

            sharedClient.start(login, DbCtx.Get().Connection.DataSource, login.devType);
            sharedClient.clienRt.onStatsEvent += OnStatsEvent;
        }
Exemple #2
0
        private void setPostLoginInfo()
        {
            Title += "  |  " + login.discussion.Subject + "  |  " + login.session.Name;

            Persons = new ObservableCollection <Person>(DaoHelpers.personsOfDiscussion(login.discussion));

            ///lblDiscDuration.Text = "Session duration: " + formatTimeSpan(timeline.MaxDateTime.Subtract(timeline.MinDateTime));
        }
Exemple #3
0
        private void Submit_Click_1(object sender, RoutedEventArgs e)
        {
            foreach (var te in _timelineModel.Events)
            {
                DaoHelpers.recordEvent(te, _baseDateTime);
            }

            try
            {
                DbCtx.Get().SaveChanges();
            }
            catch (Exception e1)
            {
                MessageDlg.Show(e1.ToString(),
                                "Cannot submit events due to error: " + e1,
                                MessageBoxButton.OK,
                                MessageBoxImage.Error);
            }

            Close();
        }