Esempio n. 1
0
        /// <summary>
        /// Removes the currently selected condition on the currently selected tabPage.
        /// </summary>
        public void RemoveCondition()
        {
            if (SelectedTabControlIndex == 0 && SelectedStartCondition != null)
            {
                StartConditions.Remove(SelectedStartCondition);
            }
            else if (SelectedTabControlIndex == 1 && SelectedCancelCondition != null)
            {
                CancelConditions.Remove(SelectedCancelCondition);
            }
            else if (SelectedTabControlIndex == 2 && SelectedSubmitCondition != null)
            {
                SubmitConditions.Remove(SelectedSubmitCondition);
            }

            NotifyOfPropertyChange(() => CanRemoveCondition);
            NotifyOfPropertyChange(() => CanGenerate);
        }
Esempio n. 2
0
        /// <summary>
        /// Adds a new condition to the selected tabPage.
        /// </summary>
        public void AddCondition()
        {
            if (SelectedTabControlIndex == 0)
            {
                StartConditions.Add(new Condition());
            }
            else if (SelectedTabControlIndex == 1)
            {
                CancelConditions.Add(new Condition());
            }
            else
            {
                SubmitConditions.Add(new Condition());
            }

            NotifyOfPropertyChange(() => CanRemoveCondition);
            NotifyOfPropertyChange(() => CanGenerate);
        }