mirror of
https://github.com/Orbmu2k/nvidiaProfileInspector.git
synced 2025-12-23 23:18:07 -05:00
Form: redirect keypresses from listview to filter textbox
This commit is contained in:
3
nspector/frmDrvSettings.Designer.cs
generated
3
nspector/frmDrvSettings.Designer.cs
generated
@@ -565,7 +565,8 @@
|
||||
this.pnlListview.TabIndex = 82;
|
||||
//
|
||||
// txtFilter
|
||||
//
|
||||
//
|
||||
this.txtFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtFilter.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.txtFilter.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtFilter.Location = new System.Drawing.Point(0, 0);
|
||||
|
||||
@@ -1297,25 +1297,39 @@ namespace nspector
|
||||
CopyModifiedSettingsToClipBoard();
|
||||
}
|
||||
|
||||
if (e.Control && e.Alt && e.KeyCode == Keys.D)
|
||||
else if (e.Control && e.Alt && e.KeyCode == Keys.D)
|
||||
{
|
||||
EnableDevmode();
|
||||
}
|
||||
|
||||
if (Debugger.IsAttached && e.Control && e.KeyCode == Keys.T)
|
||||
else if (Debugger.IsAttached && e.Control && e.KeyCode == Keys.T)
|
||||
{
|
||||
TestStoreSettings();
|
||||
}
|
||||
|
||||
if (e.Control && e.KeyCode == Keys.F)
|
||||
else if (e.Control && e.KeyCode == Keys.F)
|
||||
{
|
||||
txtFilter.Focus();
|
||||
}
|
||||
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
else if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
|
||||
else if (!e.Control && (e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z ||
|
||||
e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9 ||
|
||||
e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9 ||
|
||||
e.KeyCode == Keys.Space || e.KeyCode == Keys.OemPeriod))
|
||||
{
|
||||
txtFilter.Visible = true;
|
||||
txtFilter.Focus();
|
||||
txtFilter.Text += e.Shift ? e.KeyCode.ToString() : e.KeyCode.ToString().ToLower();
|
||||
txtFilter.SelectionStart = txtFilter.Text.Length;
|
||||
e.SuppressKeyPress = true;
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void txtFilter_TextChanged(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user