Exemple #1
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     if (ConditionCals.Count == 0)
     {
         ConditionCals.Add(new ConditionCal());
     }
 }
Exemple #2
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];
        }
Exemple #3
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;
        }