コード例 #1
0
        private RebindDialog() : base(false, true)
        {
            stopwatch = new Stopwatch();
            menu      = new RebindHud(HudMain.HighDpiRoot)
            {
                Visible = false
            };

            blacklist = new List <int>
            {
                BindManager.GetControl("escape").Index,
            };

            SharedBinds.Escape.NewPressed += Exit;
        }
コード例 #2
0
                /// <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);
                }
コード例 #3
0
 public ControlData(RichHudControls key)
 {
     index = BindManager.GetControl(key).Index;
 }
コード例 #4
0
 public ControlData(MyKeys key)
 {
     index = BindManager.GetControl(key).Index;
 }
コード例 #5
0
 /// <summary>
 /// Retrieves the control with the given name
 /// </summary>
 public IControl GetControl(string name) =>
 BindManager.GetControl(name);