From c075b88be0fdfc6114b195369829d710b1f8912e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Aug 2017 13:28:36 +0300 Subject: [PATCH] add sources --- App.config | 6 + App.xaml | 8 ++ App.xaml.cs | 14 ++ Controls/KeyInputBox.cs | 164 +++++++++++++++++++++++ Models/Config.cs | 49 +++++++ Models/GeneralConfig.cs | 125 ++++++++++++++++++ Models/KeyBlockConfig.cs | 68 ++++++++++ Models/ObservableObject.cs | 16 +++ Models/RelayCommand.cs | 150 +++++++++++++++++++++ Models/ShorcutSwitch.cs | 83 ++++++++++++ Properties/AssemblyInfo.cs | 55 ++++++++ Properties/Resources.Designer.cs | 63 +++++++++ Properties/Resources.resx | 117 ++++++++++++++++ Properties/Settings.Designer.cs | 26 ++++ Properties/Settings.settings | 7 + Themes/Generic.xaml | 7 + Utils/DropLast.cs | 35 +++++ Utils/HotKeyManager.cs | 124 +++++++++++++++++ Utils/KeyHook.cs | 96 ++++++++++++++ Utils/MinimizeToTray.cs | 78 +++++++++++ ViewModels/WinHookViewModel.cs | 92 +++++++++++++ Views/WinHookGeneralControl.xaml | 32 +++++ Views/WinHookGeneralControl.xaml.cs | 15 +++ Views/WinHookKeyBlockerControl.xaml | 21 +++ Views/WinHookKeyBlockerControl.xaml.cs | 28 ++++ Views/WinHookWindow.xaml | 28 ++++ Views/WinHookWindow.xaml.cs | 29 ++++ WinHook.csproj | 176 +++++++++++++++++++++++++ WinHook.sln | 20 +++ block.ico | Bin 0 -> 16958 bytes 30 files changed, 1732 insertions(+) create mode 100644 App.config create mode 100644 App.xaml create mode 100644 App.xaml.cs create mode 100644 Controls/KeyInputBox.cs create mode 100644 Models/Config.cs create mode 100644 Models/GeneralConfig.cs create mode 100644 Models/KeyBlockConfig.cs create mode 100644 Models/ObservableObject.cs create mode 100644 Models/RelayCommand.cs create mode 100644 Models/ShorcutSwitch.cs create mode 100644 Properties/AssemblyInfo.cs create mode 100644 Properties/Resources.Designer.cs create mode 100644 Properties/Resources.resx create mode 100644 Properties/Settings.Designer.cs create mode 100644 Properties/Settings.settings create mode 100644 Themes/Generic.xaml create mode 100644 Utils/DropLast.cs create mode 100644 Utils/HotKeyManager.cs create mode 100644 Utils/KeyHook.cs create mode 100644 Utils/MinimizeToTray.cs create mode 100644 ViewModels/WinHookViewModel.cs create mode 100644 Views/WinHookGeneralControl.xaml create mode 100644 Views/WinHookGeneralControl.xaml.cs create mode 100644 Views/WinHookKeyBlockerControl.xaml create mode 100644 Views/WinHookKeyBlockerControl.xaml.cs create mode 100644 Views/WinHookWindow.xaml create mode 100644 Views/WinHookWindow.xaml.cs create mode 100644 WinHook.csproj create mode 100644 WinHook.sln create mode 100644 block.ico diff --git a/App.config b/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..4733fb5 --- /dev/null +++ b/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..16bfc72 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,14 @@ +using System; +using System.Windows; +using System.Windows.Forms; +using Application = System.Windows.Application; + +namespace WinHook +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Controls/KeyInputBox.cs b/Controls/KeyInputBox.cs new file mode 100644 index 0000000..e260188 --- /dev/null +++ b/Controls/KeyInputBox.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Forms; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using WinHook.Models; +using KeyEventArgs = System.Windows.Input.KeyEventArgs; +using KeyEventHandler = System.Windows.Input.KeyEventHandler; +using TextBox = System.Windows.Controls.TextBox; + +namespace WinHook.Controls +{ + /// + /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. + /// + /// Step 1a) Using this custom control in a XAML file that exists in the current project. + /// Add this XmlNamespace attribute to the root element of the markup file where it is + /// to be used: + /// + /// xmlns:MyNamespace="clr-namespace:WinHook.Controls" + /// + /// + /// Step 1b) Using this custom control in a XAML file that exists in a different project. + /// Add this XmlNamespace attribute to the root element of the markup file where it is + /// to be used: + /// + /// xmlns:MyNamespace="clr-namespace:WinHook.Controls;assembly=WinHook.Controls" + /// + /// You will also need to add a project reference from the project where the XAML file lives + /// to this project and Rebuild to avoid compilation errors: + /// + /// Right click on the target project in the Solution Explorer and + /// "Add Reference"->"Projects"->[Browse to and select this project] + /// + /// + /// Step 2) + /// Go ahead and use your control in the XAML file. + /// + /// + /// + /// + public class KeyInputBox : TextBox + { + static KeyInputBox() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(KeyInputBox), new FrameworkPropertyMetadata(typeof(KeyInputBox))); + EventManager.RegisterClassHandler(typeof(KeyInputBox), Keyboard.PreviewKeyDownEvent, new KeyEventHandler(OnPreviewKeyDownEvent)); + } + + public static readonly DependencyProperty ShorcutModeProperty = DependencyProperty.Register( + "ShorcutMode", typeof(bool), typeof(KeyInputBox), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault) + ); + public static readonly DependencyProperty KeysProperty = DependencyProperty.Register( + "Keys", typeof(Keys?), typeof(KeyInputBox), new FrameworkPropertyMetadata(new Keys(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, FillText) + ); + public static readonly DependencyProperty ShorcutProperty = DependencyProperty.Register( + "Shorcut", typeof(ShorcutSwitch), typeof(KeyInputBox), new FrameworkPropertyMetadata(new ShorcutSwitch(), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, FillText) + ); + + private static void FillText(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var invoker = d as KeyInputBox; + + var newValue = e.NewValue == null ? string.Empty : e.NewValue.ToString(); + invoker.Text = newValue; + } + + public bool ShorcutMode + { + get + { + return (bool)GetValue(ShorcutModeProperty); + } + set + { + SetValue(ShorcutModeProperty, value); + } + } + + public Keys Keys + { + get + { + return (Keys)GetValue(KeysProperty); + } + set + { + SetValue(KeysProperty, value); + } + } + + public ShorcutSwitch Shorcut + { + get + { + return (ShorcutSwitch)GetValue(ShorcutProperty); + } + set + { + SetValue(ShorcutProperty, value); + } + } + + + public static readonly RoutedEvent InvertCallEvent = EventManager.RegisterRoutedEvent( + "InvertCall", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(KeyInputBox) + ); + + public event RoutedEventHandler InvertCall + { + add { AddHandler(InvertCallEvent, value); } + remove { RemoveHandler(InvertCallEvent, value); } + } + + private void OnInvertCall() + { + var args = new RoutedEventArgs(InvertCallEvent); + RaiseEvent(args); + } + + static void OnPreviewKeyDownEvent(object sender, KeyEventArgs e) + { + var invoker = sender as KeyInputBox; + + // The text box grabs all input. + e.Handled = true; + + if (invoker.ShorcutMode) + { + // Fetch the actual shortcut key. + var key = (e.Key == Key.System ? e.SystemKey : e.Key); + + // Ignore modifier keys. + if (key == Key.LeftShift || key == Key.RightShift + || key == Key.LeftCtrl || key == Key.RightCtrl + || key == Key.LeftAlt || key == Key.RightAlt + || key == Key.LWin || key == Key.RWin) + { + // do nothing + } + else + { + invoker.Shorcut = new ShorcutSwitch((Keys)KeyInterop.VirtualKeyFromKey(key), Keyboard.Modifiers); + } + } + else + { + invoker.Keys = (Keys) KeyInterop.VirtualKeyFromKey(e.Key); + } + + invoker.OnInvertCall(); + } + } +} diff --git a/Models/Config.cs b/Models/Config.cs new file mode 100644 index 0000000..680e1a1 --- /dev/null +++ b/Models/Config.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.ObjectModel; +using System.Windows.Input; + +namespace WinHook.Models +{ + [Serializable] + public class Config: ObservableObject + { + private GeneralConfig _generalConfig = new GeneralConfig(); + private KeyBlockConfig _keyBlockConfig = new KeyBlockConfig(); + + //public Config() + //{ + // HotKeyManager.HotKeyPressed += HotKeyManager_HotKeyPressed; + //} + + public GeneralConfig GeneralConfig + { + get { return _generalConfig; } + set + { + if (_generalConfig == value) return; + _generalConfig = value; + RaisePropertyChanged(); + } + } + + public KeyBlockConfig KeyBlockConfig + { + get { return _keyBlockConfig; } + set + { + if (_keyBlockConfig == value) return; + _keyBlockConfig = value; + RaisePropertyChanged(); + } + } + + //private void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e) + //{ + // if (e.Key == EnableShortcut.Keys && e.Modifiers == EnableShortcut.ModifierKeys) + // { + // IsEnabled = !IsEnabled; + // } + //} + + } +} diff --git a/Models/GeneralConfig.cs b/Models/GeneralConfig.cs new file mode 100644 index 0000000..f96a996 --- /dev/null +++ b/Models/GeneralConfig.cs @@ -0,0 +1,125 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Windows; +using System.Windows.Input; +using WinHook.Utils; + +namespace WinHook.Models +{ + public class GeneralConfig: ObservableObject + { + private ShorcutSwitch _enableShortcut; + private int? shortcutId; + private bool _isEnabled; + private bool _minimizeToTray; + private bool _startMinimized; + private bool _startWithWindows; + + public ShorcutSwitch EnableShortcut + { + get + { + return _enableShortcut; + } + set + { + if (_enableShortcut == value) return; + _enableShortcut = value; + if (shortcutId != null) + { + HotKeyManager.UnregisterHotKey((int)shortcutId); + } + if (_enableShortcut != null) + { + shortcutId = HotKeyManager.RegisterHotKey(_enableShortcut.Keys, _enableShortcut.ModifierKeys); + } + RaisePropertyChanged(); + } + } + + public bool IsEnabled + { + get { return _isEnabled; } + set + { + if (_isEnabled == value) return; + _isEnabled = value; + RaisePropertyChanged(); + } + } + + public bool MinimizeToTray + { + get { return _minimizeToTray; } + set + { + if (_minimizeToTray == value) return; + _minimizeToTray = value; + RaisePropertyChanged(); + } + } + + public bool StartMinimized + { + get { return _startMinimized; } + set + { + if (_startMinimized == value) return; + _startMinimized = value; + RaisePropertyChanged(); + } + } + + public bool StartWithWindows + { + get { return _startWithWindows; } + set + { + if (_startWithWindows == value) return; + _startWithWindows = value; + RaisePropertyChanged(); + } + } + + public void ClearEnableShortcutSwitch() + { + EnableShortcut = null; + } + + private void InstallUninstallOnStartUp(bool install) + { + try + { + var key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); + var curAssembly = Assembly.GetExecutingAssembly(); + + if (install) + { + key.SetValue(curAssembly.GetName().Name, curAssembly.Location); + } + else + { + key.DeleteValue(curAssembly.GetName().Name); + } + } + catch (Exception e) + { + StartWithWindows = !install; + var message = install ? "Can't add key to registry" : "Can't remove key from registry"; + Debug.WriteLine("{0} {1}", message, e.Message); + MessageBox.Show(message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); + } + } + + public ICommand ClearEnableShortcutSwitchCommand + { + get { return new RelayCommand(ClearEnableShortcutSwitch); } + } + + public ICommand InstallUninstallOnStartUpCommand + { + get { return new RelayCommand(InstallUninstallOnStartUp); } + } + } +} diff --git a/Models/KeyBlockConfig.cs b/Models/KeyBlockConfig.cs new file mode 100644 index 0000000..32bec1f --- /dev/null +++ b/Models/KeyBlockConfig.cs @@ -0,0 +1,68 @@ +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Windows.Forms; +using System.Windows.Input; +using System.Xml.Serialization; + +namespace WinHook.Models +{ + public class KeyBlockConfig: ObservableObject + { + private ObservableCollection _blockedKeys = new ObservableCollection(); + private Keys? _tmpKey; + + public ObservableCollection BlockedKeys + { + get { return _blockedKeys; } + set + { + if (_blockedKeys == value) return; + _blockedKeys = value; + RaisePropertyChanged(); + } + } + + [XmlIgnore] + public Keys? TmpAddKeys + { + get { return _tmpKey; } + set + { + if (_tmpKey == value) return; + _tmpKey = value; + RaisePropertyChanged(); + } + } + + public ICommand AddKeyCommand + { + get { return new RelayCommand(AddKey, CanAddKey); } + } + + public void AddKey(Keys key) + { + BlockedKeys.Add(key); + TmpAddKeys = null; + } + + public bool CanAddKey(Keys key) + { + return (key != Keys.None && !BlockedKeys.Contains(key)); + } + + public ICommand RemoveKeyCommand + { + get { return new RelayCommand(RemoveKey, CanRemoveKey); } + } + + public void RemoveKey(Keys key) + { + BlockedKeys.Remove(key); + } + + public bool CanRemoveKey(Keys key) + { + return (key != Keys.None && BlockedKeys.Contains(key)); + } + } +} diff --git a/Models/ObservableObject.cs b/Models/ObservableObject.cs new file mode 100644 index 0000000..b802877 --- /dev/null +++ b/Models/ObservableObject.cs @@ -0,0 +1,16 @@ +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace WinHook.Models +{ + public class ObservableObject: INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged([CallerMemberName] string propertyName = "") + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/Models/RelayCommand.cs b/Models/RelayCommand.cs new file mode 100644 index 0000000..7f04b43 --- /dev/null +++ b/Models/RelayCommand.cs @@ -0,0 +1,150 @@ +using System; +using System.Windows.Input; + +namespace WinHook.Models +{ + public class RelayCommand : ICommand + { + #region Fields + + readonly Action _execute; + readonly Func _canExecute; + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of . + /// + /// Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + /// will always return true. + public RelayCommand(Action execute) + : this(execute, null) + { + } + + /// + /// Creates a new command. + /// + /// The execution logic. + /// The execution status logic. + public RelayCommand(Action execute, Func canExecute) + { + if (execute == null) + throw new ArgumentNullException("execute"); + + _execute = execute; + _canExecute = canExecute; + } + + #endregion + + #region ICommand Members + + /// + ///Defines the method that determines whether the command can execute in its current state. + /// + ///Data used by the command. If the command does not require data to be passed, this object can be set to null. + /// + ///true if this command can be executed; otherwise, false. + /// + public bool CanExecute(object parameter) + { + return _canExecute == null || _canExecute(); + } + + /// + ///Occurs when changes occur that affect whether or not the command should execute. + /// + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + /// + ///Defines the method to be called when the command is invoked. + /// + ///Data used by the command. If the command does not require data to be passed, this object can be set to . + public void Execute(object parameter) + { + _execute(); + } + + #endregion + } + + + public class RelayCommand : ICommand + { + #region Fields + + readonly Action _execute; + readonly Predicate _canExecute; + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of . + /// + /// Delegate to execute when Execute is called on the command. This can be null to just hook up a CanExecute delegate. + /// will always return true. + public RelayCommand(Action execute) + : this(execute, null) + { + } + + /// + /// Creates a new command. + /// + /// The execution logic. + /// The execution status logic. + public RelayCommand(Action execute, Predicate canExecute) + { + if (execute == null) + throw new ArgumentNullException("execute"); + + _execute = execute; + _canExecute = canExecute; + } + + #endregion + + #region ICommand Members + + /// + ///Defines the method that determines whether the command can execute in its current state. + /// + ///Data used by the command. If the command does not require data to be passed, this object can be set to null. + /// + ///true if this command can be executed; otherwise, false. + /// + public bool CanExecute(object parameter) + { + return _canExecute == null || (parameter != null && _canExecute((T) parameter)); + } + + /// + ///Occurs when changes occur that affect whether or not the command should execute. + /// + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + /// + ///Defines the method to be called when the command is invoked. + /// + ///Data used by the command. If the command does not require data to be passed, this object can be set to . + public void Execute(object parameter) + { + _execute((T)parameter); + } + + #endregion + } +} diff --git a/Models/ShorcutSwitch.cs b/Models/ShorcutSwitch.cs new file mode 100644 index 0000000..f1ce742 --- /dev/null +++ b/Models/ShorcutSwitch.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Windows.Input; + +namespace WinHook.Models +{ + [Serializable] + //[TypeConverter(typeof(ShorcutSwitchConverter))] + public class ShorcutSwitch + { + //[TypeConverter(typeof(KeysConverter))] + public Keys Keys { get; set; } + + //[TypeConverter(typeof(ModifierKeysConverter))] + public ModifierKeys ModifierKeys { get; set; } + + public ShorcutSwitch(Keys keys, ModifierKeys modifierKeys) + { + Keys = keys; + ModifierKeys = modifierKeys; + } + + public ShorcutSwitch() { } + + public override string ToString() + { + var shortcutText = new StringBuilder(); + + if ((ModifierKeys & ModifierKeys.Control) != 0) + { + shortcutText.Append(ModifierKeys.Control); + shortcutText.Append("+"); + } + if ((ModifierKeys & ModifierKeys.Shift) != 0) + { + shortcutText.Append(ModifierKeys.Shift); + shortcutText.Append("+"); + } + if ((ModifierKeys & ModifierKeys.Alt) != 0) + { + shortcutText.Append(ModifierKeys.Alt); + shortcutText.Append("+"); + } + shortcutText.Append(Keys); + + return shortcutText.ToString(); + } + } + + //public class ShorcutSwitchConverter : TypeConverter + //{ + // public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + // { + // return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + // } + + // // Overrides the ConvertFrom method of TypeConverter. + // public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + // { + // if (!(value is string)) return base.ConvertFrom(context, culture, value); + // var v = ((string)value).Split('+'); + // var keys = (Keys)TypeDescriptor.GetConverter(typeof(Keys)).ConvertFrom(v.Last()); + // var a = string.Join("+", v.DropLast(1)); + // var modifiersKeys = (ModifierKeys)TypeDescriptor.GetConverter(typeof(ModifierKeys)).ConvertFromInvariantString(a); + // return new ShorcutSwitch(keys, modifiersKeys); + // } + // // Overrides the ConvertTo method of TypeConverter. + // public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + // { + // if (destinationType == typeof(string)) + // { + // return value == null ? "" : value.ToString(); + // } + // return base.ConvertTo(context, culture, value, destinationType); + // } + //} +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..97fd6bb --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WinHook")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WinHook")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0baffc2 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18052 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WinHook.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [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() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinHook.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [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/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/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/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..5618b63 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18052 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WinHook.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Themes/Generic.xaml b/Themes/Generic.xaml new file mode 100644 index 0000000..f04add4 --- /dev/null +++ b/Themes/Generic.xaml @@ -0,0 +1,7 @@ + + +