From 53326109e0ca5cfc580b88d0ee772d3b02ee4738 Mon Sep 17 00:00:00 2001 From: Derevar Date: Thu, 27 May 2021 19:29:35 +0200 Subject: [PATCH] moved over from http://mkcursorclip.codeplex.com/ --- mkCursorClip.sln | 20 + mkCursorClip/App.xaml | 8 + mkCursorClip/App.xaml.cs | 16 + mkCursorClip/MainWindow.xaml | 7 + mkCursorClip/MainWindow.xaml.cs | 234 +++ mkCursorClip/Properties/AssemblyInfo.cs | 55 + mkCursorClip/Properties/Resources.Designer.cs | 71 + mkCursorClip/Properties/Resources.resx | 117 ++ mkCursorClip/Properties/Settings.Designer.cs | 98 + mkCursorClip/Properties/Settings.settings | 24 + mkCursorClip/SettingsWindow.xaml | 33 + mkCursorClip/SettingsWindow.xaml.cs | 75 + mkCursorClip/app.config | 30 + .../BalloonIcon.cs | 49 + .../DefaultTrayIcon.ico | Bin 0 -> 1150 bytes .../Interop/BalloonFlags.cs | 55 + .../Interop/IconDataMembers.cs | 67 + .../Interop/IconState.cs | 23 + .../Interop/MouseEvent.cs | 48 + .../Interop/NotifyCommand.cs | 39 + .../Interop/NotifyIconData.cs | 166 ++ .../Interop/NotifyIconVersion.cs | 25 + .../Interop/Point.cs | 14 + .../Interop/TrayInfo.cs | 171 ++ .../Interop/WinApi.cs | 87 + .../Interop/WindowClass.cs | 31 + .../Interop/WindowMessageSink.cs | 369 ++++ .../PopupActivationMode.cs | 69 + .../RoutedEventHelper.cs | 81 + .../TaskbarIcon.Declarations.cs | 1869 +++++++++++++++++ .../TaskbarIcon.cs | 1016 +++++++++ .../Hardcodet.Wpf.TaskbarNotification/Util.cs | 308 +++ mkCursorClip/lib/KeyboardHook.cs | 351 ++++ mkCursorClip/mkCursorClip.csproj | 141 ++ mkCursorClip/mkCursorClip.ico | Bin 0 -> 102134 bytes 35 files changed, 5767 insertions(+) create mode 100644 mkCursorClip.sln create mode 100644 mkCursorClip/App.xaml create mode 100644 mkCursorClip/App.xaml.cs create mode 100644 mkCursorClip/MainWindow.xaml create mode 100644 mkCursorClip/MainWindow.xaml.cs create mode 100644 mkCursorClip/Properties/AssemblyInfo.cs create mode 100644 mkCursorClip/Properties/Resources.Designer.cs create mode 100644 mkCursorClip/Properties/Resources.resx create mode 100644 mkCursorClip/Properties/Settings.Designer.cs create mode 100644 mkCursorClip/Properties/Settings.settings create mode 100644 mkCursorClip/SettingsWindow.xaml create mode 100644 mkCursorClip/SettingsWindow.xaml.cs create mode 100644 mkCursorClip/app.config create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/BalloonIcon.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/DefaultTrayIcon.ico create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/BalloonFlags.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/IconDataMembers.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/IconState.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/MouseEvent.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/NotifyCommand.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/NotifyIconData.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/NotifyIconVersion.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/Point.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/TrayInfo.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/WinApi.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/WindowClass.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Interop/WindowMessageSink.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/PopupActivationMode.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/RoutedEventHelper.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/TaskbarIcon.Declarations.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/TaskbarIcon.cs create mode 100644 mkCursorClip/lib/Hardcodet.Wpf.TaskbarNotification/Util.cs create mode 100644 mkCursorClip/lib/KeyboardHook.cs create mode 100644 mkCursorClip/mkCursorClip.csproj create mode 100644 mkCursorClip/mkCursorClip.ico diff --git a/mkCursorClip.sln b/mkCursorClip.sln new file mode 100644 index 0000000..63f8a08 --- /dev/null +++ b/mkCursorClip.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mkCursorClip", "mkCursorClip\mkCursorClip.csproj", "{5E8680DA-881C-4AC4-8B6A-6982644540FB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5E8680DA-881C-4AC4-8B6A-6982644540FB}.Debug|x86.ActiveCfg = Debug|x86 + {5E8680DA-881C-4AC4-8B6A-6982644540FB}.Debug|x86.Build.0 = Debug|x86 + {5E8680DA-881C-4AC4-8B6A-6982644540FB}.Release|x86.ActiveCfg = Release|x86 + {5E8680DA-881C-4AC4-8B6A-6982644540FB}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/mkCursorClip/App.xaml b/mkCursorClip/App.xaml new file mode 100644 index 0000000..066214f --- /dev/null +++ b/mkCursorClip/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/mkCursorClip/App.xaml.cs b/mkCursorClip/App.xaml.cs new file mode 100644 index 0000000..db34bdb --- /dev/null +++ b/mkCursorClip/App.xaml.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Windows; + +namespace mkCursorClip +{ + /// + /// Interaktionslogik für "App.xaml" + /// + public partial class App : Application + { + } +} diff --git a/mkCursorClip/MainWindow.xaml b/mkCursorClip/MainWindow.xaml new file mode 100644 index 0000000..f63d968 --- /dev/null +++ b/mkCursorClip/MainWindow.xaml @@ -0,0 +1,7 @@ + + diff --git a/mkCursorClip/MainWindow.xaml.cs b/mkCursorClip/MainWindow.xaml.cs new file mode 100644 index 0000000..f546564 --- /dev/null +++ b/mkCursorClip/MainWindow.xaml.cs @@ -0,0 +1,234 @@ +using System; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Interop; +using Hardcodet.Wpf.TaskbarNotification; +using RamGecTools; + +namespace mkCursorClip +{ + public partial class MainWindow : Window + { + mkCursorClip.Properties.Settings config = mkCursorClip.Properties.Settings.Default; + public MainWindow() + { + InitializeComponent(); + this.addNotifycationIcon(); + this.initKeyboardHook(); + } + + #region keyboardHook handling + KeyboardHook keyboardHook = new KeyboardHook(); + bool keyOneDown = false; + bool keyTwoDown = false; + KeyboardHook.VKeys keyOne; + KeyboardHook.VKeys keyTwo; + + private void initKeyboardHook() + { + keyboardHook.KeyDown += new KeyboardHook.KeyboardHookCallback(keyboardHook_KeyDown); + keyboardHook.KeyUp += new KeyboardHook.KeyboardHookCallback(keyboardHook_KeyUp); + keyboardHook.Install(); + + } + + void keyboardHook_KeyUp(KeyboardHook.VKeys key, ref bool handled) + { + if (key == keyOne) + keyOneDown = false; + if (key == keyTwo) + keyTwoDown = false; + } + + void keyboardHook_KeyDown(KeyboardHook.VKeys key, ref bool handled) + { + config.Reload(); + keyOne = (KeyboardHook.VKeys)Enum.Parse(typeof(KeyboardHook.VKeys), config.keyOne); + keyTwo = (KeyboardHook.VKeys)Enum.Parse(typeof(KeyboardHook.VKeys), config.keyTwo); + + if (key == keyOne) + keyOneDown = true; + if (key == keyTwo) + keyTwoDown = true; + + if (keyOneDown && keyTwoDown) + { + this.toggleClip(); + handled = true; + } + } + #endregion + + /// + /// check for keyTwoDown and LControl to be pressed and clips cursor to window + /// + #region WinAPI for window picking + [DllImport("user32.dll")] + static extern IntPtr GetForegroundWindow(); + + [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)] + static extern bool GetWindowRect(IntPtr hWnd, out Rect lpRect); + + [StructLayout(LayoutKind.Sequential)] + private struct Rect + { + public int Left; + public int Top; + public int Right; + public int Bottom; + } + #endregion + bool windowHooked = false; // TODO: replace with x/y check of cursor + Rect rect = new Rect(); + private void toggleClip() + { + config.Reload(); + int leftBorder = config.left; + int rightBorder = config.right + config.left; + int topBorder = config.top; + int bottomBorder = config.top + config.bottom; + + if (windowHooked == true) + { + System.Windows.Forms.Cursor.Clip = System.Drawing.Rectangle.Empty; + windowHooked = false; + } + else + { + GetWindowRect(GetForegroundWindow(), out rect); + System.Windows.Forms.Cursor.Clip = new System.Drawing.Rectangle(rect.Left + leftBorder, + rect.Top + topBorder, + rect.Right - rect.Left - rightBorder, + rect.Bottom - rect.Top - bottomBorder); + windowHooked = true; + } + } + + /// + /// Generates and adds the notification icon to the tray + /// + private void addNotifycationIcon() + { + TaskbarIcon notifyIcon = new TaskbarIcon(); + System.Windows.Controls.ContextMenu notifyMenu = new System.Windows.Controls.ContextMenu(); + System.Windows.Controls.MenuItem settingsItem = new System.Windows.Controls.MenuItem(); + System.Windows.Controls.MenuItem exitItem = new System.Windows.Controls.MenuItem(); + + settingsItem.Header = "Settings"; + settingsItem.Click += new RoutedEventHandler(settingsItem_Click); + notifyMenu.Items.Add(settingsItem); + + exitItem.Header = "Exit"; + exitItem.Click += new RoutedEventHandler(exitItem_Click); + notifyMenu.Items.Add(exitItem); + + notifyIcon.ToolTipText = "mkCursorClip"; + notifyIcon.IconSource = System.Windows.Media.Imaging.BitmapFrame.Create(new System.Uri("pack://application:,,,/mkCursorClip.ico")); + notifyIcon.ContextMenu = notifyMenu; + } + + /// + /// context menu item 'Exit' + /// + void exitItem_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + /// + /// context menu item 'Settings' + /// + SettingsWindow settingsWindow; + bool settingsWindowOpen = false; + void settingsItem_Click(object sender, RoutedEventArgs e) + { + if (settingsWindowOpen) + { + settingsWindow.Focus(); + } + else + { + settingsWindow = new SettingsWindow(); + settingsWindow.Show(); + settingsWindow.Closed += new EventHandler(settingsWindow_Closed); + settingsWindowOpen = true; + } + } + + void settingsWindow_Closed(object sender, EventArgs e) + { + settingsWindow = null; + settingsWindowOpen = false; + } + + #region Window styles (Hide from Alt+Tab) + [Flags] + public enum ExtendedWindowStyles + { + // ... + WS_EX_TOOLWINDOW = 0x00000080, + // ... + } + + public enum GetWindowLongFields + { + // ... + GWL_EXSTYLE = (-20), + // ... + } + + [DllImport("user32.dll")] + public static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex); + + public static IntPtr SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong) + { + int error = 0; + IntPtr result = IntPtr.Zero; + // Win32 SetWindowLong doesn't clear error on success + SetLastError(0); + + if (IntPtr.Size == 4) + { + // use SetWindowLong + Int32 tempResult = IntSetWindowLong(hWnd, nIndex, IntPtrToInt32(dwNewLong)); + error = Marshal.GetLastWin32Error(); + result = new IntPtr(tempResult); + } + else + { + // use SetWindowLongPtr + result = IntSetWindowLongPtr(hWnd, nIndex, dwNewLong); + error = Marshal.GetLastWin32Error(); + } + + if ((result == IntPtr.Zero) && (error != 0)) + { + throw new System.ComponentModel.Win32Exception(error); + } + + return result; + } + + [DllImport("user32.dll", EntryPoint = "SetWindowLongPtr", SetLastError = true)] + private static extern IntPtr IntSetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong); + + [DllImport("user32.dll", EntryPoint = "SetWindowLong", SetLastError = true)] + private static extern Int32 IntSetWindowLong(IntPtr hWnd, int nIndex, Int32 dwNewLong); + + private static int IntPtrToInt32(IntPtr intPtr) + { + return unchecked((int)intPtr.ToInt64()); + } + + [DllImport("kernel32.dll", EntryPoint = "SetLastError")] + public static extern void SetLastError(int dwErrorCode); + #endregion + private void Window_Loaded(object sender, RoutedEventArgs e) + { + WindowInteropHelper wndHelper = new WindowInteropHelper(this); + int exStyle = (int)GetWindowLong(wndHelper.Handle, (int)GetWindowLongFields.GWL_EXSTYLE); + exStyle |= (int)ExtendedWindowStyles.WS_EX_TOOLWINDOW; + SetWindowLong(wndHelper.Handle, (int)GetWindowLongFields.GWL_EXSTYLE, (IntPtr)exStyle); + } + } +} diff --git a/mkCursorClip/Properties/AssemblyInfo.cs b/mkCursorClip/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d433b5c --- /dev/null +++ b/mkCursorClip/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("mkCursorClip")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("mkCursorClip")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie +//ImCodeVerwendeteKultur in der .csproj-Datei +//in einer fest. Wenn Sie in den Quelldateien beispielsweise Deutsch +//(Deutschland) verwenden, legen Sie auf \"de-DE\" fest. Heben Sie dann die Auskommentierung +//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile, +//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher + //(wird verwendet, wenn eine Ressource auf der Seite + // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.) + ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs + //(wird verwendet, wenn eine Ressource auf der Seite, in der Anwendung oder einem + // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.) +)] + + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/mkCursorClip/Properties/Resources.Designer.cs b/mkCursorClip/Properties/Resources.Designer.cs new file mode 100644 index 0000000..611e554 --- /dev/null +++ b/mkCursorClip/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.269 +// +// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn +// der Code neu generiert wird. +// +//------------------------------------------------------------------------------ + +namespace mkCursorClip.Properties +{ + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse + // über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mkCursorClip.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/mkCursorClip/Properties/Resources.resx b/mkCursorClip/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/mkCursorClip/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/mkCursorClip/Properties/Settings.Designer.cs b/mkCursorClip/Properties/Settings.Designer.cs new file mode 100644 index 0000000..04b5051 --- /dev/null +++ b/mkCursorClip/Properties/Settings.Designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.269 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace mkCursorClip.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("26")] + public int top { + get { + return ((int)(this["top"])); + } + set { + this["top"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("4")] + public int bottom { + get { + return ((int)(this["bottom"])); + } + set { + this["bottom"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("4")] + public int left { + get { + return ((int)(this["left"])); + } + set { + this["left"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("4")] + public int right { + get { + return ((int)(this["right"])); + } + set { + this["right"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("LSHIFT")] + public string keyOne { + get { + return ((string)(this["keyOne"])); + } + set { + this["keyOne"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("OEM_102")] + public string keyTwo { + get { + return ((string)(this["keyTwo"])); + } + set { + this["keyTwo"] = value; + } + } + } +} diff --git a/mkCursorClip/Properties/Settings.settings b/mkCursorClip/Properties/Settings.settings new file mode 100644 index 0000000..2369ab0 --- /dev/null +++ b/mkCursorClip/Properties/Settings.settings @@ -0,0 +1,24 @@ + + + + + + 26 + + + 4 + + + 4 + + + 4 + + + LSHIFT + + + OEM_102 + + + \ No newline at end of file diff --git a/mkCursorClip/SettingsWindow.xaml b/mkCursorClip/SettingsWindow.xaml new file mode 100644 index 0000000..319b665 --- /dev/null +++ b/mkCursorClip/SettingsWindow.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + +