[
  {
    "path": ".gitignore",
    "content": "\n#ignore thumbnails created by windows\nThumbs.db\n#Ignore files build by Visual Studio\n*.obj\n*.exe\n*.pdb\n*.user\n*.aps\n*.pch\n*.vspscc\n*_i.c\n*_p.c\n*.ncb\n*.suo\n*.tlb\n*.tlh\n*.bak\n*.cache\n*.ilk\n*.log\n[Bb]in\n[Dd]ebug*/\n*.lib\n*.sbr\nobj/\n[Rr]elease*/\n_ReSharper*/\n[Tt]est[Rr]esult*\n"
  },
  {
    "path": "AutoClicker/App.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n    <startup> \n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.0\"/>\n    </startup>\n</configuration>\n"
  },
  {
    "path": "AutoClicker/AutoClicker.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace AutoClicker\n{\n    class AutoClicker\n    {\n        #region \"Button\"\n        public enum ButtonType\n        {\n            Left,\n            Middle,\n            Right\n        }\n\n        private ButtonType buttonType;\n        private bool doubleClick;\n        #endregion\n\n        #region \"Location\"\n        public enum LocationType\n        {\n            Cursor,\n            Fixed,\n            Random,\n            RandomRange\n        }\n\n        private LocationType locationType;\n        private int x;\n        private int y;\n        private int width;\n        private int height;\n        #endregion\n\n        #region \"Delay\"\n        public enum DelayType\n        {\n            Fixed,\n            Range\n        }\n\n        private DelayType delayType;\n        private int delay;\n        private int delayRange;\n        #endregion\n\n        #region \"Count\"\n        public enum CountType\n        {\n            Fixed,\n            UntilStopped\n        }\n\n        private CountType countType;\n        private int count;\n        #endregion\n\n        #region \"Update storage\"\n        private bool buttonUpdated;\n        private ButtonType tmpButtonType;\n        private bool tmpDoubleClick;\n\n        private bool locationUpdated;\n        private LocationType tmpLocationType;\n        private int tmpX;\n        private int tmpY;\n        private int tmpWidth;\n        private int tmpHeight;\n\n        private bool delayUpdated;\n        private DelayType tmpDelayType;\n        private int tmpDelay;\n        private int tmpDelayRange;\n\n        private bool countUpdated;\n        private CountType tmpCountType;\n        private int tmpCount;\n        #endregion\n\n        Thread Clicker;\n        Random rnd;\n\n        public AutoClicker()\n        {\n            rnd = new Random();\n        }\n\n        public class NextClickEventArgs : EventArgs\n        {\n            public int NextClick;\n        }\n\n        public event EventHandler<NextClickEventArgs> NextClick;\n\n        public EventHandler<EventArgs> Finished;\n\n        private void Click()\n        {\n            //System.Diagnostics.Debug.Print(\"Click() started\");\n            SyncSettings();\n            int remaining = count;\n            //System.Diagnostics.Debug.Print(\"Count type: {0}, count: {1}\", countType, count);\n            while (countType == CountType.UntilStopped || remaining > 0)\n            {\n                if (!IsAlive)\n                    return;\n                SyncSettings();\n                List<Win32.INPUT> inputs = new List<Win32.INPUT>();\n\n                // Move the mouse if required.\n                if (locationType == LocationType.Fixed)\n                {\n                    Win32.INPUT input = new Win32.INPUT\n                    {\n                        type = Win32.SendInputEventType.InputMouse,\n                        mi = new Win32.MOUSEINPUT\n                        {\n                            dx = Win32.CalculateAbsoluteCoordinateX(x),\n                            dy = Win32.CalculateAbsoluteCoordinateX(y),\n                            dwFlags = Win32.MouseEventFlags.Move | Win32.MouseEventFlags.Absolute\n                        }\n                    };\n                    inputs.Add(input);\n                }\n                else if (locationType == LocationType.Random)\n                {\n                    Win32.INPUT input = new Win32.INPUT\n                    {\n                        type = Win32.SendInputEventType.InputMouse,\n                        mi = new Win32.MOUSEINPUT\n                        {\n                            dx = rnd.Next(65536),\n                            dy = rnd.Next(65536),\n                            dwFlags = Win32.MouseEventFlags.Move | Win32.MouseEventFlags.Absolute\n                        }\n                    };\n                    inputs.Add(input);\n                }\n                else if (locationType == LocationType.RandomRange)\n                {\n                    Win32.INPUT input = new Win32.INPUT\n                    {\n                        type = Win32.SendInputEventType.InputMouse,\n                        mi = new Win32.MOUSEINPUT\n                        {\n                            dx = Win32.CalculateAbsoluteCoordinateX(rnd.Next(x, x + width)),\n                            dy = Win32.CalculateAbsoluteCoordinateY(rnd.Next(y, y + height)),\n                            dwFlags = Win32.MouseEventFlags.Move | Win32.MouseEventFlags.Absolute\n                        }\n                    };\n                    inputs.Add(input);\n                }\n                //System.Diagnostics.Debug.Print(\"Move command added\");\n\n                // マウスをクリック\n                for (int i = 0; i < (doubleClick ? 2 : 1); i++)\n                {\n                    // Add a delay if it's a double click.\n                    if (i == 1)\n                    {\n                        Thread.Sleep(50);\n                    }\n\n                    if (buttonType == ButtonType.Left)\n                    {\n                        Win32.INPUT inputDown = new Win32.INPUT\n                        {\n                            type = Win32.SendInputEventType.InputMouse,\n                            mi = new Win32.MOUSEINPUT\n                            {\n                                dwFlags = Win32.MouseEventFlags.LeftDown\n                            }\n                        };\n                        inputs.Add(inputDown);\n                        Win32.INPUT inputUp = new Win32.INPUT\n                        {\n                            type = Win32.SendInputEventType.InputMouse,\n                            mi = new Win32.MOUSEINPUT\n                            {\n                                dwFlags = Win32.MouseEventFlags.LeftUp\n                            }\n                        };\n                        inputs.Add(inputUp);\n                    }\n\n                    if (buttonType == ButtonType.Middle)\n                    {\n                        Win32.INPUT inputDown = new Win32.INPUT\n                        {\n                            type = Win32.SendInputEventType.InputMouse,\n                            mi = new Win32.MOUSEINPUT\n                            {\n                                dwFlags = Win32.MouseEventFlags.MiddleDown\n                            }\n                        };\n                        inputs.Add(inputDown);\n                        Win32.INPUT inputUp = new Win32.INPUT\n                        {\n                            type = Win32.SendInputEventType.InputMouse,\n                            mi = new Win32.MOUSEINPUT\n                            {\n                                dwFlags = Win32.MouseEventFlags.MiddleUp\n                            }\n                        };\n                        inputs.Add(inputUp);\n                    }\n\n                    if (buttonType == ButtonType.Right)\n                    {\n                        Win32.INPUT inputDown = new Win32.INPUT\n                        {\n                            type = Win32.SendInputEventType.InputMouse,\n                            mi = new Win32.MOUSEINPUT\n                            {\n                                dwFlags = Win32.MouseEventFlags.RightDown\n                            }\n                        };\n                        inputs.Add(inputDown);\n                        Win32.INPUT inputUp = new Win32.INPUT\n                        {\n                            type = Win32.SendInputEventType.InputMouse,\n                            mi = new Win32.MOUSEINPUT\n                            {\n                                dwFlags = Win32.MouseEventFlags.RightUp\n                            }\n                        };\n                        inputs.Add(inputUp);\n                    }\n                }\n                //System.Diagnostics.Debug.Print(\"Click commands added\");\n\n                //INPUT[] input = new INPUT[2];\n                //input[0].mi.dwFlags = Win32.MOUSEEVENTF_LEFTDOWN;\n                //input[1].mi.dwFlags = Win32.MOUSEEVENTF_LEFTUP;\n                //Win32.SendInput(2, input, Marshal.SizeOf(input[0]));\n                Win32.SendInput((uint)inputs.Count, inputs.ToArray(), Marshal.SizeOf(new Win32.INPUT()));\n                //System.Diagnostics.Debug.Print(\"Command sent\");\n\n                // ちょっと寝る\n                int nextDelay = 0;\n                if (delayType == DelayType.Fixed)\n                {\n                    nextDelay = delay;\n                    \n                }\n                else\n                {\n                    nextDelay = rnd.Next(delay, delayRange);\n                }\n                NextClick?.Invoke(this, new NextClickEventArgs { NextClick = nextDelay });\n                Thread.Sleep(nextDelay);\n                //System.Diagnostics.Debug.Print(\"Had a nap\");\n                remaining--;\n            }\n            Finished?.Invoke(this, null);\n        }\n\n        public bool IsAlive\n        {\n            get\n            {\n                if (Clicker == null)\n                {\n                    return false;\n                }\n                return Clicker.IsAlive;\n            }\n        }\n\n        public void Start()\n        {\n            Clicker = new Thread(Click);\n            Clicker.IsBackground = true;\n            Clicker.Start();\n        }\n\n        public void Stop()\n        {\n            if (Clicker != null)\n            {\n                Clicker.Abort();\n            }\n        }\n\n        private void SyncSettings()\n        {\n            if (buttonUpdated)\n            {\n                buttonType = tmpButtonType;\n                doubleClick = tmpDoubleClick;\n\n                buttonUpdated = false;\n            }\n\n            if (locationUpdated)\n            {\n                locationType = tmpLocationType;\n                x = tmpX;\n                y = tmpY;\n                width = tmpWidth;\n                height = tmpHeight;\n\n                locationUpdated = false;\n            }\n\n            if (delayUpdated)\n            {\n                delayType = tmpDelayType;\n                delay = tmpDelay;\n                delayRange = tmpDelayRange;\n\n                delayUpdated = false;\n            }\n\n            if (countUpdated)\n            {\n                countType = tmpCountType;\n                count = tmpCount;\n\n                countUpdated = false;\n            }\n            //System.Diagnostics.Debug.Print(\"Settings synced\");\n        }\n\n        public void UpdateButton(ButtonType ButtonType, bool DoubleClick)\n        {\n            tmpButtonType = ButtonType;\n            tmpDoubleClick = DoubleClick;\n\n            buttonUpdated = true;\n        }\n\n        public void UpdateLocation(LocationType LocationType, int X, int Y, int Width, int Height)\n        {\n            tmpLocationType = LocationType;\n            tmpX = X;\n            tmpY = Y;\n            tmpWidth = Width;\n            tmpHeight = Height;\n\n            locationUpdated = true;\n        }\n\n        public void UpdateDelay(DelayType DelayType, int Delay, int DelayRange)\n        {\n            tmpDelayType = DelayType;\n            tmpDelay = Delay;\n            tmpDelayRange = DelayRange;\n\n            delayUpdated = true;\n        }\n\n        public void UpdateCount(CountType CountType, int Count)\n        {\n            tmpCountType = CountType;\n            tmpCount = Count;\n\n            countUpdated = true;\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/AutoClicker.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"14.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{E9F5559C-E09D-4CAF-B8C7-3D255D804B28}</ProjectGuid>\n    <OutputType>WinExe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>AutoClicker</RootNamespace>\n    <AssemblyName>AutoClicker</AssemblyName>\n    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>\n    <TargetFrameworkProfile />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Deployment\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Net.Http\" />\n    <Reference Include=\"System.Windows.Forms\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"AutoClicker.cs\" />\n    <Compile Include=\"KeysConverter.cs\" />\n    <Compile Include=\"MainForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"MainForm.Designer.cs\">\n      <DependentUpon>MainForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"SelectionForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"SelectionForm.Designer.cs\">\n      <DependentUpon>SelectionForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"Win32.cs\" />\n    <EmbeddedResource Include=\"MainForm.resx\">\n      <DependentUpon>MainForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"Properties\\Resources.resx\">\n      <Generator>ResXFileCodeGenerator</Generator>\n      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\n      <SubType>Designer</SubType>\n    </EmbeddedResource>\n    <Compile Include=\"Properties\\Resources.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DependentUpon>Resources.resx</DependentUpon>\n      <DesignTime>True</DesignTime>\n    </Compile>\n    <EmbeddedResource Include=\"SelectionForm.resx\">\n      <DependentUpon>SelectionForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <None Include=\"Properties\\Settings.settings\">\n      <Generator>SettingsSingleFileGenerator</Generator>\n      <LastGenOutput>Settings.Designer.cs</LastGenOutput>\n    </None>\n    <Compile Include=\"Properties\\Settings.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DependentUpon>Settings.settings</DependentUpon>\n      <DesignTimeSharedInput>True</DesignTimeSharedInput>\n    </Compile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "AutoClicker/KeysConverter.cs",
    "content": "﻿\nusing System.Text;\nusing System.Windows.Forms;\n\nnamespace AutoClicker\n{\n    public class KeysConverter\n    {\n        public static string Convert(Keys keys)\n        {\n            return ConvertModifiers(keys) + \" \" + ConvertKeyPart(keys);\n        }\n\n        public static string ConvertModifiers(Keys keys)\n        {\n            // Trim off the keys.\n            var trimmedKeys = (keys & Keys.Modifiers);\n\n            StringBuilder output = new StringBuilder();\n\n            if ((trimmedKeys & Keys.Shift) != 0)\n            {\n                output.Append(\"<Shift> \");\n            }\n\n            if ((trimmedKeys & Keys.Control) != 0)\n            {\n                output.Append(\"<Control> \");\n            }\n\n            if ((trimmedKeys & Keys.Alt) != 0)\n            {\n                output.Append(\"<Alt> \");\n            }\n\n            string outString = output.ToString();\n            if (outString.Length > 0)\n            {\n                // Trim the space off.\n                return outString.Substring(0, outString.Length - 1);\n            }\n            return \"\";\n        }\n\n        public static string ConvertKeyPart(Keys keys)\n        {\n            // Trim off the modifiers.\n            var trimmedKeys = (keys & Keys.KeyCode);\n\n            switch (trimmedKeys)\n            {\n                case Keys.Back:\n                    return \"Backspace\";\n                case Keys.Tab:\n                    return \"Tab\";\n                case Keys.Return:\n                    return \"Enter\";\n                case Keys.Pause:\n                    return \"Pause\";\n                case Keys.Capital:\n                    return \"Caps Lock\";\n                case Keys.Escape:\n                    return \"Escape\";\n                case Keys.Space:\n                    return \"Space\";\n                case Keys.PageUp:\n                    return \"Page Up\";\n                case Keys.PageDown:\n                    return \"Page Down\";\n                case Keys.End:\n                    return \"End\";\n                case Keys.Home:\n                    return \"Home\";\n                case Keys.Left:\n                    return \"Left\";\n                case Keys.Up:\n                    return \"Up\";\n                case Keys.Right:\n                    return \"Right\";\n                case Keys.Down:\n                    return \"Down\";\n                case Keys.PrintScreen:\n                    return \"Print Screen\";\n                case Keys.Insert:\n                    return \"Insert\";\n                case Keys.Delete:\n                    return \"Delete\";\n                case Keys.D0:\n                    return \"0\";\n                case Keys.D1:\n                    return \"1\";\n                case Keys.D2:\n                    return \"2\";\n                case Keys.D3:\n                    return \"3\";\n                case Keys.D4:\n                    return \"4\";\n                case Keys.D5:\n                    return \"5\";\n                case Keys.D6:\n                    return \"6\";\n                case Keys.D7:\n                    return \"7\";\n                case Keys.D8:\n                    return \"8\";\n                case Keys.D9:\n                    return \"9\";\n                case Keys.A:\n                    return \"A\";\n                case Keys.B:\n                    return \"B\";\n                case Keys.C:\n                    return \"C\";\n                case Keys.D:\n                    return \"D\";\n                case Keys.E:\n                    return \"E\";\n                case Keys.F:\n                    return \"F\";\n                case Keys.G:\n                    return \"G\";\n                case Keys.H:\n                    return \"H\";\n                case Keys.I:\n                    return \"I\";\n                case Keys.J:\n                    return \"J\";\n                case Keys.K:\n                    return \"K\";\n                case Keys.L:\n                    return \"L\";\n                case Keys.M:\n                    return \"M\";\n                case Keys.N:\n                    return \"N\";\n                case Keys.O:\n                    return \"O\";\n                case Keys.P:\n                    return \"P\";\n                case Keys.Q:\n                    return \"Q\";\n                case Keys.R:\n                    return \"R\";\n                case Keys.S:\n                    return \"S\";\n                case Keys.T:\n                    return \"T\";\n                case Keys.U:\n                    return \"U\";\n                case Keys.V:\n                    return \"V\";\n                case Keys.W:\n                    return \"W\";\n                case Keys.X:\n                    return \"X\";\n                case Keys.Y:\n                    return \"Y\";\n                case Keys.Z:\n                    return \"Z\";\n                case Keys.NumPad0:\n                    return \"Num 0\";\n                case Keys.NumPad1:\n                    return \"Num 1\";\n                case Keys.NumPad2:\n                    return \"Num 2\";\n                case Keys.NumPad3:\n                    return \"Num 3\";\n                case Keys.NumPad4:\n                    return \"Num 4\";\n                case Keys.NumPad5:\n                    return \"Num 5\";\n                case Keys.NumPad6:\n                    return \"Num 6\";\n                case Keys.NumPad7:\n                    return \"Num 7\";\n                case Keys.NumPad8:\n                    return \"Num 8\";\n                case Keys.NumPad9:\n                    return \"Num 9\";\n                case Keys.Multiply:\n                    return \"Num *\";\n                case Keys.Add:\n                    return \"Num +\";\n                case Keys.Subtract:\n                    return \"Num -\";\n                case Keys.Decimal:\n                    return \"Num .\";\n                case Keys.Divide:\n                    return \"Num /\";\n                case Keys.F1:\n                    return \"F1\";\n                case Keys.F2:\n                    return \"F2\";\n                case Keys.F3:\n                    return \"F3\";\n                case Keys.F4:\n                    return \"F4\";\n                case Keys.F5:\n                    return \"F5\";\n                case Keys.F6:\n                    return \"F6\";\n                case Keys.F7:\n                    return \"F7\";\n                case Keys.F8:\n                    return \"F8\";\n                case Keys.F9:\n                    return \"F9\";\n                case Keys.F10:\n                    return \"F10\";\n                case Keys.F11:\n                    return \"F11\";\n                case Keys.F12:\n                    return \"F12\";\n                case Keys.F13:\n                    return \"F13\";\n                case Keys.F14:\n                    return \"F14\";\n                case Keys.F15:\n                    return \"F15\";\n                case Keys.F16:\n                    return \"F16\";\n                case Keys.F17:\n                    return \"F17\";\n                case Keys.F18:\n                    return \"F18\";\n                case Keys.F19:\n                    return \"F19\";\n                case Keys.F20:\n                    return \"F20\";\n                case Keys.F21:\n                    return \"F21\";\n                case Keys.F22:\n                    return \"F22\";\n                case Keys.F23:\n                    return \"F23\";\n                case Keys.F24:\n                    return \"F24\";\n                case Keys.NumLock:\n                    return \"Num Lock\";\n                case Keys.Scroll:\n                    return \"Scroll Lock\";\n                case Keys.OemSemicolon:\n                    return \";\";\n                case Keys.Oemplus:\n                    return \"+\";\n                case Keys.Oemcomma:\n                    return \",\";\n                case Keys.OemMinus:\n                    return \"-\";\n                case Keys.OemPeriod:\n                    return \".\";\n                case Keys.OemQuestion:\n                    return \"?\";\n                case Keys.Oemtilde:\n                    return \"`\";\n                case Keys.OemOpenBrackets:\n                    return \"[\";\n                case Keys.OemPipe:\n                    return \"|\";\n                case Keys.OemCloseBrackets:\n                    return \"]\";\n                case Keys.OemQuotes:\n                    return \"'\";\n                case Keys.OemBackslash:\n                    return \"\\\\\";\n                default:\n                    return \"Dunno\";\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/MainForm.Designer.cs",
    "content": "﻿namespace AutoClicker\n{\n    partial class MainForm\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.grpMain = new System.Windows.Forms.GroupBox();\n            this.grpClickType = new System.Windows.Forms.GroupBox();\n            this.rdbClickDoubleRight = new System.Windows.Forms.RadioButton();\n            this.rdbClickDoubleMiddle = new System.Windows.Forms.RadioButton();\n            this.rdbClickDoubleLeft = new System.Windows.Forms.RadioButton();\n            this.rdbClickSingleRight = new System.Windows.Forms.RadioButton();\n            this.rdbClickSingleMiddle = new System.Windows.Forms.RadioButton();\n            this.rdbClickSingleLeft = new System.Windows.Forms.RadioButton();\n            this.grpControls = new System.Windows.Forms.GroupBox();\n            this.label11 = new System.Windows.Forms.Label();\n            this.btnToggle = new System.Windows.Forms.Button();\n            this.btnHotkeyRemove = new System.Windows.Forms.Button();\n            this.txtHotkey = new System.Windows.Forms.TextBox();\n            this.grpCount = new System.Windows.Forms.GroupBox();\n            this.label1 = new System.Windows.Forms.Label();\n            this.numCount = new System.Windows.Forms.NumericUpDown();\n            this.rdbCount = new System.Windows.Forms.RadioButton();\n            this.rdbUntilStopped = new System.Windows.Forms.RadioButton();\n            this.grpDelay = new System.Windows.Forms.GroupBox();\n            this.label10 = new System.Windows.Forms.Label();\n            this.label9 = new System.Windows.Forms.Label();\n            this.numDelayFixed = new System.Windows.Forms.NumericUpDown();\n            this.label8 = new System.Windows.Forms.Label();\n            this.numDelayRangeMax = new System.Windows.Forms.NumericUpDown();\n            this.numDelayRangeMin = new System.Windows.Forms.NumericUpDown();\n            this.rdbDelayRange = new System.Windows.Forms.RadioButton();\n            this.rdbDelayFixed = new System.Windows.Forms.RadioButton();\n            this.grpLocation = new System.Windows.Forms.GroupBox();\n            this.label6 = new System.Windows.Forms.Label();\n            this.numRandomHeight = new System.Windows.Forms.NumericUpDown();\n            this.label7 = new System.Windows.Forms.Label();\n            this.numRandomWidth = new System.Windows.Forms.NumericUpDown();\n            this.label4 = new System.Windows.Forms.Label();\n            this.numRandomY = new System.Windows.Forms.NumericUpDown();\n            this.label5 = new System.Windows.Forms.Label();\n            this.numRandomX = new System.Windows.Forms.NumericUpDown();\n            this.label3 = new System.Windows.Forms.Label();\n            this.numFixedY = new System.Windows.Forms.NumericUpDown();\n            this.label2 = new System.Windows.Forms.Label();\n            this.numFixedX = new System.Windows.Forms.NumericUpDown();\n            this.rdbLocationRandomArea = new System.Windows.Forms.RadioButton();\n            this.rdbLocationFixed = new System.Windows.Forms.RadioButton();\n            this.rdbLocationRandom = new System.Windows.Forms.RadioButton();\n            this.rdbLocationMouse = new System.Windows.Forms.RadioButton();\n            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\n            this.tslStatus = new System.Windows.Forms.ToolStripStatusLabel();\n            this.btnSelect = new System.Windows.Forms.Button();\n            this.grpMain.SuspendLayout();\n            this.grpClickType.SuspendLayout();\n            this.grpControls.SuspendLayout();\n            this.grpCount.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numCount)).BeginInit();\n            this.grpDelay.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numDelayFixed)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numDelayRangeMax)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numDelayRangeMin)).BeginInit();\n            this.grpLocation.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomHeight)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomWidth)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomY)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomX)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numFixedY)).BeginInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numFixedX)).BeginInit();\n            this.statusStrip1.SuspendLayout();\n            this.SuspendLayout();\n            // \n            // grpMain\n            // \n            this.grpMain.Controls.Add(this.grpClickType);\n            this.grpMain.Controls.Add(this.grpControls);\n            this.grpMain.Controls.Add(this.grpCount);\n            this.grpMain.Controls.Add(this.grpDelay);\n            this.grpMain.Controls.Add(this.grpLocation);\n            this.grpMain.Location = new System.Drawing.Point(12, 12);\n            this.grpMain.Name = \"grpMain\";\n            this.grpMain.Size = new System.Drawing.Size(750, 287);\n            this.grpMain.TabIndex = 0;\n            this.grpMain.TabStop = false;\n            this.grpMain.Text = \"Click details\";\n            // \n            // grpClickType\n            // \n            this.grpClickType.Controls.Add(this.rdbClickDoubleRight);\n            this.grpClickType.Controls.Add(this.rdbClickDoubleMiddle);\n            this.grpClickType.Controls.Add(this.rdbClickDoubleLeft);\n            this.grpClickType.Controls.Add(this.rdbClickSingleRight);\n            this.grpClickType.Controls.Add(this.rdbClickSingleMiddle);\n            this.grpClickType.Controls.Add(this.rdbClickSingleLeft);\n            this.grpClickType.Location = new System.Drawing.Point(353, 97);\n            this.grpClickType.Name = \"grpClickType\";\n            this.grpClickType.Size = new System.Drawing.Size(391, 103);\n            this.grpClickType.TabIndex = 2;\n            this.grpClickType.TabStop = false;\n            this.grpClickType.Text = \"Click type\";\n            // \n            // rdbClickDoubleRight\n            // \n            this.rdbClickDoubleRight.AutoSize = true;\n            this.rdbClickDoubleRight.Location = new System.Drawing.Point(100, 62);\n            this.rdbClickDoubleRight.Name = \"rdbClickDoubleRight\";\n            this.rdbClickDoubleRight.Size = new System.Drawing.Size(89, 16);\n            this.rdbClickDoubleRight.TabIndex = 5;\n            this.rdbClickDoubleRight.Text = \"Right Double\";\n            this.rdbClickDoubleRight.UseVisualStyleBackColor = true;\n            this.rdbClickDoubleRight.CheckedChanged += new System.EventHandler(this.ClickTypeHandler);\n            // \n            // rdbClickDoubleMiddle\n            // \n            this.rdbClickDoubleMiddle.AutoSize = true;\n            this.rdbClickDoubleMiddle.Location = new System.Drawing.Point(100, 40);\n            this.rdbClickDoubleMiddle.Name = \"rdbClickDoubleMiddle\";\n            this.rdbClickDoubleMiddle.Size = new System.Drawing.Size(95, 16);\n            this.rdbClickDoubleMiddle.TabIndex = 4;\n            this.rdbClickDoubleMiddle.Text = \"Middle Double\";\n            this.rdbClickDoubleMiddle.UseVisualStyleBackColor = true;\n            this.rdbClickDoubleMiddle.CheckedChanged += new System.EventHandler(this.ClickTypeHandler);\n            // \n            // rdbClickDoubleLeft\n            // \n            this.rdbClickDoubleLeft.AutoSize = true;\n            this.rdbClickDoubleLeft.Location = new System.Drawing.Point(100, 18);\n            this.rdbClickDoubleLeft.Name = \"rdbClickDoubleLeft\";\n            this.rdbClickDoubleLeft.Size = new System.Drawing.Size(82, 16);\n            this.rdbClickDoubleLeft.TabIndex = 3;\n            this.rdbClickDoubleLeft.Text = \"Left Double\";\n            this.rdbClickDoubleLeft.UseVisualStyleBackColor = true;\n            this.rdbClickDoubleLeft.CheckedChanged += new System.EventHandler(this.ClickTypeHandler);\n            // \n            // rdbClickSingleRight\n            // \n            this.rdbClickSingleRight.AutoSize = true;\n            this.rdbClickSingleRight.Location = new System.Drawing.Point(6, 62);\n            this.rdbClickSingleRight.Name = \"rdbClickSingleRight\";\n            this.rdbClickSingleRight.Size = new System.Drawing.Size(50, 16);\n            this.rdbClickSingleRight.TabIndex = 2;\n            this.rdbClickSingleRight.Text = \"Right\";\n            this.rdbClickSingleRight.UseVisualStyleBackColor = true;\n            this.rdbClickSingleRight.CheckedChanged += new System.EventHandler(this.ClickTypeHandler);\n            // \n            // rdbClickSingleMiddle\n            // \n            this.rdbClickSingleMiddle.AutoSize = true;\n            this.rdbClickSingleMiddle.Location = new System.Drawing.Point(6, 40);\n            this.rdbClickSingleMiddle.Name = \"rdbClickSingleMiddle\";\n            this.rdbClickSingleMiddle.Size = new System.Drawing.Size(56, 16);\n            this.rdbClickSingleMiddle.TabIndex = 1;\n            this.rdbClickSingleMiddle.Text = \"Middle\";\n            this.rdbClickSingleMiddle.UseVisualStyleBackColor = true;\n            this.rdbClickSingleMiddle.CheckedChanged += new System.EventHandler(this.ClickTypeHandler);\n            // \n            // rdbClickSingleLeft\n            // \n            this.rdbClickSingleLeft.AutoSize = true;\n            this.rdbClickSingleLeft.Checked = true;\n            this.rdbClickSingleLeft.Location = new System.Drawing.Point(6, 18);\n            this.rdbClickSingleLeft.Name = \"rdbClickSingleLeft\";\n            this.rdbClickSingleLeft.Size = new System.Drawing.Size(43, 16);\n            this.rdbClickSingleLeft.TabIndex = 0;\n            this.rdbClickSingleLeft.TabStop = true;\n            this.rdbClickSingleLeft.Text = \"Left\";\n            this.rdbClickSingleLeft.UseVisualStyleBackColor = true;\n            this.rdbClickSingleLeft.CheckedChanged += new System.EventHandler(this.ClickTypeHandler);\n            // \n            // grpControls\n            // \n            this.grpControls.Controls.Add(this.label11);\n            this.grpControls.Controls.Add(this.btnToggle);\n            this.grpControls.Controls.Add(this.btnHotkeyRemove);\n            this.grpControls.Controls.Add(this.txtHotkey);\n            this.grpControls.Location = new System.Drawing.Point(353, 18);\n            this.grpControls.Name = \"grpControls\";\n            this.grpControls.Size = new System.Drawing.Size(391, 73);\n            this.grpControls.TabIndex = 1;\n            this.grpControls.TabStop = false;\n            this.grpControls.Text = \"Controls\";\n            // \n            // label11\n            // \n            this.label11.AutoSize = true;\n            this.label11.Location = new System.Drawing.Point(6, 21);\n            this.label11.Name = \"label11\";\n            this.label11.Size = new System.Drawing.Size(41, 12);\n            this.label11.TabIndex = 4;\n            this.label11.Text = \"Hotkey\";\n            // \n            // btnToggle\n            // \n            this.btnToggle.Location = new System.Drawing.Point(310, 44);\n            this.btnToggle.Name = \"btnToggle\";\n            this.btnToggle.Size = new System.Drawing.Size(75, 23);\n            this.btnToggle.TabIndex = 3;\n            this.btnToggle.Text = \"Start\";\n            this.btnToggle.UseVisualStyleBackColor = true;\n            this.btnToggle.Click += new System.EventHandler(this.btnToggle_Click);\n            // \n            // btnHotkeyRemove\n            // \n            this.btnHotkeyRemove.Location = new System.Drawing.Point(229, 15);\n            this.btnHotkeyRemove.Name = \"btnHotkeyRemove\";\n            this.btnHotkeyRemove.Size = new System.Drawing.Size(156, 23);\n            this.btnHotkeyRemove.TabIndex = 2;\n            this.btnHotkeyRemove.Text = \"Clear Hotkey\";\n            this.btnHotkeyRemove.UseVisualStyleBackColor = true;\n            this.btnHotkeyRemove.Click += new System.EventHandler(this.btnHotkeyRemove_Click);\n            // \n            // txtHotkey\n            // \n            this.txtHotkey.Location = new System.Drawing.Point(8, 46);\n            this.txtHotkey.Name = \"txtHotkey\";\n            this.txtHotkey.Size = new System.Drawing.Size(296, 19);\n            this.txtHotkey.TabIndex = 0;\n            this.txtHotkey.Text = \"None\";\n            this.txtHotkey.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHotkey_KeyDown);\n            // \n            // grpCount\n            // \n            this.grpCount.Controls.Add(this.label1);\n            this.grpCount.Controls.Add(this.numCount);\n            this.grpCount.Controls.Add(this.rdbCount);\n            this.grpCount.Controls.Add(this.rdbUntilStopped);\n            this.grpCount.Location = new System.Drawing.Point(6, 206);\n            this.grpCount.Name = \"grpCount\";\n            this.grpCount.Size = new System.Drawing.Size(341, 69);\n            this.grpCount.TabIndex = 1;\n            this.grpCount.TabStop = false;\n            this.grpCount.Text = \"Count\";\n            // \n            // label1\n            // \n            this.label1.AutoSize = true;\n            this.label1.Location = new System.Drawing.Point(230, 43);\n            this.label1.Name = \"label1\";\n            this.label1.Size = new System.Drawing.Size(35, 12);\n            this.label1.TabIndex = 3;\n            this.label1.Text = \"clicks\";\n            // \n            // numCount\n            // \n            this.numCount.Location = new System.Drawing.Point(104, 41);\n            this.numCount.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numCount.Name = \"numCount\";\n            this.numCount.Size = new System.Drawing.Size(120, 19);\n            this.numCount.TabIndex = 2;\n            this.numCount.Value = new decimal(new int[] {\n            100,\n            0,\n            0,\n            0});\n            this.numCount.ValueChanged += new System.EventHandler(this.CountHandler);\n            // \n            // rdbCount\n            // \n            this.rdbCount.AutoSize = true;\n            this.rdbCount.Location = new System.Drawing.Point(6, 41);\n            this.rdbCount.Name = \"rdbCount\";\n            this.rdbCount.Size = new System.Drawing.Size(92, 16);\n            this.rdbCount.TabIndex = 1;\n            this.rdbCount.Text = \"Fixed number\";\n            this.rdbCount.UseVisualStyleBackColor = true;\n            this.rdbCount.CheckedChanged += new System.EventHandler(this.CountHandler);\n            // \n            // rdbUntilStopped\n            // \n            this.rdbUntilStopped.AutoSize = true;\n            this.rdbUntilStopped.Checked = true;\n            this.rdbUntilStopped.Location = new System.Drawing.Point(6, 19);\n            this.rdbUntilStopped.Name = \"rdbUntilStopped\";\n            this.rdbUntilStopped.Size = new System.Drawing.Size(91, 16);\n            this.rdbUntilStopped.TabIndex = 0;\n            this.rdbUntilStopped.TabStop = true;\n            this.rdbUntilStopped.Text = \"Until stopped\";\n            this.rdbUntilStopped.UseVisualStyleBackColor = true;\n            this.rdbUntilStopped.CheckedChanged += new System.EventHandler(this.CountHandler);\n            // \n            // grpDelay\n            // \n            this.grpDelay.Controls.Add(this.label10);\n            this.grpDelay.Controls.Add(this.label9);\n            this.grpDelay.Controls.Add(this.numDelayFixed);\n            this.grpDelay.Controls.Add(this.label8);\n            this.grpDelay.Controls.Add(this.numDelayRangeMax);\n            this.grpDelay.Controls.Add(this.numDelayRangeMin);\n            this.grpDelay.Controls.Add(this.rdbDelayRange);\n            this.grpDelay.Controls.Add(this.rdbDelayFixed);\n            this.grpDelay.Location = new System.Drawing.Point(353, 206);\n            this.grpDelay.Name = \"grpDelay\";\n            this.grpDelay.Size = new System.Drawing.Size(391, 69);\n            this.grpDelay.TabIndex = 1;\n            this.grpDelay.TabStop = false;\n            this.grpDelay.Text = \"Delay\";\n            // \n            // label10\n            // \n            this.label10.AutoSize = true;\n            this.label10.Location = new System.Drawing.Point(365, 45);\n            this.label10.Name = \"label10\";\n            this.label10.Size = new System.Drawing.Size(20, 12);\n            this.label10.TabIndex = 13;\n            this.label10.Text = \"ms\";\n            // \n            // label9\n            // \n            this.label9.AutoSize = true;\n            this.label9.Location = new System.Drawing.Point(222, 20);\n            this.label9.Name = \"label9\";\n            this.label9.Size = new System.Drawing.Size(20, 12);\n            this.label9.TabIndex = 12;\n            this.label9.Text = \"ms\";\n            // \n            // numDelayFixed\n            // \n            this.numDelayFixed.Location = new System.Drawing.Point(96, 18);\n            this.numDelayFixed.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numDelayFixed.Name = \"numDelayFixed\";\n            this.numDelayFixed.Size = new System.Drawing.Size(120, 19);\n            this.numDelayFixed.TabIndex = 11;\n            this.numDelayFixed.Value = new decimal(new int[] {\n            100,\n            0,\n            0,\n            0});\n            this.numDelayFixed.ValueChanged += new System.EventHandler(this.DelayHandler);\n            // \n            // label8\n            // \n            this.label8.AutoSize = true;\n            this.label8.Location = new System.Drawing.Point(222, 45);\n            this.label8.Name = \"label8\";\n            this.label8.Size = new System.Drawing.Size(11, 12);\n            this.label8.TabIndex = 10;\n            this.label8.Text = \"-\";\n            // \n            // numDelayRangeMax\n            // \n            this.numDelayRangeMax.Location = new System.Drawing.Point(239, 43);\n            this.numDelayRangeMax.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numDelayRangeMax.Name = \"numDelayRangeMax\";\n            this.numDelayRangeMax.Size = new System.Drawing.Size(120, 19);\n            this.numDelayRangeMax.TabIndex = 9;\n            this.numDelayRangeMax.Value = new decimal(new int[] {\n            1000,\n            0,\n            0,\n            0});\n            this.numDelayRangeMax.ValueChanged += new System.EventHandler(this.DelayHandler);\n            // \n            // numDelayRangeMin\n            // \n            this.numDelayRangeMin.Location = new System.Drawing.Point(96, 43);\n            this.numDelayRangeMin.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numDelayRangeMin.Name = \"numDelayRangeMin\";\n            this.numDelayRangeMin.Size = new System.Drawing.Size(120, 19);\n            this.numDelayRangeMin.TabIndex = 8;\n            this.numDelayRangeMin.Value = new decimal(new int[] {\n            500,\n            0,\n            0,\n            0});\n            this.numDelayRangeMin.ValueChanged += new System.EventHandler(this.DelayHandler);\n            // \n            // rdbDelayRange\n            // \n            this.rdbDelayRange.AutoSize = true;\n            this.rdbDelayRange.Location = new System.Drawing.Point(6, 43);\n            this.rdbDelayRange.Name = \"rdbDelayRange\";\n            this.rdbDelayRange.Size = new System.Drawing.Size(84, 16);\n            this.rdbDelayRange.TabIndex = 1;\n            this.rdbDelayRange.Text = \"Delay range\";\n            this.rdbDelayRange.UseVisualStyleBackColor = true;\n            this.rdbDelayRange.CheckedChanged += new System.EventHandler(this.DelayHandler);\n            // \n            // rdbDelayFixed\n            // \n            this.rdbDelayFixed.AutoSize = true;\n            this.rdbDelayFixed.Checked = true;\n            this.rdbDelayFixed.Location = new System.Drawing.Point(6, 18);\n            this.rdbDelayFixed.Name = \"rdbDelayFixed\";\n            this.rdbDelayFixed.Size = new System.Drawing.Size(82, 16);\n            this.rdbDelayFixed.TabIndex = 0;\n            this.rdbDelayFixed.TabStop = true;\n            this.rdbDelayFixed.Text = \"Fixed delay\";\n            this.rdbDelayFixed.UseVisualStyleBackColor = true;\n            this.rdbDelayFixed.CheckedChanged += new System.EventHandler(this.DelayHandler);\n            // \n            // grpLocation\n            // \n            this.grpLocation.Controls.Add(this.btnSelect);\n            this.grpLocation.Controls.Add(this.label6);\n            this.grpLocation.Controls.Add(this.numRandomHeight);\n            this.grpLocation.Controls.Add(this.label7);\n            this.grpLocation.Controls.Add(this.numRandomWidth);\n            this.grpLocation.Controls.Add(this.label4);\n            this.grpLocation.Controls.Add(this.numRandomY);\n            this.grpLocation.Controls.Add(this.label5);\n            this.grpLocation.Controls.Add(this.numRandomX);\n            this.grpLocation.Controls.Add(this.label3);\n            this.grpLocation.Controls.Add(this.numFixedY);\n            this.grpLocation.Controls.Add(this.label2);\n            this.grpLocation.Controls.Add(this.numFixedX);\n            this.grpLocation.Controls.Add(this.rdbLocationRandomArea);\n            this.grpLocation.Controls.Add(this.rdbLocationFixed);\n            this.grpLocation.Controls.Add(this.rdbLocationRandom);\n            this.grpLocation.Controls.Add(this.rdbLocationMouse);\n            this.grpLocation.Location = new System.Drawing.Point(6, 18);\n            this.grpLocation.Name = \"grpLocation\";\n            this.grpLocation.Size = new System.Drawing.Size(341, 182);\n            this.grpLocation.TabIndex = 0;\n            this.grpLocation.TabStop = false;\n            this.grpLocation.Text = \"Location\";\n            // \n            // label6\n            // \n            this.label6.AutoSize = true;\n            this.label6.Location = new System.Drawing.Point(171, 158);\n            this.label6.Name = \"label6\";\n            this.label6.Size = new System.Drawing.Size(38, 12);\n            this.label6.TabIndex = 15;\n            this.label6.Text = \"Height\";\n            // \n            // numRandomHeight\n            // \n            this.numRandomHeight.Location = new System.Drawing.Point(215, 156);\n            this.numRandomHeight.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numRandomHeight.Name = \"numRandomHeight\";\n            this.numRandomHeight.Size = new System.Drawing.Size(120, 19);\n            this.numRandomHeight.TabIndex = 14;\n            this.numRandomHeight.Value = new decimal(new int[] {\n            100,\n            0,\n            0,\n            0});\n            this.numRandomHeight.ValueChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // label7\n            // \n            this.label7.AutoSize = true;\n            this.label7.Location = new System.Drawing.Point(6, 158);\n            this.label7.Name = \"label7\";\n            this.label7.Size = new System.Drawing.Size(33, 12);\n            this.label7.TabIndex = 13;\n            this.label7.Text = \"Width\";\n            // \n            // numRandomWidth\n            // \n            this.numRandomWidth.Location = new System.Drawing.Point(45, 156);\n            this.numRandomWidth.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numRandomWidth.Name = \"numRandomWidth\";\n            this.numRandomWidth.Size = new System.Drawing.Size(120, 19);\n            this.numRandomWidth.TabIndex = 12;\n            this.numRandomWidth.Value = new decimal(new int[] {\n            100,\n            0,\n            0,\n            0});\n            this.numRandomWidth.ValueChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // label4\n            // \n            this.label4.AutoSize = true;\n            this.label4.Location = new System.Drawing.Point(197, 133);\n            this.label4.Name = \"label4\";\n            this.label4.Size = new System.Drawing.Size(12, 12);\n            this.label4.TabIndex = 11;\n            this.label4.Text = \"Y\";\n            // \n            // numRandomY\n            // \n            this.numRandomY.Location = new System.Drawing.Point(215, 131);\n            this.numRandomY.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numRandomY.Name = \"numRandomY\";\n            this.numRandomY.Size = new System.Drawing.Size(120, 19);\n            this.numRandomY.TabIndex = 10;\n            this.numRandomY.ValueChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // label5\n            // \n            this.label5.AutoSize = true;\n            this.label5.Location = new System.Drawing.Point(27, 133);\n            this.label5.Name = \"label5\";\n            this.label5.Size = new System.Drawing.Size(12, 12);\n            this.label5.TabIndex = 9;\n            this.label5.Text = \"X\";\n            // \n            // numRandomX\n            // \n            this.numRandomX.Location = new System.Drawing.Point(45, 131);\n            this.numRandomX.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numRandomX.Name = \"numRandomX\";\n            this.numRandomX.Size = new System.Drawing.Size(120, 19);\n            this.numRandomX.TabIndex = 8;\n            this.numRandomX.ValueChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // label3\n            // \n            this.label3.AutoSize = true;\n            this.label3.Location = new System.Drawing.Point(197, 86);\n            this.label3.Name = \"label3\";\n            this.label3.Size = new System.Drawing.Size(12, 12);\n            this.label3.TabIndex = 7;\n            this.label3.Text = \"Y\";\n            // \n            // numFixedY\n            // \n            this.numFixedY.Location = new System.Drawing.Point(215, 84);\n            this.numFixedY.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numFixedY.Name = \"numFixedY\";\n            this.numFixedY.Size = new System.Drawing.Size(120, 19);\n            this.numFixedY.TabIndex = 6;\n            this.numFixedY.ValueChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // label2\n            // \n            this.label2.AutoSize = true;\n            this.label2.Location = new System.Drawing.Point(27, 86);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(12, 12);\n            this.label2.TabIndex = 5;\n            this.label2.Text = \"X\";\n            // \n            // numFixedX\n            // \n            this.numFixedX.Location = new System.Drawing.Point(45, 84);\n            this.numFixedX.Maximum = new decimal(new int[] {\n            1000000,\n            0,\n            0,\n            0});\n            this.numFixedX.Name = \"numFixedX\";\n            this.numFixedX.Size = new System.Drawing.Size(120, 19);\n            this.numFixedX.TabIndex = 4;\n            this.numFixedX.ValueChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // rdbLocationRandomArea\n            // \n            this.rdbLocationRandomArea.AutoSize = true;\n            this.rdbLocationRandomArea.Location = new System.Drawing.Point(6, 109);\n            this.rdbLocationRandomArea.Name = \"rdbLocationRandomArea\";\n            this.rdbLocationRandomArea.Size = new System.Drawing.Size(90, 16);\n            this.rdbLocationRandomArea.TabIndex = 3;\n            this.rdbLocationRandomArea.Text = \"Random area\";\n            this.rdbLocationRandomArea.UseVisualStyleBackColor = true;\n            this.rdbLocationRandomArea.CheckedChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // rdbLocationFixed\n            // \n            this.rdbLocationFixed.AutoSize = true;\n            this.rdbLocationFixed.Location = new System.Drawing.Point(6, 62);\n            this.rdbLocationFixed.Name = \"rdbLocationFixed\";\n            this.rdbLocationFixed.Size = new System.Drawing.Size(95, 16);\n            this.rdbLocationFixed.TabIndex = 2;\n            this.rdbLocationFixed.Text = \"Fixed location\";\n            this.rdbLocationFixed.UseVisualStyleBackColor = true;\n            this.rdbLocationFixed.CheckedChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // rdbLocationRandom\n            // \n            this.rdbLocationRandom.AutoSize = true;\n            this.rdbLocationRandom.Location = new System.Drawing.Point(6, 40);\n            this.rdbLocationRandom.Name = \"rdbLocationRandom\";\n            this.rdbLocationRandom.Size = new System.Drawing.Size(118, 16);\n            this.rdbLocationRandom.TabIndex = 1;\n            this.rdbLocationRandom.Text = \"Random on screen\";\n            this.rdbLocationRandom.UseVisualStyleBackColor = true;\n            this.rdbLocationRandom.CheckedChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // rdbLocationMouse\n            // \n            this.rdbLocationMouse.AutoSize = true;\n            this.rdbLocationMouse.Checked = true;\n            this.rdbLocationMouse.Location = new System.Drawing.Point(6, 18);\n            this.rdbLocationMouse.Name = \"rdbLocationMouse\";\n            this.rdbLocationMouse.Size = new System.Drawing.Size(100, 16);\n            this.rdbLocationMouse.TabIndex = 0;\n            this.rdbLocationMouse.TabStop = true;\n            this.rdbLocationMouse.Text = \"Mouse location\";\n            this.rdbLocationMouse.UseVisualStyleBackColor = true;\n            this.rdbLocationMouse.CheckedChanged += new System.EventHandler(this.LocationHandler);\n            // \n            // statusStrip1\n            // \n            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.tslStatus});\n            this.statusStrip1.Location = new System.Drawing.Point(0, 310);\n            this.statusStrip1.Name = \"statusStrip1\";\n            this.statusStrip1.Size = new System.Drawing.Size(774, 22);\n            this.statusStrip1.TabIndex = 1;\n            this.statusStrip1.Text = \"statusStrip1\";\n            // \n            // tslStatus\n            // \n            this.tslStatus.Name = \"tslStatus\";\n            this.tslStatus.Size = new System.Drawing.Size(279, 17);\n            this.tslStatus.Text = \"Not currently doing much helpful here to be honest\";\n            // \n            // btnSelect\n            // \n            this.btnSelect.Location = new System.Drawing.Point(102, 106);\n            this.btnSelect.Name = \"btnSelect\";\n            this.btnSelect.Size = new System.Drawing.Size(75, 23);\n            this.btnSelect.TabIndex = 16;\n            this.btnSelect.Text = \"Select...\";\n            this.btnSelect.UseVisualStyleBackColor = true;\n            this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);\n            // \n            // MainForm\n            // \n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.ClientSize = new System.Drawing.Size(774, 332);\n            this.Controls.Add(this.statusStrip1);\n            this.Controls.Add(this.grpMain);\n            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\n            this.Name = \"MainForm\";\n            this.Text = \"Auto Clicker\";\n            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);\n            this.Load += new System.EventHandler(this.Form1_Load);\n            this.grpMain.ResumeLayout(false);\n            this.grpClickType.ResumeLayout(false);\n            this.grpClickType.PerformLayout();\n            this.grpControls.ResumeLayout(false);\n            this.grpControls.PerformLayout();\n            this.grpCount.ResumeLayout(false);\n            this.grpCount.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numCount)).EndInit();\n            this.grpDelay.ResumeLayout(false);\n            this.grpDelay.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numDelayFixed)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numDelayRangeMax)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numDelayRangeMin)).EndInit();\n            this.grpLocation.ResumeLayout(false);\n            this.grpLocation.PerformLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomHeight)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomWidth)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomY)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numRandomX)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numFixedY)).EndInit();\n            ((System.ComponentModel.ISupportInitialize)(this.numFixedX)).EndInit();\n            this.statusStrip1.ResumeLayout(false);\n            this.statusStrip1.PerformLayout();\n            this.ResumeLayout(false);\n            this.PerformLayout();\n\n        }\n\n        #endregion\n\n        private System.Windows.Forms.GroupBox grpMain;\n        private System.Windows.Forms.GroupBox grpClickType;\n        private System.Windows.Forms.GroupBox grpControls;\n        private System.Windows.Forms.Button btnHotkeyRemove;\n        private System.Windows.Forms.TextBox txtHotkey;\n        private System.Windows.Forms.GroupBox grpCount;\n        private System.Windows.Forms.Label label1;\n        private System.Windows.Forms.NumericUpDown numCount;\n        private System.Windows.Forms.RadioButton rdbCount;\n        private System.Windows.Forms.RadioButton rdbUntilStopped;\n        private System.Windows.Forms.GroupBox grpDelay;\n        private System.Windows.Forms.Label label10;\n        private System.Windows.Forms.Label label9;\n        private System.Windows.Forms.NumericUpDown numDelayFixed;\n        private System.Windows.Forms.Label label8;\n        private System.Windows.Forms.NumericUpDown numDelayRangeMax;\n        private System.Windows.Forms.NumericUpDown numDelayRangeMin;\n        private System.Windows.Forms.RadioButton rdbDelayRange;\n        private System.Windows.Forms.RadioButton rdbDelayFixed;\n        private System.Windows.Forms.GroupBox grpLocation;\n        private System.Windows.Forms.Label label6;\n        private System.Windows.Forms.NumericUpDown numRandomHeight;\n        private System.Windows.Forms.Label label7;\n        private System.Windows.Forms.NumericUpDown numRandomWidth;\n        private System.Windows.Forms.Label label4;\n        private System.Windows.Forms.NumericUpDown numRandomY;\n        private System.Windows.Forms.Label label5;\n        private System.Windows.Forms.NumericUpDown numRandomX;\n        private System.Windows.Forms.Label label3;\n        private System.Windows.Forms.NumericUpDown numFixedY;\n        private System.Windows.Forms.Label label2;\n        private System.Windows.Forms.NumericUpDown numFixedX;\n        private System.Windows.Forms.RadioButton rdbLocationRandomArea;\n        private System.Windows.Forms.RadioButton rdbLocationFixed;\n        private System.Windows.Forms.RadioButton rdbLocationRandom;\n        private System.Windows.Forms.RadioButton rdbLocationMouse;\n        private System.Windows.Forms.RadioButton rdbClickDoubleRight;\n        private System.Windows.Forms.RadioButton rdbClickDoubleMiddle;\n        private System.Windows.Forms.RadioButton rdbClickDoubleLeft;\n        private System.Windows.Forms.RadioButton rdbClickSingleRight;\n        private System.Windows.Forms.RadioButton rdbClickSingleMiddle;\n        private System.Windows.Forms.RadioButton rdbClickSingleLeft;\n        private System.Windows.Forms.StatusStrip statusStrip1;\n        private System.Windows.Forms.ToolStripStatusLabel tslStatus;\n        private System.Windows.Forms.Button btnToggle;\n        private System.Windows.Forms.Label label11;\n        private System.Windows.Forms.Button btnSelect;\n    }\n}\n\n"
  },
  {
    "path": "AutoClicker/MainForm.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace AutoClicker\n{\n    public partial class MainForm : Form\n    {\n        private AutoClicker clicker;\n        private Keys hotkey;\n        private Win32.fsModifiers hotkeyNodifiers;\n\n        private Thread countdownThread;\n\n        public MainForm()\n        {\n            InitializeComponent();\n        }\n\n        private void SaveSettings()\n        {\n            using (FileStream fs = File.Open(\"settings.dat\", FileMode.Create))\n            {\n                using (BinaryWriter w = new BinaryWriter(fs))\n                {\n                    // Button type.\n                    if (rdbClickSingleLeft.Checked)\n                    {\n                        w.Write((byte)1);\n                    }\n                    else if (rdbClickSingleMiddle.Checked)\n                    {\n                        w.Write((byte)2);\n                    }\n                    else if (rdbClickSingleRight.Checked)\n                    {\n                        w.Write((byte)3);\n                    }\n                    else if (rdbClickDoubleLeft.Checked)\n                    {\n                        w.Write((byte)4);\n                    }\n                    else if (rdbClickDoubleMiddle.Checked)\n                    {\n                        w.Write((byte)5);\n                    }\n                    else if (rdbClickDoubleRight.Checked)\n                    {\n                        w.Write((byte)6);\n                    }\n\n                    // Location info\n                    if (rdbLocationFixed.Checked)\n                    {\n                        w.Write((byte)1);\n                    }\n                    else if (rdbLocationMouse.Checked)\n                    {\n                        w.Write((byte)2);\n                    }\n                    else if (rdbLocationRandom.Checked)\n                    {\n                        w.Write((byte)3);\n                    }\n                    else if (rdbLocationRandomArea.Checked)\n                    {\n                        w.Write((byte)4);\n                    }\n\n                    w.Write((int)numFixedX.Value);\n                    w.Write((int)numFixedY.Value);\n                    w.Write((int)numRandomX.Value);\n                    w.Write((int)numRandomY.Value);\n                    w.Write((int)numRandomWidth.Value);\n                    w.Write((int)numRandomHeight.Value);\n\n                    // Delay info\n                    if (rdbDelayFixed.Checked)\n                    {\n                        w.Write((byte)1);\n                    }\n                    else if (rdbDelayRange.Checked)\n                    {\n                        w.Write((byte)2);\n                    }\n\n                    w.Write((int)numDelayFixed.Value);\n                    w.Write((int)numDelayRangeMin.Value);\n                    w.Write((int)numDelayRangeMax.Value);\n\n                    // Count info\n                    if (rdbCount.Checked)\n                    {\n                        w.Write((byte)1);\n                    }\n                    else if (rdbUntilStopped.Checked)\n                    {\n                        w.Write((byte)2);\n                    }\n\n                    w.Write((int)numCount.Value);\n\n                    // Hotkey info\n                    w.Write((int)hotkey);\n                }\n            }\n        }\n\n        private void LoadSettings()\n        {\n            if (File.Exists(\"settings.dat\"))\n            {\n                using (FileStream fs = File.Open(\"settings.dat\", FileMode.Open))\n                {\n                    using (BinaryReader r = new BinaryReader(fs))\n                    {\n                        byte buttonType = r.ReadByte();\n\n                        byte locationType = r.ReadByte();\n                        int fixedX = r.ReadInt32();\n                        int fixedY = r.ReadInt32();\n                        int randomX = r.ReadInt32();\n                        int randomY = r.ReadInt32();\n                        int randomWidth = r.ReadInt32();\n                        int randomHeight = r.ReadInt32();\n\n                        byte delayType = r.ReadByte();\n                        int fixedDelay = r.ReadInt32();\n                        int rangeDelayMin = r.ReadInt32();\n                        int rangeDelayMax = r.ReadInt32();\n\n                        byte countType = r.ReadByte();\n                        int count = r.ReadInt32();\n\n                        hotkey = (Keys)r.ReadInt32();\n\n                        switch (buttonType)\n                        {\n                            case 1:\n                                rdbClickSingleLeft.Checked = true;\n                                break;\n                            case 2:\n                                rdbClickSingleMiddle.Checked = true;\n                                break;\n                            case 3:\n                                rdbClickSingleRight.Checked = true;\n                                break;\n                            case 4:\n                                rdbClickDoubleLeft.Checked = true;\n                                break;\n                            case 5:\n                                rdbClickDoubleMiddle.Checked = true;\n                                break;\n                            case 6:\n                                rdbClickDoubleRight.Checked = true;\n                                break;\n                        }\n\n                        switch (locationType)\n                        {\n                            case 1:\n                                rdbLocationFixed.Checked = true;\n                                break;\n                            case 2:\n                                rdbLocationMouse.Checked = true;\n                                break;\n                            case 3:\n                                rdbLocationRandom.Checked = true;\n                                break;\n                            case 4:\n                                rdbLocationRandomArea.Checked = true;\n                                break;\n                        }\n\n                        numFixedX.Value = fixedX;\n                        numFixedY.Value = fixedY;\n                        numRandomX.Value = randomX;\n                        numRandomY.Value = randomY;\n                        numRandomWidth.Value = randomWidth;\n                        numRandomHeight.Value = randomHeight;\n\n                        switch (delayType)\n                        {\n                            case 1:\n                                rdbDelayFixed.Checked = true;\n                                break;\n                            case 2:\n                                rdbDelayRange.Checked = true;\n                                break;\n                        }\n\n                        numDelayFixed.Value = fixedDelay;\n                        numDelayRangeMin.Value = rangeDelayMin;\n                        numDelayRangeMax.Value = rangeDelayMax;\n\n                        switch (countType)\n                        {\n                            case 1:\n                                rdbCount.Checked = true;\n                                break;\n                            case 2:\n                                rdbUntilStopped.Checked = true;\n                                break;\n                        }\n\n                        numCount.Value = count;\n\n                        if (hotkey != Keys.None)\n                        {\n                            var hotkeyModifiers = hotkey & Keys.Modifiers;\n                            hotkeyNodifiers = 0;\n                            if ((hotkeyModifiers & Keys.Shift) != 0)\n                            {\n                                hotkeyNodifiers |= Win32.fsModifiers.Shift;\n                            }\n                            if ((hotkeyModifiers & Keys.Control) != 0)\n                            {\n                                hotkeyNodifiers |= Win32.fsModifiers.Control;\n                            }\n                            if ((hotkeyModifiers & Keys.Alt) != 0)\n                            {\n                                hotkeyNodifiers |= Win32.fsModifiers.Alt;\n                            }\n\n                            SetHotkey();\n                        }\n                    }\n                }\n            }\n        }\n\n        private void Form1_Load(object sender, EventArgs e)\n        {\n            clicker = new AutoClicker();\n            LoadSettings();\n            ClickTypeHandler(null, null);\n            LocationHandler(null, null);\n            DelayHandler(null, null);\n            CountHandler(null, null);\n\n            clicker.NextClick += HandleNextClick;\n            clicker.Finished += HandleFinished;\n        }\n\n        private void HandleNextClick(object sender, AutoClicker.NextClickEventArgs e)\n        {\n            if (countdownThread == null)\n            {\n                countdownThread = new Thread(() => CountDown(e.NextClick));\n                countdownThread.Start();\n            }\n            else\n            {\n                countdownThread.Abort();\n                countdownThread = new Thread(() => CountDown(e.NextClick));\n                countdownThread.Start();\n            }\n\n            \n        }\n\n        private void HandleFinished(object sender, EventArgs e)\n        {\n            EnableControls();\n        }\n\n        private void CountDown(int Milliseconds)\n        {\n            for (int i = 0; i < Milliseconds; i += 10)\n            {\n                tslStatus.Text = string.Format(\"Next click: {0}ms\", Milliseconds - i);\n                Thread.Sleep(9);\n            }\n        }\n\n        private void ClickTypeHandler(object sender, EventArgs e)\n        {\n            AutoClicker.ButtonType buttonType;\n            bool doubleClick = false;\n\n            if (rdbClickSingleLeft.Checked || rdbClickDoubleLeft.Checked)\n            {\n                buttonType = AutoClicker.ButtonType.Left;\n            }\n            else if (rdbClickSingleMiddle.Checked || rdbClickDoubleMiddle.Checked)\n            {\n                buttonType = AutoClicker.ButtonType.Middle;\n            }\n            else\n            {\n                buttonType = AutoClicker.ButtonType.Right;\n            }\n\n            if (rdbClickDoubleLeft.Checked || rdbClickDoubleMiddle.Checked || rdbClickDoubleRight.Checked)\n            {\n                doubleClick = true;\n            }\n\n            clicker.UpdateButton(buttonType, doubleClick);\n        }\n\n        private void LocationHandler(object sender, EventArgs e)\n        {\n            AutoClicker.LocationType locationType;\n            int x = -1;\n            int y = -1;\n            int width = -1;\n            int height = -1;\n\n            if (rdbLocationFixed.Checked)\n            {\n                locationType = AutoClicker.LocationType.Fixed;\n                x = (int)numFixedX.Value;\n                y = (int)numFixedY.Value;\n            }\n            else if (rdbLocationMouse.Checked)\n            {\n                locationType = AutoClicker.LocationType.Cursor;\n            }\n            else if (rdbLocationRandom.Checked)\n            {\n                locationType = AutoClicker.LocationType.Random;\n            }\n            else\n            {\n                locationType = AutoClicker.LocationType.RandomRange;\n                x = (int)numRandomX.Value;\n                y = (int)numRandomY.Value;\n                width = (int)numRandomWidth.Value;\n                height = (int)numRandomHeight.Value;\n            }\n\n            // Toggle visibility of controls.\n            if (locationType == AutoClicker.LocationType.Fixed)\n            {\n                numFixedX.Enabled = true;\n                numFixedY.Enabled = true;\n            }\n            else\n            {\n                numFixedX.Enabled = false;\n                numFixedY.Enabled = false;\n            }\n\n            if (locationType == AutoClicker.LocationType.RandomRange)\n            {\n                numRandomX.Enabled = true;\n                numRandomY.Enabled = true;\n                numRandomWidth.Enabled = true;\n                numRandomHeight.Enabled = true;\n                btnSelect.Enabled = true;\n            }\n            else\n            {\n                numRandomX.Enabled = false;\n                numRandomY.Enabled = false;\n                numRandomWidth.Enabled = false;\n                numRandomHeight.Enabled = false;\n                btnSelect.Enabled = false;\n            }\n\n            clicker.UpdateLocation(locationType, x, y, width, height);\n        }\n\n        private void DelayHandler(object sender, EventArgs e)\n        {\n            AutoClicker.DelayType delayType;\n            int delay = -1;\n            int delayRange = -1;\n\n            if (rdbDelayFixed.Checked)\n            {\n                delayType = AutoClicker.DelayType.Fixed;\n                delay = (int)numDelayFixed.Value;\n            }\n            else\n            {\n                delayType = AutoClicker.DelayType.Range;\n                delay = (int)numDelayRangeMin.Value;\n                delayRange = (int)numDelayRangeMax.Value;\n            }\n\n            // Toggle visibility of controls.\n            if (delayType == AutoClicker.DelayType.Fixed)\n            {\n                numDelayFixed.Enabled = true;\n                numDelayRangeMax.Enabled = false;\n                numDelayRangeMin.Enabled = false;\n            }\n            else\n            {\n                numDelayFixed.Enabled = false;\n                numDelayRangeMax.Enabled = true;\n                numDelayRangeMin.Enabled = true;\n            }\n\n            clicker.UpdateDelay(delayType, delay, delayRange);\n        }\n\n        private void CountHandler(object sender, EventArgs e)\n        {\n            AutoClicker.CountType countType;\n            int count = -1;\n\n            if (rdbCount.Checked)\n            {\n                countType = AutoClicker.CountType.Fixed;\n                count = (int)numCount.Value;\n            }\n            else\n            {\n                countType = AutoClicker.CountType.UntilStopped;\n            }\n\n            // Toggle visibility of controls.\n            if (countType == AutoClicker.CountType.Fixed)\n            {\n                numCount.Enabled = true;\n            }\n            else\n            {\n                numCount.Enabled = false;\n            }\n\n            clicker.UpdateCount(countType, count);\n        }\n\n        private void btnHotkeyRemove_Click(object sender, EventArgs e)\n        {\n            UnsetHotkey();\n        }\n\n        private void btnToggle_Click(object sender, EventArgs e)\n        {\n            if (!clicker.IsAlive)\n            {\n                clicker.Start();\n                DisableControls();\n            }\n            else\n            {\n                clicker.Stop();\n                countdownThread.Abort();\n                EnableControls();\n            }\n        }\n\n        delegate void SetEnabledCallback(Control Control, bool Enabled);\n        private void SetEnabled(Control Control, bool Enabled)\n        {\n            if (Control.InvokeRequired)\n            {\n                var d = new SetEnabledCallback(SetEnabled);\n                this.Invoke(d, Control, Enabled);\n            }\n            else\n            {\n                Control.Enabled = Enabled;\n            }\n        }\n\n        delegate void SetButtonTextCallback(Button Control, string Text);\n        private void SetButtonText(Button Control, string Text)\n        {\n            if (Control.InvokeRequired)\n            {\n                var d = new SetButtonTextCallback(SetButtonText);\n                this.Invoke(d, Control, Text);\n            }\n            else\n            {\n                Control.Text = Text;\n            }\n        }\n\n        private void EnableControls()\n        {\n            tslStatus.Text = \"Not currently doing much helpful here to be honest\";\n            SetEnabled(grpClickType, true);\n            SetEnabled(grpLocation, true);\n            SetEnabled(grpDelay, true);\n            SetEnabled(grpCount, true);\n            SetButtonText(btnToggle, \"Start\");\n            //grpClickType.Enabled = true;\n            //grpLocation.Enabled = true;\n            //grpDelay.Enabled = true;\n            //grpCount.Enabled = true;\n            //btnToggle.Text = \"Start\";\n        }\n\n        private void DisableControls()\n        {\n            SetEnabled(grpClickType, false);\n            SetEnabled(grpLocation, false);\n            SetEnabled(grpDelay, false);\n            SetEnabled(grpCount, false);\n            SetButtonText(btnToggle, \"Stop\");\n            //grpClickType.Enabled = false;\n            //grpLocation.Enabled = false;\n            //grpDelay.Enabled = false;\n            //grpCount.Enabled = false;\n            //btnToggle.Text = \"Stop\";\n        }\n\n        protected override void WndProc(ref Message m)\n        {\n            base.WndProc(ref m);\n\n            if (m.Msg == Win32.WM_HOTKEY)\n            {\n                // Ignore the hotkey if the user is editing it.\n                if (txtHotkey.Focused)\n                {\n                    return;\n                }\n\n                Win32.fsModifiers modifiers = (Win32.fsModifiers)((int)m.LParam & 0xFFFF);\n                Keys key = (Keys)(((int)m.LParam >> 16) & 0xFFFF);\n                if (key == (hotkey & Keys.KeyCode) && modifiers == hotkeyNodifiers)\n                {\n                    btnToggle_Click(null, null);\n                }\n            }\n        }\n\n        private void txtHotkey_KeyDown(object sender, KeyEventArgs e)\n        {\n            e.SuppressKeyPress = true;\n            // Don't want to do anything if only a modifier key is pressed.\n            //     Modifiers                                 Asian keys (kana, hanja, kanji etc)       IME related keys (convert etc)           Korean alt (process)  Windows keys\n            if (!((e.KeyValue >= 16 && e.KeyValue <= 18) || (e.KeyValue >= 21 && e.KeyValue <= 25) || (e.KeyValue >= 28 && e.KeyValue <= 31) || e.KeyValue == 229 || (e.KeyValue >= 91 && e.KeyValue <= 92)))\n            {\n                Win32.UnregisterHotKey(this.Handle, (int)hotkey);\n                hotkey = e.KeyData;\n                // Extract modifiers\n                hotkeyNodifiers = 0;\n                if ((e.Modifiers & Keys.Shift) != 0)\n                {\n                    hotkeyNodifiers |= Win32.fsModifiers.Shift;\n                }\n                if ((e.Modifiers & Keys.Control) != 0)\n                {\n                    hotkeyNodifiers |= Win32.fsModifiers.Control;\n                }\n                if ((e.Modifiers & Keys.Alt) != 0)\n                {\n                    hotkeyNodifiers |= Win32.fsModifiers.Alt;\n                }\n\n                SetHotkey();\n            }\n        }\n\n        private void SetHotkey()\n        {\n            txtHotkey.Text = KeysConverter.Convert(hotkey);\n            Win32.RegisterHotKey(this.Handle, (int)hotkey, (uint)hotkeyNodifiers, (uint)(hotkey & Keys.KeyCode));\n            btnHotkeyRemove.Enabled = true;\n        }\n\n        private void UnsetHotkey()\n        {\n            Win32.UnregisterHotKey(this.Handle, (int)hotkey);\n            btnHotkeyRemove.Enabled = false;\n        }\n\n        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)\n        {\n            SaveSettings();\n        }\n\n        public void SendRectangle(int X, int Y, int Width, int Height)\n        {\n            numRandomX.Value = X;\n            numRandomY.Value = Y;\n            numRandomWidth.Value = Width;\n            numRandomHeight.Value = Height;\n        }\n\n        private void btnSelect_Click(object sender, EventArgs e)\n        {\n            var form = new SelectionForm(this);\n            form.Show();\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/MainForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"statusStrip1.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "AutoClicker/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace AutoClicker\n{\n    static class Program\n    {\n        /// <summary>\n        /// The main entry point for the application.\n        /// </summary>\n        [STAThread]\n        static void Main()\n        {\n            Application.EnableVisualStyles();\n            Application.SetCompatibleTextRenderingDefault(false);\n            Application.Run(new MainForm());\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"AutoClicker\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"AutoClicker\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2015\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"e9f5559c-e09d-4caf-b8c7-3d255d804b28\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "AutoClicker/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace AutoClicker.Properties {\n    using System;\n    \n    \n    /// <summary>\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\n    /// </summary>\n    // This class was auto-generated by the StronglyTypedResourceBuilder\n    // class via a tool like ResGen or Visual Studio.\n    // To add or remove a member, edit your .ResX file then rerun ResGen\n    // with the /str option, or rebuild your VS project.\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    internal class Resources {\n        \n        private static global::System.Resources.ResourceManager resourceMan;\n        \n        private static global::System.Globalization.CultureInfo resourceCulture;\n        \n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n        internal Resources() {\n        }\n        \n        /// <summary>\n        ///   Returns the cached ResourceManager instance used by this class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Resources.ResourceManager ResourceManager {\n            get {\n                if (object.ReferenceEquals(resourceMan, null)) {\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"AutoClicker.Properties.Resources\", typeof(Resources).Assembly);\n                    resourceMan = temp;\n                }\n                return resourceMan;\n            }\n        }\n        \n        /// <summary>\n        ///   Overrides the current thread's CurrentUICulture property for all\n        ///   resource lookups using this strongly typed resource class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Globalization.CultureInfo Culture {\n            get {\n                return resourceCulture;\n            }\n            set {\n                resourceCulture = value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n</root>"
  },
  {
    "path": "AutoClicker/Properties/Settings.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace AutoClicker.Properties {\n    \n    \n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"14.0.0.0\")]\n    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n        \n        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n        \n        public static Settings Default {\n            get {\n                return defaultInstance;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/Properties/Settings.settings",
    "content": "﻿<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\" CurrentProfile=\"(Default)\">\n  <Profiles>\n    <Profile Name=\"(Default)\" />\n  </Profiles>\n  <Settings />\n</SettingsFile>\n"
  },
  {
    "path": "AutoClicker/SelectionForm.Designer.cs",
    "content": "﻿namespace AutoClicker\n{\n    partial class SelectionForm\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.SuspendLayout();\n            // \n            // SelectionForm\n            // \n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.BackColor = System.Drawing.SystemColors.MenuHighlight;\n            this.ClientSize = new System.Drawing.Size(284, 261);\n            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;\n            this.Name = \"SelectionForm\";\n            this.Opacity = 0.1D;\n            this.Text = \"SelectionForm\";\n            this.ResumeLayout(false);\n\n        }\n\n        #endregion\n    }\n}"
  },
  {
    "path": "AutoClicker/SelectionForm.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\n\nnamespace AutoClicker\n{\n    public partial class SelectionForm : Form\n    {\n        public bool LeftButtonDown = false;\n        public bool RectangleDrawn = false;\n        public bool ReadyToDrag = false;\n\n        public Point ClickPoint = new Point();\n        public Point CurrentTopLeft = new Point();\n        public Point CurrentBottomRight = new Point();\n        public Point DragClickRelative = new Point();\n\n        public int RectangleHeight = new int();\n        public int RectangleWidth = new int();\n\n        Graphics g;\n        Pen BlackPen = new Pen(Color.Black, 1);\n        SolidBrush TransparentBrush = new SolidBrush(Color.White);\n        Pen EraserPen = new Pen(Color.FromArgb(051, 153, 255), 1);\n        SolidBrush EraserBrush = new SolidBrush(Color.FromArgb(051, 153, 255));\n\n        private MainForm instanceRef = null;\n        public MainForm InstanceRef\n        {\n            get\n            {\n                return instanceRef;\n            }\n            set\n            {\n                instanceRef = value;\n            }\n        }\n\n        public SelectionForm(MainForm instanceRef)\n        {\n            InitializeComponent();\n            InstanceRef = instanceRef;\n            this.MouseDown += HandleMouseClick;\n            this.MouseMove += HandleMouseMove;\n            this.MouseUp += HandleMouseUp;\n\n            this.Left = 0;\n            this.Top = 0;\n            var width = 0;\n            var height = 0;\n            var screens = Screen.AllScreens;\n            foreach (var screen in screens)\n            {\n                if (screen.Bounds.Height > height)\n                {\n                    height = screen.Bounds.Height;\n                }\n                width += screen.Bounds.Width;\n            }\n\n            this.Width = width;\n            this.Height = height;\n\n            g = this.CreateGraphics();\n        }\n\n        private void HandleMouseClick(object sender, MouseEventArgs e)\n        {\n            if (e.Button == MouseButtons.Left)\n            {\n                ClickPoint = new Point(MousePosition.X, MousePosition.Y);\n                LeftButtonDown = true;\n            }\n        }\n\n        private void HandleMouseUp(object sender, MouseEventArgs e)\n        {\n            instanceRef.SendRectangle(CurrentTopLeft.X, CurrentTopLeft.Y, CurrentBottomRight.X - CurrentTopLeft.X, CurrentBottomRight.Y - CurrentTopLeft.Y);\n            this.Close();\n        }\n\n        private void HandleMouseMove(object sender, MouseEventArgs e)\n        {\n            if (LeftButtonDown)\n            {\n                DrawSelection();\n            }\n        }\n\n        private void DrawSelection()\n        {\n            //Erase the previous rectangle\n            g.DrawRectangle(EraserPen, CurrentTopLeft.X, CurrentTopLeft.Y, CurrentBottomRight.X - CurrentTopLeft.X, CurrentBottomRight.Y - CurrentTopLeft.Y);\n\n            //Calculate X Coordinates\n            if (Cursor.Position.X < ClickPoint.X)\n            {\n                CurrentTopLeft.X = Cursor.Position.X;\n                CurrentBottomRight.X = ClickPoint.X;\n            }\n            else\n            {\n                CurrentTopLeft.X = ClickPoint.X;\n                CurrentBottomRight.X = Cursor.Position.X;\n            }\n\n            //Calculate Y Coordinates\n            if (Cursor.Position.Y < ClickPoint.Y)\n            {\n                CurrentTopLeft.Y = Cursor.Position.Y;\n                CurrentBottomRight.Y = ClickPoint.Y;\n            }\n            else\n            {\n                CurrentTopLeft.Y = ClickPoint.Y;\n                CurrentBottomRight.Y = Cursor.Position.Y;\n            }\n\n            //Draw a new rectangle\n            g.DrawRectangle(BlackPen, CurrentTopLeft.X, CurrentTopLeft.Y, CurrentBottomRight.X - CurrentTopLeft.X, CurrentBottomRight.Y - CurrentTopLeft.Y);\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker/SelectionForm.resx",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n</root>"
  },
  {
    "path": "AutoClicker/Win32.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace AutoClicker\n{\n    public class Win32\n    {\n        public const int WM_HOTKEY = 0x0312;\n\n        public enum SendInputEventType\n        {\n            InputMouse    = 0x0000,\n            InputKeyboard = 0x0001\n        }\n\n        public enum MouseEventFlags\n        {\n            Move       = 0x0001,\n            LeftDown   = 0x0002,\n            LeftUp     = 0x0004,\n            RightDown  = 0x0008,\n            RightUp    = 0x0010,\n            MiddleDown = 0x0020,\n            MiddleUp   = 0x0040,\n            Wheel      = 0x0080,\n            XDown      = 0x0100,\n            XUp        = 0x0200,\n            Absolute   = 0x8000\n        }\n\n        public enum SystemMetric\n        {\n            CXScreen = 0x0000,\n            CYScreen = 0x0001,\n        }\n\n        public enum fsModifiers : uint\n        {\n            Alt = 0x0001,\n            Control = 0x0002,\n            Shift = 0x0004,\n            Windows = 0x0008,\n            NoRepeat = 0x4000\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct INPUT\n        {\n            public SendInputEventType type; // 0 = INPUT_MOUSE(デフォルト), 1 = INPUT_KEYBOARD \n            public MOUSEINPUT         mi;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct MOUSEINPUT\n        {\n            public int             dx;\n            public int             dy;\n            public int             mouseData;\n            public MouseEventFlags dwFlags;\n            public int             time;\n            public IntPtr          dwExtraInfo;\n        }\n\n        [DllImport(\"user32.dll\")]\n        public static extern bool UnregisterHotKey(IntPtr hWnd, int id);\n        [DllImport(\"user32.dll\")]\n        public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);\n        [DllImport(\"user32.dll\")]\n        public static extern uint SendInput(\n                uint nInputs,    // INPUT 構造体の数(イベント数)\n                INPUT[] pInputs, // INPUT 構造体\n                int cbSize       // INPUT 構造体のサイズ\n        );\n\n        [DllImport(\"user32.dll\")]\n        public static extern int GetSystemMetrics(SystemMetric smIndex);\n\n        public static int CalculateAbsoluteCoordinateX(int x)\n        {\n            return (x * 65536) / GetSystemMetrics(SystemMetric.CXScreen);\n        }\n\n        public static int CalculateAbsoluteCoordinateY(int y)\n        {\n            return (y * 65536) / GetSystemMetrics(SystemMetric.CYScreen);\n        }\n    }\n}\n"
  },
  {
    "path": "AutoClicker.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.24720.0\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"AutoClicker\", \"AutoClicker\\AutoClicker.csproj\", \"{E9F5559C-E09D-4CAF-B8C7-3D255D804B28}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{E9F5559C-E09D-4CAF-B8C7-3D255D804B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{E9F5559C-E09D-4CAF-B8C7-3D255D804B28}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{E9F5559C-E09D-4CAF-B8C7-3D255D804B28}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{E9F5559C-E09D-4CAF-B8C7-3D255D804B28}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 helifreak\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# Auto Clicker\nAutomatically clicks the mouse for you.\n\n# Features\n- Click where the cursor is, a specfied point, inside a box or just somewhere on the screen.\n- Change interval or choose a random interval range.\n- Left, Right, and MIDDLE clicks. Double click supported.\n- Continue until stopped or after a number of clicks.\n- Hotkey support with almost every key + Shift, Control, and Alt modifiers.\n- Costs less than what I cloned."
  }
]