Skip to content

Commit

Permalink
Merge pull request #5 from Shinigami92/development
Browse files Browse the repository at this point in the history
Merge development to master for release 1.0.18161.1
  • Loading branch information
Shinigami92 authored Jun 10, 2018
2 parents 81abcc2 + 3809b01 commit 1895797
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 26 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<a name="1.0.18161.1"></a>
# [1.0.18161.1](https://github.com/Shinigami92/Clickami/compare/v1.0.18161.1...v1.0.0) (2018-06-10)

- Added Tooltips

<a name="1.0.0"></a>
# [1.0.0](https://github.com/Shinigami92/Clickami/compare/1.0.0...1.0.0) (2018-06-10)
# [1.0.0](https://github.com/Shinigami92/Clickami/compare/v1.0.0...v1.0.0) (2018-06-10)

Initial Version
- Initial Version
6 changes: 3 additions & 3 deletions Clickami/Hotkeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ internal class Hotkeys
[DllImport("user32.dll")]
private static extern bool UnregisterHotKey(IntPtr hWnd, int id);

private int modifier;
private int key;
private readonly int modifier;
private readonly int key;
private IntPtr hWnd;
private int id;
private readonly int id;

public static class Constants
{
Expand Down
18 changes: 9 additions & 9 deletions Clickami/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
Title="Clickami" Height="195" Width="290" ResizeMode="CanMinimize" Topmost="True" Loaded="Window_Loaded" Closing="Window_Closing" ContentRendered="Window_ContentRendered">
<Canvas>
<Label Content="X" Canvas.Left="10" Canvas.Top="10"/>
<xctk:IntegerUpDown Name="iudMouseX" Value="0" Increment="1" Width="100" Canvas.Left="57" Canvas.Top="15"/>
<xctk:IntegerUpDown Name="iudMouseX" Value="0" Increment="1" Width="100" Canvas.Left="57" Canvas.Top="15" ToolTip="The X coordinate to be clicked on"/>
<Label Content="Y" Canvas.Left="10" Canvas.Top="35"/>
<xctk:IntegerUpDown Name="iudMouseY" Value="0" Increment="1" Width="100" Canvas.Left="57" Canvas.Top="38"/>
<xctk:IntegerUpDown Name="iudMouseY" Value="0" Increment="1" Width="100" Canvas.Left="57" Canvas.Top="38" ToolTip="The Y coordinate to be clicked on"/>
<Label Content="Delay" Canvas.Left="10" Canvas.Top="60"/>
<xctk:DoubleUpDown Name="dudDelay" Value="0.5" FormatString="F3" Increment="0.005" Minimum="0.001" Width="100" Canvas.Left="57" Canvas.Top="63"/>
<xctk:DoubleUpDown Name="dudDelay" Value="0.5" FormatString="F3" Increment="0.005" Minimum="0.001" Width="100" Canvas.Left="57" Canvas.Top="63" ToolTip="The delay between clicks"/>
<Label Content="Sec" Canvas.Left="160" Canvas.Top="60"/>
<Label Content="Loops" Canvas.Left="10" Canvas.Top="85"/>
<xctk:IntegerUpDown Name="iudLoops" Value="1" Increment="1" Minimum="1" Width="100" Canvas.Left="57" Canvas.Top="88"/>
<CheckBox Name="cbInfinitely" Content="Infinitely (ESC will break)" IsChecked="False" Canvas.Left="10" Canvas.Top="113"/>
<CheckBox Name="cbTopmost" Content="always on top" IsChecked="True" Click="cbTopmost_Click" Canvas.Left="162" Canvas.Top="16"/>
<Label Name="lblDurationLeft" Content="0,000 sec" HorizontalContentAlignment="Right" Width="107" Canvas.Left="157" Canvas.Top="85"/>
<Button Name="btnStartStop" Content="Start (F1)" Click="btnStartStop_Click" Width="100" Canvas.Left="164" Canvas.Top="110"/>
<xctk:IntegerUpDown Name="iudLoops" Value="1" Increment="1" Minimum="1" Width="100" Canvas.Left="57" Canvas.Top="88" ToolTip="How many times to click"/>
<CheckBox Name="cbInfinitely" Content="Infinitely (ESC will break)" IsChecked="False" Canvas.Left="10" Canvas.Top="113" ToolTip="Activate to click infinitely (can be stopped with ESC key)"/>
<CheckBox Name="cbTopmost" Content="always on top" IsChecked="True" Click="CbTopmost_Click" Canvas.Left="162" Canvas.Top="16" ToolTip="Activate so that the window is always in front of other windows"/>
<Label Name="lblDurationLeft" Content="0,000 sec" HorizontalContentAlignment="Right" Width="107" Canvas.Left="157" Canvas.Top="85" ToolTip="Here you can see how long it will still be clicked"/>
<Button Name="btnStartStop" Content="Start (F1)" Click="BtnStartStop_Click" Width="100" Canvas.Left="164" Canvas.Top="110"/>
<StatusBar Canvas.Bottom="0" Width="284" Height="22">
<Grid Width="284" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Name="lblCursorPosition" Content="0,0" Padding="5,0,0,0"/>
<Label Name="lblCursorPosition" Content="0,0" Padding="5,0,0,0" ToolTip="Displays the current mouse pointer position"/>
<Label Content="made by Shinigami" HorizontalAlignment="Right" Grid.Column="1" Padding="0,0,13,0"/>
</Grid>
</StatusBar>
Expand Down
10 changes: 6 additions & 4 deletions Clickami/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public MainWindow()
InitializeComponent();
}

