This commit is contained in:
CreepyCrafter24 2019-11-10 00:28:55 +01:00
parent ba94e7f816
commit f020bd49c1
22 changed files with 633 additions and 130 deletions

25
CC-Clicker 2.0.sln Normal file
View File

@ -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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>
</configuration>

View File

@ -8,10 +8,11 @@
<OutputType>WinExe</OutputType>
<RootNamespace>CC_Clicker_2._0</RootNamespace>
<AssemblyName>CC-Clicker 2.0</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -49,16 +50,34 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="LocForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LocForm.Designer.cs">
<DependentUpon>LocForm.cs</DependentUpon>
</Compile>
<Compile Include="OvPForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OvPForm.Designer.cs">
<DependentUpon>OvPForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
<EmbeddedResource Include="LocForm.resx">
<DependentUpon>LocForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OvPForm.resx">
<DependentUpon>OvPForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@ -68,6 +87,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

54
CC-Clicker 2.0/LocForm.Designer.cs generated Normal file
View File

@ -0,0 +1,54 @@
namespace CC_Clicker_2._0
{
partial class LocForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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
}
}

40
CC-Clicker 2.0/LocForm.cs Normal file
View File

@ -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);
}
}

120
CC-Clicker 2.0/LocForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,6 +1,6 @@
namespace CC_Clicker_2._0
{
partial class Form1
partial class MainForm
{
/// <summary>
/// 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;
}
}

View File

@ -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
}
}

View File

@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

51
CC-Clicker 2.0/OvPForm.Designer.cs generated Normal file
View File

@ -0,0 +1,51 @@
namespace CC_Clicker_2._0
{
partial class OvPForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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
}
}

38
CC-Clicker 2.0/OvPForm.cs Normal file
View File

@ -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);
}
}

120
CC-Clicker 2.0/OvPForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

26
CC-Clicker 2.0/Program.cs Normal file
View File

@ -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);
}
}
}

View File

@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace CC_Clicker_2._0.Properties
{
namespace CC_Clicker_2._0.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@ -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() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[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;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[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;
}
}

View File

@ -8,21 +8,17 @@
// </auto-generated>
//------------------------------------------------------------------------------
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;
}
}

13
LICENSE
View File

@ -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.

View File

@ -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
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1._hookID = Form1.SetHook(Form1._proc);
Application.Run(new Form1());
Form1.UnhookWindowsHookEx(Form1._hookID);
}
}
}

View File

@ -1 +0,0 @@
# CC-Clicker 2.0