private void UpdateWheelHShifterDevice() { WheelHShifterDevice = WheelHShifterButtonEntries.Select(x => x.Input?.Device).FirstOrDefault(x => x != null); foreach (var entry in WheelHShifterButtonEntries.Where(x => x.Input != null && x.Input.Device != WheelHShifterDevice)) { entry.Clear(); } }
public bool Same(IDirectInputDevice other) { if (OptionStrictIndices) { return(other != null && (Id == other.Id || DisplayName == other.DisplayName || IsController && other.Id == @"0") && Index == other.Index); } return(other != null && (Id == other.Id || DisplayName == other.DisplayName || IsController && other.Id == @"0")); }
public DirectInputButton([NotNull] IDirectInputDevice device, int id) : base(id) { Device = device ?? throw new ArgumentNullException(nameof(device)); DefaultName = string.Format(ToolsStrings.Input_Button, (id + 1).ToInvariantString()); SetDisplayParams(null, true); }
public DirectInputAxle(IDirectInputDevice device, int id) : base(id) { Device = device; DefaultName = string.Format(ToolsStrings.Input_Axle, (id + 1).ToInvariantString()); SetDisplayParams(null, true); }
public bool Same(IDirectInputDevice other) { return other != null && (Id == other.Id || DisplayName == other.DisplayName); }
public bool Same(IDirectInputDevice other) { return(other != null && (Id == other.Id || DisplayName == other.DisplayName)); }
public bool Same(IDirectInputDevice other) { return(other != null && (Id == other.Id || DisplayName == other.DisplayName || IsController && other.Id == @"0")); // return other != null && (Id == other.Id || DisplayName == other.DisplayName || IsController && other.Id == @"0") && Index == other.Index; }
public DirectInputButton(IDirectInputDevice device, int id) : base(id) { Device = device; ShortName = (id + 1).ToInvariantString(); DisplayName = string.Format(ToolsStrings.Input_Button, ShortName); }
public bool Same(IDirectInputDevice other) { return(other != null && (this.IsSameAs(other) || IsController && other.InstanceId == @"0")); }
public static bool IsSameAs(this IDirectInputDevice a, IDirectInputDevice b) { return(a.InstanceId == b.InstanceId || (a.InstanceId == null || b.InstanceId == null) && (a.ProductId == b.ProductId || a.DisplayName == b.DisplayName)); }
public DirectInputPov(IDirectInputDevice device, int id, DirectInputPovDirection direction) : base(device, id) { Direction = direction; SetDisplayParams(null, true); }