private void AddAction_Click(object sender, RoutedEventArgs e) { if (cmbWorkflowActions.SelectedIndex != -1) { WorkflowAction ActStat = cmbWorkflowActions.SelectedItem as WorkflowAction; ConditionAction ca = new ConditionAction(); ca.id = ListConditionAction.Count + 1; ca.CondAct = ActStat; ca.ParentID = LastConditionID; ListConditionAction.Add(ca); string ActionStatement = ActStat.ActionName; WriteCode(ActionStatement, "Action"); } GrdAddAction.Visibility = Visibility.Collapsed; cmbWorkflowActions.SelectedIndex = -1; }
private void AddCondition_Click(object sender, RoutedEventArgs e) { if (cmbCondition.SelectedIndex != -1) { Model.ConditionModel.Condition conditionStatement = cmbCondition.SelectedItem as Model.ConditionModel.Condition; ConditionAction ca = new ConditionAction(); ca.id = ListConditionAction.Count + 1; ca.CondAct = conditionStatement; ca.ParentID = LastConditionID; LastConditionID = ca.id; ListConditionAction.Add(ca); WriteCode(conditionStatement.Description, "Condition"); } GrdAddCondition.Visibility = Visibility.Collapsed; cmbCondition.SelectedIndex = -1; }