public HeliosBinding(IBindingTrigger trigger, IBindingAction action) { Trigger = trigger; Action = action; }
private void AddAction(IBindingAction action, string device) { action.Device = device; Actions.Add(action); }
public HeliosBinding(IBindingTrigger trigger, IBindingAction action) { Trigger = trigger; Action = action; }
private new void AddAction(IBindingAction action, string device) { action.Device = device; Actions.Add(action); }
public void AddAction(IBindingAction action, ProfileExplorerTreeItemType includeTypes) { ProfileExplorerTreeItem actionItem = new ProfileExplorerTreeItem(action, this, includeTypes); if (actionItem.HasChildren || includeTypes.HasFlag(ProfileExplorerTreeItemType.Action)) { if (action.Device.Length > 0) { if (!HasFolder(action.Device)) { Children.Add(new ProfileExplorerTreeItem(action.Device, "", this, includeTypes)); } ProfileExplorerTreeItem deviceItem = GetFolder(action.Device); actionItem.Parent = deviceItem; deviceItem.Children.Add(actionItem); } else { Children.Add(actionItem); } } }
private ProfileExplorerTreeItem(IBindingAction item, ProfileExplorerTreeItem parent, ProfileExplorerTreeItemType includeTypes) : this(item.ActionName, item.ActionDescription, parent, includeTypes) { _item = item; _itemType = ProfileExplorerTreeItemType.Action; //SortName = item.Name + " " + item.ActionVerb; if (includeTypes.HasFlag(ProfileExplorerTreeItemType.Binding)) { foreach (HeliosBinding binding in item.Owner.InputBindings) { if (binding.Action == item) { Children.Add(new ProfileExplorerTreeItem(binding, this, includeTypes)); } } item.Target.InputBindings.CollectionChanged += Bindings_CollectionChanged; } }
protected void AddAction(IBindingAction action, string device) { action.Device = device; Actions.Add(action); }
private void AddNewBinding(IBindingTrigger trigger, IBindingAction action) { HeliosBinding binding = new HeliosBinding(trigger, action); if (action.ActionRequiresValue && (ConfigManager.ModuleManager.CanConvertUnit(trigger.Unit, action.Unit))) { binding.ValueSource = BindingValueSources.TriggerValue; } else { binding.ValueSource = BindingValueSources.StaticValue; } BindingAddUndoEvent undoEvent = new BindingAddUndoEvent(binding); undoEvent.Do(); ConfigManager.UndoManager.AddUndoItem(undoEvent); }
private HeliosBinding CreateNewBinding(IBindingTrigger trigger, IBindingAction action) { return(CreateNewBinding(trigger, action, new BindingValue(null))); }