diff --git a/CC-Clicker 2.0.sln b/CC-Clicker 2.0.sln new file mode 100644 index 0000000..2c96f91 --- /dev/null +++ b/CC-Clicker 2.0.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.539 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CC-Clicker 2.0", "CC-Clicker 2.0\CC-Clicker 2.0.csproj", "{61B4565A-608D-4107-8656-3B24F5C61997}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {61B4565A-608D-4107-8656-3B24F5C61997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61B4565A-608D-4107-8656-3B24F5C61997}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61B4565A-608D-4107-8656-3B24F5C61997}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61B4565A-608D-4107-8656-3B24F5C61997}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1A870E3C-D982-4661-9E25-5A0B54D8160C} + EndGlobalSection +EndGlobal diff --git a/App.config b/CC-Clicker 2.0/App.config similarity index 59% rename from App.config rename to CC-Clicker 2.0/App.config index 56efbc7..bae5d6d 100644 --- a/App.config +++ b/CC-Clicker 2.0/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/CC-Clicker 2.0.csproj b/CC-Clicker 2.0/CC-Clicker 2.0.csproj similarity index 77% rename from CC-Clicker 2.0.csproj rename to CC-Clicker 2.0/CC-Clicker 2.0.csproj index 68f38b5..9808eed 100644 --- a/CC-Clicker 2.0.csproj +++ b/CC-Clicker 2.0/CC-Clicker 2.0.csproj @@ -8,10 +8,11 @@ WinExe CC_Clicker_2._0 CC-Clicker 2.0 - v4.7.2 + v4.6.1 512 true true + AnyCPU @@ -49,16 +50,34 @@ - + Form - - Form1.cs + + MainForm.cs + + + Form + + + LocForm.cs + + + Form + + + OvPForm.cs - - Form1.cs + + LocForm.cs + + + MainForm.cs + + + OvPForm.cs ResXFileCodeGenerator @@ -68,6 +87,7 @@ True Resources.resx + True SettingsSingleFileGenerator diff --git a/C_64.ico b/CC-Clicker 2.0/C_64.ico similarity index 100% rename from C_64.ico rename to CC-Clicker 2.0/C_64.ico diff --git a/CC-Clicker 2.0/LocForm.Designer.cs b/CC-Clicker 2.0/LocForm.Designer.cs new file mode 100644 index 0000000..e967ab1 --- /dev/null +++ b/CC-Clicker 2.0/LocForm.Designer.cs @@ -0,0 +1,54 @@ +namespace CC_Clicker_2._0 +{ + partial class LocForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // LocForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(800, 450); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "LocForm"; + this.Opacity = 0.5D; + this.Text = "LocForm"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LocForm_FormClosing); + this.Load += new System.EventHandler(this.LocForm_Load); + this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.LocForm_MouseClick); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/CC-Clicker 2.0/LocForm.cs b/CC-Clicker 2.0/LocForm.cs new file mode 100644 index 0000000..b269d3d --- /dev/null +++ b/CC-Clicker 2.0/LocForm.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CC_Clicker_2._0 +{ + public partial class LocForm : Form + { + public int X; + public int Y; + public LocForm() => InitializeComponent(); + bool close; + private void LocForm_FormClosing(object sender, FormClosingEventArgs e) => e.Cancel = !close; + + private void LocForm_MouseClick(object sender, MouseEventArgs e) + { + X = Cursor.Position.X; + Y = Cursor.Position.Y; + close = true; + DialogResult = DialogResult.OK; + Close(); + } + + static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); + const uint SWP_NOSIZE = 0x0001; + const uint SWP_NOMOVE = 0x0002; + const uint TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE; + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); + private void LocForm_Load(object sender, EventArgs e) => SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS); + } +} diff --git a/CC-Clicker 2.0/LocForm.resx b/CC-Clicker 2.0/LocForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/CC-Clicker 2.0/LocForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Form1.Designer.cs b/CC-Clicker 2.0/MainForm.Designer.cs similarity index 67% rename from Form1.Designer.cs rename to CC-Clicker 2.0/MainForm.Designer.cs index 7ad1e2a..1b3c3de 100644 --- a/Form1.Designer.cs +++ b/CC-Clicker 2.0/MainForm.Designer.cs @@ -1,6 +1,6 @@ namespace CC_Clicker_2._0 { - partial class Form1 + partial class MainForm { /// /// Required designer variable. @@ -29,14 +29,16 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.clickBox = new System.Windows.Forms.CheckBox(); this.rightBox = new System.Windows.Forms.CheckBox(); this.timeBox = new System.Windows.Forms.TextBox(); this.keyButton = new System.Windows.Forms.Button(); - this.DelmBox = new System.Windows.Forms.CheckBox(); - this.timer1 = new System.Windows.Forms.Timer(this.components); + this.delmBox = new System.Windows.Forms.CheckBox(); + this.timer = new System.Windows.Forms.Timer(this.components); this.delmVal = new System.Windows.Forms.TextBox(); + this.fixBox = new System.Windows.Forms.CheckBox(); + this.fixButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // clickBox @@ -83,19 +85,19 @@ this.keyButton.UseVisualStyleBackColor = false; this.keyButton.Click += new System.EventHandler(this.keyButton_Click); // - // DelmBox + // delmBox // - this.DelmBox.AutoSize = true; - this.DelmBox.Location = new System.Drawing.Point(12, 69); - this.DelmBox.Name = "DelmBox"; - this.DelmBox.Size = new System.Drawing.Size(69, 17); - this.DelmBox.TabIndex = 4; - this.DelmBox.Text = "DelayMix"; - this.DelmBox.UseVisualStyleBackColor = true; + this.delmBox.AutoSize = true; + this.delmBox.Location = new System.Drawing.Point(12, 69); + this.delmBox.Name = "delmBox"; + this.delmBox.Size = new System.Drawing.Size(69, 17); + this.delmBox.TabIndex = 4; + this.delmBox.Text = "DelayMix"; + this.delmBox.UseVisualStyleBackColor = true; // - // timer1 + // timer // - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + this.timer.Tick += new System.EventHandler(this.timer1_Tick); // // delmVal // @@ -107,13 +109,38 @@ this.delmVal.Text = "4"; this.delmVal.TextChanged += new System.EventHandler(this.delmVal_TextChanged); // - // Form1 + // fixBox + // + this.fixBox.AutoSize = true; + this.fixBox.Location = new System.Drawing.Point(12, 97); + this.fixBox.Name = "fixBox"; + this.fixBox.Size = new System.Drawing.Size(79, 17); + this.fixBox.TabIndex = 6; + this.fixBox.Text = "Fix Position"; + this.fixBox.UseVisualStyleBackColor = true; + this.fixBox.CheckedChanged += new System.EventHandler(this.fixBox_CheckedChanged); + // + // fixButton + // + this.fixButton.Location = new System.Drawing.Point(101, 93); + this.fixButton.Name = "fixButton"; + this.fixButton.Size = new System.Drawing.Size(100, 23); + this.fixButton.TabIndex = 7; + this.fixButton.Text = "Set Position"; + this.fixButton.UseVisualStyleBackColor = true; + this.fixButton.Click += new System.EventHandler(this.fixButton_Click); + this.fixButton.MouseEnter += new System.EventHandler(this.fixButton_MouseEnter); + this.fixButton.MouseLeave += new System.EventHandler(this.fixButton_MouseLeave); + // + // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(213, 93); + this.ClientSize = new System.Drawing.Size(213, 126); + this.Controls.Add(this.fixButton); + this.Controls.Add(this.fixBox); this.Controls.Add(this.delmVal); - this.Controls.Add(this.DelmBox); + this.Controls.Add(this.delmBox); this.Controls.Add(this.keyButton); this.Controls.Add(this.timeBox); this.Controls.Add(this.rightBox); @@ -121,9 +148,9 @@ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(229, 132); - this.MinimumSize = new System.Drawing.Size(229, 132); - this.Name = "Form1"; + this.MaximumSize = new System.Drawing.Size(229, 165); + this.MinimumSize = new System.Drawing.Size(229, 165); + this.Name = "MainForm"; this.Text = "CC-Clicker 2.0"; this.Resize += new System.EventHandler(this.Form1_Resize); this.ResumeLayout(false); @@ -137,9 +164,11 @@ private System.Windows.Forms.CheckBox rightBox; private System.Windows.Forms.TextBox timeBox; private System.Windows.Forms.Button keyButton; - private System.Windows.Forms.CheckBox DelmBox; - private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.CheckBox delmBox; + private System.Windows.Forms.Timer timer; private System.Windows.Forms.TextBox delmVal; + private System.Windows.Forms.CheckBox fixBox; + private System.Windows.Forms.Button fixButton; } } diff --git a/Form1.cs b/CC-Clicker 2.0/MainForm.cs similarity index 66% rename from Form1.cs rename to CC-Clicker 2.0/MainForm.cs index 791fb7e..4fba34b 100644 --- a/Form1.cs +++ b/CC-Clicker 2.0/MainForm.cs @@ -3,16 +3,20 @@ using System.Diagnostics; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Drawing; +using System.Threading; #pragma warning disable IDE1006 namespace CC_Clicker_2._0 { - public partial class Form1 : Form + public partial class MainForm : Form { - public Form1() + Point loc = Point.Empty; + OvPForm ov; + public MainForm() { InitializeComponent(); SessionData.keyButton = keyButton; + ov = new OvPForm(loc.X, loc.Y); } public static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) @@ -39,7 +43,7 @@ namespace CC_Clicker_2._0 private void clickBox_CheckedChanged(object sender, EventArgs e) { SessionData.isClicking = false; - timer1.Enabled = clickBox.Checked; + timer.Enabled = clickBox.Checked; } private void textBox1_TextChanged(object sender, EventArgs e) @@ -47,9 +51,10 @@ namespace CC_Clicker_2._0 if (int.TryParse(timeBox.Text, out int re) && re > 0) { SessionData.setDelay = re; - timer1.Interval = re; + timer.Interval = re; timeBox.BackColor = Color.White; - } else + } + else { timeBox.BackColor = Color.Red; } @@ -76,36 +81,62 @@ namespace CC_Clicker_2._0 private void timer1_Tick(object sender, EventArgs e) { - if (SessionData.isClicking) { + if (SessionData.isClicking) + { uint X = (uint)Cursor.Position.X; uint Y = (uint)Cursor.Position.Y; if (rightBox.Checked) mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, X, Y, 0, 0); else mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0); - if (DelmBox.Checked) - timer1.Interval = Math.Max(SessionData.setDelay + (new Random().Next(0, SessionData.delmVal) - (SessionData.delmVal / 2)), 1); + if (delmBox.Checked) + timer.Interval = Math.Max(SessionData.setDelay + (new Random().Next(0, SessionData.delmVal) - (SessionData.delmVal / 2)), 1); + } + } + + private void fixButton_Click(object sender, EventArgs e) + { + ov.Hide(); + LocForm frm = new LocForm(); + if (frm.ShowDialog() == DialogResult.OK) + { + loc = new Point(frm.X, frm.Y); + fixBox.Checked = true; + fixButton.BackColor = Color.Green; + fixButton.Text = loc.ToString(); + } + } + + private void fixBox_CheckedChanged(object sender, EventArgs e) + { + if (loc == Point.Empty) + { + fixBox.Checked = false; + fixButton.BackColor = Color.Red; } } private void Form1_Resize(object sender, EventArgs e) => WindowState = FormWindowState.Normal; + private void fixButton_MouseEnter(object sender, EventArgs e) + { + ov.setPos(loc.X, loc.Y); + ov.Show(); + } - #region DllImports and dummy code + private void fixButton_MouseLeave(object sender, EventArgs e) => ov.Hide(); + #region DllImports [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo); + static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo); public const int MOUSEEVENTF_LEFTDOWN = 0x02; public const int MOUSEEVENTF_LEFTUP = 0x04; public const int MOUSEEVENTF_RIGHTDOWN = 0x08; public const int MOUSEEVENTF_RIGHTUP = 0x10; [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId); + static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool UnhookWindowsHookEx(IntPtr hhk); - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - public static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam); - [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - public static extern IntPtr GetModuleHandle(string lpModuleName); + static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam); + [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + static extern IntPtr GetModuleHandle(string lpModuleName); public static IntPtr SetHook(LowLevelKeyboardProc proc) { using (Process curProcess = Process.GetCurrentProcess()) @@ -116,11 +147,11 @@ namespace CC_Clicker_2._0 } public delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam); - public const int WH_KEYBOARD_LL = 13; - public const int WM_KEYDOWN = 0x0100; + const int WH_KEYBOARD_LL = 13; + const int WM_KEYDOWN = 0x0100; public static LowLevelKeyboardProc _proc = HookCallback; public static IntPtr _hookID = IntPtr.Zero; - public static class SessionData + static class SessionData { public static Button keyButton; public static bool isSettingKey = false; @@ -130,6 +161,5 @@ namespace CC_Clicker_2._0 public static int delmVal = 4; } #endregion - } } diff --git a/Form1.resx b/CC-Clicker 2.0/MainForm.resx similarity index 99% rename from Form1.resx rename to CC-Clicker 2.0/MainForm.resx index 8278307..3dd32a0 100644 --- a/Form1.resx +++ b/CC-Clicker 2.0/MainForm.resx @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 17, 17 diff --git a/CC-Clicker 2.0/OvPForm.Designer.cs b/CC-Clicker 2.0/OvPForm.Designer.cs new file mode 100644 index 0000000..c4d9ad6 --- /dev/null +++ b/CC-Clicker 2.0/OvPForm.Designer.cs @@ -0,0 +1,51 @@ +namespace CC_Clicker_2._0 +{ + partial class OvPForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // OvPForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.ClientSize = new System.Drawing.Size(30, 30); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "OvPForm"; + this.Text = "OvPForm"; + this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.Load += new System.EventHandler(this.OvPForm_Load); + this.Paint += new System.Windows.Forms.PaintEventHandler(this.OvPForm_Paint); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/CC-Clicker 2.0/OvPForm.cs b/CC-Clicker 2.0/OvPForm.cs new file mode 100644 index 0000000..5aa4650 --- /dev/null +++ b/CC-Clicker 2.0/OvPForm.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CC_Clicker_2._0 +{ + public partial class OvPForm : Form + { + public OvPForm(int x, int y) + { + InitializeComponent(); + setPos(x, y); + } + public void setPos(int x, int y) => Location = new Point(x - Width / 2, y - Height / 2); + + private void OvPForm_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawLine(new Pen(Color.Black, 2), Width / 2 - 15, Height / 2, Width / 2 + 15, Height / 2); + e.Graphics.DrawLine(new Pen(Color.Black, 2), Width / 2, Height / 2 - 15, Width / 2, Height / 2 + 15); + } + + static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); + const uint SWP_NOSIZE = 0x0001; + const uint SWP_NOMOVE = 0x0002; + const uint TOPMOST_FLAGS = SWP_NOMOVE | SWP_NOSIZE; + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); + private void OvPForm_Load(object sender, EventArgs e) => SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS); + } +} diff --git a/CC-Clicker 2.0/OvPForm.resx b/CC-Clicker 2.0/OvPForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/CC-Clicker 2.0/OvPForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CC-Clicker 2.0/Program.cs b/CC-Clicker 2.0/Program.cs new file mode 100644 index 0000000..fa6f88d --- /dev/null +++ b/CC-Clicker 2.0/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CC_Clicker_2._0 +{ + static class Program + { + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool UnhookWindowsHookEx(IntPtr hhk); + + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + MainForm._hookID = MainForm.SetHook(MainForm._proc); + Application.Run(new MainForm()); + UnhookWindowsHookEx(MainForm._hookID); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/CC-Clicker 2.0/Properties/AssemblyInfo.cs similarity index 100% rename from Properties/AssemblyInfo.cs rename to CC-Clicker 2.0/Properties/AssemblyInfo.cs diff --git a/Properties/Resources.Designer.cs b/CC-Clicker 2.0/Properties/Resources.Designer.cs similarity index 86% rename from Properties/Resources.Designer.cs rename to CC-Clicker 2.0/Properties/Resources.Designer.cs index d01375b..48e4551 100644 --- a/Properties/Resources.Designer.cs +++ b/CC-Clicker 2.0/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace CC_Clicker_2._0.Properties -{ - - +namespace CC_Clicker_2._0.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,51 +19,43 @@ namespace CC_Clicker_2._0.Properties // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CC_Clicker_2._0.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/Properties/Resources.resx b/CC-Clicker 2.0/Properties/Resources.resx similarity index 100% rename from Properties/Resources.resx rename to CC-Clicker 2.0/Properties/Resources.resx diff --git a/Properties/Settings.Designer.cs b/CC-Clicker 2.0/Properties/Settings.Designer.cs similarity index 82% rename from Properties/Settings.Designer.cs rename to CC-Clicker 2.0/Properties/Settings.Designer.cs index 4c3ade8..a9bb98b 100644 --- a/Properties/Settings.Designer.cs +++ b/CC-Clicker 2.0/Properties/Settings.Designer.cs @@ -8,21 +8,17 @@ // //------------------------------------------------------------------------------ -namespace CC_Clicker_2._0.Properties -{ - - +namespace CC_Clicker_2._0.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Properties/Settings.settings b/CC-Clicker 2.0/Properties/Settings.settings similarity index 100% rename from Properties/Settings.settings rename to CC-Clicker 2.0/Properties/Settings.settings diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8a9fd1b..0000000 --- a/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ - Copyright 2019 CreepyCrafter24 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Program.cs b/Program.cs deleted file mode 100644 index 227d183..0000000 --- a/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace CC_Clicker_2._0 -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Form1._hookID = Form1.SetHook(Form1._proc); - Application.Run(new Form1()); - Form1.UnhookWindowsHookEx(Form1._hookID); - } - } -} diff --git a/README.md b/README.md deleted file mode 100644 index efc5884..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# CC-Clicker 2.0