Esempio n. 1
0
        private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
        {
            ConditionCal        item0 = new ConditionCal();
            List <ConditionCal> cons  = new List <ConditionCal>(ConditionCals.ToArray());

            cons.Add(item0);
            ConditionCals = cons;

            //gridTagItems.SelectedItem = ConditionCals[ConditionCals.Count - 1];
        }
Esempio n. 2
0
        private void BtnDel_OnClick(object sender, RoutedEventArgs e)
        {
            List <ConditionCal> cons  = new List <ConditionCal>(ConditionCals.ToArray());
            ConditionCal        item0 = gridTagItems.SelectedItem as ConditionCal;

            if (item0 != null)
            {
                cons.Remove(item0);
            }
            if (cons.Count == 0)
            {
                cons.Add(new ConditionCal());
            }
            ConditionCals = cons;
        }