/// <summary> /// Adds a bind with the given name and the given key combo. /// </summary> public void Add(string bindName, string con1, string con2 = null, string con3 = null) { var names = new List <string>(); names.Add(con1); if (con2 != null) { names.Add(con2); } if (con3 != null) { names.Add(con3); } bindData.Add(new MyTuple <string, IReadOnlyList <int> >(bindName, BindManager.GetComboIndices(names))); }
/// <summary> /// Returns or modifies the group member associated with the given enum. /// </summary> private object GetOrSetMember(object data, int memberEnum) { switch ((BindClientAccessors)memberEnum) { case BindClientAccessors.GetOrCreateGroup: return(GetOrCreateGroup(data as string)?.Index ?? -1); case BindClientAccessors.GetBindGroup: return(GetBindGroup(data as string)?.Index ?? -1); case BindClientAccessors.GetComboIndices: return(BindManager.GetComboIndices(data as IReadOnlyList <string>)); case BindClientAccessors.GetControlByName: return(BindManager.GetControl(data as string)?.Index ?? -1); case BindClientAccessors.ClearBindGroups: ClearBindGroups(); break; case BindClientAccessors.Unload: Unload(); break; case BindClientAccessors.RequestBlacklistMode: { if (data != null) { RequestBlacklistMode = (SeBlacklistModes)data; break; } else { return(RequestBlacklistMode); } } } return(null); }
/// <summary> /// Returns true if the given list of controls conflicts with any existing binds. /// </summary> public bool DoesComboConflict(IReadOnlyList <IControl> newCombo, IBind exception = null) => DoesComboConflict(BindManager.GetComboIndices(newCombo), (exception != null) ? exception.Index : -1);