public bool HasBindingTo(InputID input) { foreach (InputBindingElement binding in this) { if (binding.Input == input) { return true; } } return false; }
public Input GetInput(string deviceName, string inputName) { InputID key = new InputID(_name, deviceName, inputName); try { return _inputDictionary[key]; } catch { throw new ArgumentException("Input " + _name + deviceName + inputName + " not found."); } }
public Input(InputID id, InputDimensionality dimensionality, InputScale scale, InputSemantic semantic) { _id = id; _dimensionality = dimensionality; _scale = scale; _semantic = semantic; }
protected override void OnLoad(EventArgs e) { Rectangle screenRect = Screen.GetWorkingArea(this); Left = screenRect.Left + (screenRect.Width - Width) / 2; Top = screenRect.Top + (screenRect.Height - Height) / 2; DialogResult = DialogResult.None; _aggregator = new InputAggregator(); _aggregator.AddDriver(new RawInputDriver(this)); _aggregator.ReportNextInput(_predicate, (i) => { _inputID = i.ID; DialogResult = DialogResult.OK; Close(); }); base.OnLoad(e); }