コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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"));
 }
コード例 #3
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);
 }
コード例 #4
0
 public DirectInputAxle(IDirectInputDevice device, int id) : base(id)
 {
     Device      = device;
     DefaultName = string.Format(ToolsStrings.Input_Axle, (id + 1).ToInvariantString());
     SetDisplayParams(null, true);
 }
コード例 #5
0
ファイル: DirectInputDevice.cs プロジェクト: gro-ove/actools
 public bool Same(IDirectInputDevice other) {
     return other != null && (Id == other.Id || DisplayName == other.DisplayName);
 }
コード例 #6
0
ファイル: DirectInputDevice.cs プロジェクト: windygu/actools
 public bool Same(IDirectInputDevice other)
 {
     return(other != null && (Id == other.Id || DisplayName == other.DisplayName));
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 public DirectInputButton(IDirectInputDevice device, int id) : base(id)
 {
     Device      = device;
     ShortName   = (id + 1).ToInvariantString();
     DisplayName = string.Format(ToolsStrings.Input_Button, ShortName);
 }
コード例 #9
0
 public bool Same(IDirectInputDevice other)
 {
     return(other != null && (this.IsSameAs(other) || IsController && other.InstanceId == @"0"));
 }
コード例 #10
0
ファイル: IDirectInputDevice.cs プロジェクト: tankyx/actools
 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));
 }
コード例 #11
0
ファイル: DirectInputPov.cs プロジェクト: windygu/actools
 public DirectInputPov(IDirectInputDevice device, int id, DirectInputPovDirection direction) : base(device, id)
 {
     Direction = direction;
     SetDisplayParams(null, true);
 }