private void btnStartStop_Click(object sender, RoutedEventArgs e)
private void BtnStartStop_Click(object sender, RoutedEventArgs e)
{
this.mouseCoordinates.X = this.iudMouseX.Value.Value;
this.mouseCoordinates.Y = this.iudMouseY.Value.Value;
Expand Down Expand Up @@ -198,7 +198,7 @@ private void btnStartStop_Click(object sender, RoutedEventArgs e)
}
}

private void cbTopmost_Click(object sender, RoutedEventArgs e)
private void CbTopmost_Click(object sender, RoutedEventArgs e)
{
this.Topmost = this.cbTopmost.IsChecked == true;
}
Expand Down Expand Up @@ -272,8 +272,10 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
this.timerForInfinitely = new Timer();
this.timerForInfinitely.Elapsed += new ElapsedEventHandler(TimerForInfinitely);

this.timerForUpdateUI = new DispatcherTimer();
this.timerForUpdateUI.Interval = TimeSpan.FromMilliseconds(50);
this.timerForUpdateUI = new DispatcherTimer
{
Interval = TimeSpan.FromMilliseconds(50)
};
this.timerForUpdateUI.Tick += new EventHandler(TimerForUpdateUI);
this.timerForUpdateUI.Start();
}
Expand Down
6 changes: 2 additions & 4 deletions Clickami/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

Expand Down Expand Up @@ -51,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.18161.1")]
14 changes: 11 additions & 3 deletions Clickami/Settings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Windows;
using System.Xml;
using System.Xml.Linq;
Expand All @@ -11,7 +13,6 @@ internal class Settings
public static string PATHTODIRECTORY = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Clickami";
public static string PATHTOSETTINGSXML = PATHTODIRECTORY + "\\settings.xml";

public const string VERSION = "1.0.0";
public const string APPLICATIONNAME = "Clickami";
public static int xCoord = 0;
public static int yCoord = 0;
Expand All @@ -20,13 +21,20 @@ internal class Settings
public static bool isInfinitely = false;
public static bool isTopmost = true;

internal static string GetVersion()
{
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
return fileVersionInfo.FileVersion;
}

internal static void Read()
{
try
{
XDocument settings = XDocument.Load(Settings.PATHTOSETTINGSXML);
XElement settingsElement = settings.Element("settings");
if (settingsElement.Attribute("version").Value == Settings.VERSION)
if (settingsElement.Attribute("version").Value == Settings.GetVersion())
{
try
{
Expand Down Expand Up @@ -68,7 +76,7 @@ internal static void Read()
internal static void Write()
{
XAttribute applicationName = new XAttribute("applicationName", Settings.APPLICATIONNAME);
XAttribute version = new XAttribute("version", Settings.VERSION);
XAttribute version = new XAttribute("version", Settings.GetVersion());
XAttribute x = new XAttribute("x", Settings.xCoord);
XAttribute y = new XAttribute("y", Settings.yCoord);
XElement coordinates = new XElement("coordinates", x, y);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can use it to click on a given desktop position 1,000 times per second if yo
## TODO

- [x] Persistent settings [#1][issue-1]
- [ ] Add tooltips explanations for each field [#2][issue-2]
- [x] Add tooltips explanations for each field [#2][issue-2]
- [ ] Make hotkeys configurable [#3][issue-3]

## Installation
Expand Down

0 comments on commit 1895797

Please sign in to comment.