Пример #1
0
        private void CbbType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Interpic.Models.Behaviours.Action webAction = availableActions.Find(webaction => webaction.Id == cbbType.SelectedValue.ToString());
            webAction.Parameters = webAction.GetDefaultParameters();
            parameters           = webAction.Parameters;

            btnSetParameters.IsEnabled = parameters != null;
            if (webAction.Type == Interpic.Models.Behaviours.Action.ActionType.Action)
            {
                cbbBehaviourWhenFalse.IsEnabled = false;
                cbbBehaviourWhenTrue.IsEnabled  = false;
            }
            else
            {
                cbbBehaviourWhenFalse.IsEnabled = true;
                cbbBehaviourWhenTrue.IsEnabled  = true;
            }
        }
Пример #2
0
        private void BtnSave_Click(object sender, RoutedEventArgs e)
        {
            if (parameters.Validate())
            {
                WebAction            = availableActions.Find(webaction => webaction.Id == cbbType.SelectedValue.ToString());
                WebAction.Parameters = parameters;

                if (WebAction.Type == Interpic.Models.Behaviours.Action.ActionType.Check)
                {
                    CheckAction checkWebAction = WebAction as CheckAction;
                    checkWebAction.BehaviourWhenFalse = (Behaviour)cbbBehaviourWhenFalse.SelectedItem;
                    checkWebAction.BehaviourWhenTrue  = (Behaviour)cbbBehaviourWhenTrue.SelectedItem;
                    WebAction = checkWebAction;
                }
                Close();
            }
            else
            {
                WarningAlert.Show("Not all parameters have been set!");
            }
        }
Пример #3
0
 private void BtnCancel_Click(object sender, RoutedEventArgs e)
 {
     WebAction = null;
     Close();
 }