From 99bede4448510af6d3934972b9490398d8434d8f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 19 Jun 2018 01:09:52 -0500 Subject: [PATCH] Make comboboxes not accept keyboard input for profile switching Related to issue #281 --- DS4Windows/DS4Forms/DS4Form.cs | 10 +++++ DS4Windows/DS4Forms/DS4Form.resx | 70 ++++++++++++++++---------------- 2 files changed, 45 insertions(+), 35 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index b578212..3d5d824 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -402,6 +402,11 @@ namespace DS4Windows populateHoverTextDict(); + cBController1.KeyPress += CBController_KeyPress; + cBController2.KeyPress += CBController_KeyPress; + cBController3.KeyPress += CBController_KeyPress; + cBController4.KeyPress += CBController_KeyPress; + foreach (Control control in fLPSettings.Controls) { if (control.HasChildren) @@ -2534,6 +2539,11 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question Save(); } + private void CBController_KeyPress(object sender, KeyPressEventArgs e) + { + e.Handled = true; + } + private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e) { FlashWhenLate = cBFlashWhenLate.Checked; diff --git a/DS4Windows/DS4Forms/DS4Form.resx b/DS4Windows/DS4Forms/DS4Form.resx index b462c53..a428568 100644 --- a/DS4Windows/DS4Forms/DS4Form.resx +++ b/DS4Windows/DS4Forms/DS4Form.resx @@ -445,10 +445,10 @@ NoControl - 780, 89 + 775, 89 - 113, 22 + 118, 22 50 @@ -472,7 +472,7 @@ NoControl - 371, 34 + 368, 34 39, 20 @@ -574,7 +574,7 @@ NoControl - 740, 89 + 735, 89 34, 22 @@ -604,7 +604,7 @@ NoControl - 740, 117 + 735, 117 34, 22 @@ -703,7 +703,7 @@ None - 623, 33 + 618, 33 111, 21 @@ -730,7 +730,7 @@ NoControl - 740, 61 + 735, 61 34, 22 @@ -757,7 +757,7 @@ None - 623, 61 + 618, 61 111, 21 @@ -781,7 +781,7 @@ None - 623, 89 + 618, 89 111, 21 @@ -808,7 +808,7 @@ NoControl - 740, 33 + 735, 33 34, 22 @@ -835,7 +835,7 @@ None - 623, 117 + 618, 117 111, 21 @@ -868,7 +868,7 @@ NoControl - 624, 7 + 619, 7 109, 15 @@ -940,7 +940,7 @@ NoControl - 367, 7 + 364, 7 47, 15 @@ -976,7 +976,7 @@ NoControl - 467, 7 + 462, 7 51, 15 @@ -1012,7 +1012,7 @@ NoControl - 473, 36 + 468, 36 39, 15 @@ -1048,7 +1048,7 @@ NoControl - 473, 64 + 468, 64 39, 15 @@ -1084,7 +1084,7 @@ NoControl - 473, 92 + 468, 92 39, 15 @@ -1120,7 +1120,7 @@ NoControl - 473, 120 + 468, 120 39, 15 @@ -1150,7 +1150,7 @@ NoControl - 371, 62 + 368, 62 39, 20 @@ -1180,7 +1180,7 @@ NoControl - 371, 90 + 368, 90 39, 20 @@ -1210,7 +1210,7 @@ NoControl - 371, 118 + 368, 118 39, 20 @@ -1243,10 +1243,10 @@ NoControl - 780, 33 + 775, 33 - 113, 22 + 118, 22 50 @@ -1273,10 +1273,10 @@ NoControl - 780, 61 + 775, 61 - 113, 22 + 118, 22 51 @@ -1303,10 +1303,10 @@ NoControl - 780, 117 + 775, 117 - 113, 22 + 118, 22 52 @@ -1336,7 +1336,7 @@ NoControl - 546, 0 + 541, 0 67, 30 @@ -1375,7 +1375,7 @@ NoControl - 572, 37 + 567, 37 15, 14 @@ -1408,7 +1408,7 @@ NoControl - 572, 65 + 567, 65 15, 14 @@ -1441,7 +1441,7 @@ NoControl - 572, 93 + 567, 93 15, 14 @@ -1474,7 +1474,7 @@ NoControl - 572, 121 + 567, 121 15, 14 @@ -1522,7 +1522,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /></Controls><Columns Styles="Percent,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,117" /><Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="bnLight3" Row="3" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="pBStatus1" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbPad1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPad2" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="bnEditC3" Row="3" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="bnEditC4" Row="4" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="lbPad3" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbPad4" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cBController1" Row="1" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC2" Row="2" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController2" Row="2" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="cBController3" Row="3" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="bnEditC1" Row="1" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="cBController4" Row="4" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbSelectedProfile" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="lbID" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lbStatus" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="lbBattery" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt1" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt2" Row="2" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt3" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="lbBatt4" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="pBStatus2" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pBStatus3" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pBStatus4" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="bnLight1" Row="1" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight2" Row="2" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="bnLight4" Row="4" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="lbLinkProfile" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB1" Row="1" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB2" Row="2" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB3" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="linkCB4" Row="4" RowSpan="1" Column="3" ColumnSpan="1" /></Controls><Columns Styles="Percent,62.29144,Percent,20.02225,Percent,17.68632,Absolute,80,AutoSize,0,AutoSize,0,Absolute,122" /><Rows Styles="AutoSize,0,Percent,25,Percent,25,Percent,25,Percent,25" /></TableLayoutSettings> Fill @@ -2833,7 +2833,7 @@ languagePackComboBox1 - DS4Windows.DS4Forms.LanguagePackComboBox, DS4Windows, Version=1.4.119.0, Culture=neutral, PublicKeyToken=null + DS4Windows.DS4Forms.LanguagePackComboBox, DS4Windows, Version=1.4.120.0, Culture=neutral, PublicKeyToken=null fLPSettings @@ -3673,7 +3673,7 @@ advColorDialog - DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.119.0, Culture=neutral, PublicKeyToken=null + DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.120.0, Culture=neutral, PublicKeyToken=null DS4Form