Exemplo n.º 1
0
 private void ButtonOkClick(object sender, EventArgs e)
 {
     ActionDefinition action = cmbActions.SelectedItem as ActionDefinition;
     if (action != null)
         selected = action;
     DialogResult = DialogResult.OK;
 }
Exemplo n.º 2
0
 private static string GetCustomDescription(ActionDefinition action, KeyValuePair<PublicWithId, Parameter> prm)
 {
     foreach (var input in action.Inputs)
         if (input.Name == prm.Key.Name && input.Id == prm.Key.Id)
             return input.Description;
     return prm.Value.Description;
 }
        public ActionDefinitionProvider(IListOfTypesProvider provider)
        {
            foreach (Type type in provider.Get(typeof(IExecutable)))
            {
                var definition = new ActionDefinition(type.FullName);
                actions.Add(definition.Name, definition);

                object[] consumed = type.GetCustomAttributes(typeof(ConsumedAttribute), true);
                object[] published = type.GetCustomAttributes(typeof(PublishedAttribute), true);
                object[] description = type.GetCustomAttributes(typeof(DescriptionAttribute), true);

                if (description.Length == 1)
                    definition.Description = (description[0] as DescriptionAttribute).Description;

                foreach (PublishedAttribute one in published)
                    definition.Outputs.Add(one.Category);
                foreach (ConsumedAttribute one in consumed)
                    definition.Inputs.Add(one.Category);
            }
        }
Exemplo n.º 4
0
 public void AddStep(ActionDefinition action)
 {
     steps.Add(new Step(action));
 }
Exemplo n.º 5
0
 private void ButtonCancelClick(object sender, EventArgs e)
 {
     selected = null;
     DialogResult = DialogResult.Cancel;
 }