Esempio n. 1
0
        private void btnAddPoint_Click(object sender, RoutedEventArgs e)
        {
            Topic t = lstTopics.SelectedItem as Topic;

            if (t == null)
            {
                return;
            }

            BusyWndSingleton.Show("Creating new argument...");
            try
            {
                int orderNumber = OwnArgPoints.Any() ? OwnArgPoints.Last().Ap.OrderNumber + 1 : 1;

                var np = DaoUtils.NewPoint(lstTopics.SelectedItem as Topic, orderNumber);
                if (np != null)
                {
                    theBadge.RemoveFocusFromInputControls();
                    theBadge.DataContext = np;
                    t.ArgPoint.Add(np);
                }
                UpdatePointsOfTopic(lstTopics.SelectedItem as Topic);

                ArgPointExt newArgPointExt = OwnArgPoints.FirstOrDefault(i => i.Ap == np);

                lstPoints.SelectedItem = newArgPointExt;

                saveProcedure(null, -1);
            }
            finally
            {
                BusyWndSingleton.Hide();
            }
        }
Esempio n. 2
0
        private void selectBigBadge(ArgPointExt ap)
        {
            if (ap == null)
            {
                return;
            }

            theBadge.EditingMode = ap.Ap.Person.Id == SessionInfo.Get().person.Id;
            theBadge.RemoveFocusFromInputControls();
            theBadge.DataContext = ap.Ap;
        }