mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-21 00:01:48 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
815710c081 | ||
|
|
805c516371 |
No files matched your search
@@ -27,7 +27,7 @@
|
||||
<ProductName>ColorControl</ProductName>
|
||||
<PublisherName>Maassoft</PublisherName>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>4.2.0.0</ApplicationVersion>
|
||||
<ApplicationVersion>4.2.3.0</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
|
||||
@@ -378,7 +378,7 @@ namespace ColorControl
|
||||
return;
|
||||
}
|
||||
|
||||
var apps = await SelectedDevice.GetApps();
|
||||
var apps = await SelectedDevice.GetApps(force);
|
||||
|
||||
if (apps.Any())
|
||||
{
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("4.2.0.0")]
|
||||
[assembly: AssemblyVersion("4.2.3.0")]
|
||||
[assembly: AssemblyFileVersion("4.2.3.0")]
|
||||
@@ -681,8 +681,6 @@ namespace ColorControl
|
||||
|
||||
//Debug.WriteLine("KD: " + e.Modifiers + ", " + e.KeyCode);
|
||||
|
||||
var keysWithoutModifiers = new[] { Keys.F12 };
|
||||
|
||||
var shortcutString = (pressedModifiers > 0 ? pressedModifiers.ToString() : "");
|
||||
if (keyEvent.KeyCode == Keys.LWin || WinKeyDown)
|
||||
{
|
||||
@@ -695,7 +693,7 @@ namespace ColorControl
|
||||
}
|
||||
|
||||
var empty = string.IsNullOrEmpty(shortcutString);
|
||||
if ((!empty || keysWithoutModifiers.Contains(keyEvent.KeyCode)) && keyEvent.KeyCode != Keys.ControlKey && keyEvent.KeyCode != Keys.ShiftKey && keyEvent.KeyCode != Keys.Menu && keyEvent.KeyCode != Keys.LWin)
|
||||
if ((!empty || KeysWithoutModifiers.Contains(keyEvent.KeyCode)) && keyEvent.KeyCode != Keys.ControlKey && keyEvent.KeyCode != Keys.ShiftKey && keyEvent.KeyCode != Keys.Menu && keyEvent.KeyCode != Keys.LWin)
|
||||
{
|
||||
if (!empty)
|
||||
{
|
||||
@@ -714,16 +712,21 @@ namespace ColorControl
|
||||
|
||||
public static bool ValidateShortcut(string shortcut)
|
||||
{
|
||||
var valid = string.IsNullOrWhiteSpace(shortcut) || shortcut.Contains("+") || shortcut.Contains("F12");
|
||||
var valid = string.IsNullOrWhiteSpace(shortcut) || shortcut.Contains("+") || ShortcutIsAllowedWithoutModifier(shortcut);
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
MessageForms.WarningOk("Invalid shortcut. The shortcut should have modifiers and a normal key.");
|
||||
MessageForms.WarningOk("Invalid shortcut. The shortcut should have modifiers and a normal key or be F13-F24.");
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
public static bool ShortcutIsAllowedWithoutModifier(string shortcut)
|
||||
{
|
||||
return Enum.TryParse<Keys>(shortcut, out var key) && KeysWithoutModifiers.Contains(key);
|
||||
}
|
||||
|
||||
public static void HandleKeyboardShortcutUp(KeyEventArgs keyEvent)
|
||||
{
|
||||
if (keyEvent.KeyCode == Keys.LWin)
|
||||
|
||||
Reference in new issue
Block a user