Skip to content

Commit c33ea0e

Browse files
committed
SimpleClickBot v.1.0
1 parent 569dbd7 commit c33ea0e

File tree

13 files changed

+657
-0
lines changed

13 files changed

+657
-0
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

SimpleClickBot/SimpleClickBot.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.16
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleClickBot", "SimpleClickBot\SimpleClickBot.csproj", "{ADA26A8D-028B-4634-88AF-53E67D7A561D}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{ADA26A8D-028B-4634-88AF-53E67D7A561D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{ADA26A8D-028B-4634-88AF-53E67D7A561D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{ADA26A8D-028B-4634-88AF-53E67D7A561D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{ADA26A8D-028B-4634-88AF-53E67D7A561D}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<configSections>
4+
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
5+
<section name="SimpleClickBot.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
6+
</sectionGroup>
7+
</configSections>
8+
<startup>
9+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
10+
</startup>
11+
<userSettings>
12+
<SimpleClickBot.Properties.Settings>
13+
<setting name="SettingDelay" serializeAs="String">
14+
<value>0</value>
15+
</setting>
16+
<setting name="SettingTriggerKey" serializeAs="String">
17+
<value>A</value>
18+
</setting>
19+
</SimpleClickBot.Properties.Settings>
20+
</userSettings>
21+
</configuration>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="SimpleClickBot.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:SimpleClickBot"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace SimpleClickBot
10+
{
11+
/// <summary>
12+
/// Interaktionslogik für "App.xaml"
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Window x:Name="MainWindow1" x:Class="SimpleClickBot.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:SimpleClickBot"
7+
mc:Ignorable="d"
8+
Title="EasyClickBot" Height="200" Width="143" ResizeMode="NoResize" AllowsTransparency="True" Loaded="Window_Loaded" Opacity="{Binding Value, ElementName=sliderOpacity}" WindowStyle="None" Background="#FFEAEAEA" Topmost="{Binding IsChecked, ElementName=checkOnTop}">
9+
<Canvas Background="Transparent" MouseDown="Window_MouseDown">
10+
<ComboBox x:Name="comboKey" Canvas.Left="10" Canvas.Top="31" Width="120" IsReadOnly="True" SelectionChanged="comboKey_SelectionChanged"/>
11+
<TextBlock Canvas.Left="10" TextWrapping="Wrap" Text="Trigger Key:" Canvas.Top="10"/>
12+
<Slider x:Name="sliderOpacity" Canvas.Left="10" Canvas.Right="10" Canvas.Top="169" Width="120" SmallChange="1" Maximum="1" LargeChange="0.1" Value="1"/>
13+
<TextBlock Canvas.Left="10" TextWrapping="Wrap" Canvas.Top="65" Text="Delay:"/>
14+
<TextBox x:Name="txtDelay" Height="23" Canvas.Left="10" TextWrapping="Wrap" Canvas.Top="86" Width="120" PreviewTextInput="txtDelay_PreviewTextInput" TextChanged="txtDelay_TextChanged"/>
15+
<TextBlock Canvas.Left="10" TextWrapping="Wrap" Text="Opacity:" Canvas.Top="148"/>
16+
<Button x:Name="btnClose" Canvas.Left="118" Height="25" Width="25" Content="X" FontWeight="Bold" FontSize="14" HorizontalAlignment="Center" VerticalAlignment="Center" Click="btnClose_Click" Background="#FFFF6565"/>
17+
<CheckBox x:Name="checkOnTop" Content="Always on Top" Canvas.Left="10" Canvas.Top="125"/>
18+
</Canvas>
19+
</Window>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
using SimpleClickBot.Properties;
2+
using System;
3+
using System.Runtime.InteropServices;
4+
using System.Windows;
5+
using System.Windows.Controls;
6+
using System.Windows.Forms;
7+
using System.Windows.Input;
8+
using System.Windows.Interop;
9+
10+
namespace SimpleClickBot
11+
{
12+
/// <summary>
13+
/// Interaktionslogik für MainWindow.xaml
14+
/// </summary>
15+
public partial class MainWindow : Window
16+
{
17+
public MainWindow()
18+
{
19+
InitializeComponent();
20+
}
21+
22+
#region Listener
23+
24+
private void Window_Loaded(object sender, RoutedEventArgs e)
25+
{
26+
foreach (Keys key in Enum.GetValues(typeof(Keys)))
27+
{
28+
comboKey.Items.Add(key);
29+
}
30+
31+
comboKey.SelectedItem = Settings.Default.SettingTriggerKey;
32+
txtDelay.Text = Settings.Default.SettingDelay.ToString();
33+
34+
KeyListener.Setup();
35+
ClickBot.Setup();
36+
}
37+
38+
private void txtDelay_PreviewTextInput(object sender, TextCompositionEventArgs e)
39+
{
40+
if (!char.IsDigit(e.Text, e.Text.Length - 1))
41+
e.Handled = true;
42+
}
43+
44+
private void txtDelay_TextChanged(object sender, TextChangedEventArgs e)
45+
{
46+
if (txtDelay.Text != String.Empty)
47+
{
48+
Settings.Default.SettingDelay = int.Parse(((System.Windows.Controls.TextBox)sender).Text);
49+
Settings.Default.Save();
50+
}
51+
}
52+
53+
private void comboKey_SelectionChanged(object sender, SelectionChangedEventArgs e)
54+
{
55+
Settings.Default.SettingTriggerKey = (Keys)comboKey.SelectedItem;
56+
Settings.Default.Save();
57+
}
58+
59+
private void btnClose_Click(object sender, RoutedEventArgs e)
60+
{
61+
Settings.Default.Save();
62+
Environment.Exit(0);
63+
}
64+
65+
private void Window_MouseDown(object sender, MouseButtonEventArgs e)
66+
{
67+
if (e.ChangedButton == MouseButton.Left)
68+
{
69+
ReleaseCapture();
70+
SendMessage(new WindowInteropHelper(this).Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
71+
}
72+
}
73+
74+
#endregion
75+
76+
#region Dlls
77+
78+
private const int WM_NCLBUTTONDOWN = 0xA1;
79+
private const int HT_CAPTION = 0x2;
80+
81+
[DllImport("user32.dll")]
82+
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
83+
[DllImport("user32.dll")]
84+
public static extern bool ReleaseCapture();
85+
86+
#endregion
87+
88+
}
89+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using System.Reflection;
2+
using System.Runtime.InteropServices;
3+
using System.Windows;
4+
5+
// Allgemeine Informationen über eine Assembly werden über die folgenden
6+
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7+
// die einer Assembly zugeordnet sind.
8+
[assembly: AssemblyTitle("SimpleClickBot")]
9+
[assembly: AssemblyDescription("Easy to use mouse Clicker/ClickBot for Windows")]
10+
[assembly: AssemblyConfiguration("GitHub: RaZorfalkon")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("SimpleClickBot")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18+
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19+
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20+
[assembly: ComVisible(false)]
21+
22+
//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
23+
//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei
24+
//in einer <PropertyGroup> fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
25+
//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
26+
//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
27+
//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
28+
29+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
30+
31+
32+
[assembly: ThemeInfo(
33+
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
34+
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
35+
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
36+
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
37+
//(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
38+
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
39+
)]
40+
41+
42+
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
43+
//
44+
// Hauptversion
45+
// Nebenversion
46+
// Buildnummer
47+
// Revision
48+
//
49+
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
50+
// übernehmen, indem Sie "*" eingeben:
51+
// [assembly: AssemblyVersion("1.0.*")]
52+
[assembly: AssemblyVersion("1.0")]
53+
[assembly: AssemblyFileVersion("1.0")]

SimpleClickBot/SimpleClickBot/Properties/Resources.Designer.cs

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)