From b758c6975ee34c1a9342604b347f2603277b3c5d Mon Sep 17 00:00:00 2001 From: gmbl3r Date: Thu, 11 Jul 2019 12:11:26 +0300 Subject: [PATCH] Add about window. --- Clicker/About.xaml | 23 +++++++++++++++++++++ Clicker/About.xaml.cs | 41 ++++++++++++++++++++++++++++++++++++++ Clicker/Clicker.csproj | 7 +++++++ Clicker/MainWindow.xaml | 31 ++++++++++++++++------------ Clicker/MainWindow.xaml.cs | 7 +++++++ 5 files changed, 96 insertions(+), 13 deletions(-) create mode 100644 Clicker/About.xaml create mode 100644 Clicker/About.xaml.cs diff --git a/Clicker/About.xaml b/Clicker/About.xaml new file mode 100644 index 0000000..636a1be --- /dev/null +++ b/Clicker/About.xaml @@ -0,0 +1,23 @@ + + + + Thanks for using this shit. It's under development at the moment. + + + Project page: https://github.com/Casilio/Hold-my-mouse + + + Email for questions and suggestions: savchukdev@gmail.com + + + diff --git a/Clicker/About.xaml.cs b/Clicker/About.xaml.cs new file mode 100644 index 0000000..f7532a6 --- /dev/null +++ b/Clicker/About.xaml.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Diagnostics; +using System.Windows.Navigation; + +namespace Clicker +{ + /// + /// Interaction logic for About.xaml + /// + public partial class About : Window + { + public About() + { + InitializeComponent(); + } + + private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) + { + Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); + e.Handled = true; + } + + private void Hyperlink_RequestNavigate_1(object sender, RequestNavigateEventArgs e) + { + Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); + e.Handled = true; + } + } +} diff --git a/Clicker/Clicker.csproj b/Clicker/Clicker.csproj index 9739510..65f10a8 100644 --- a/Clicker/Clicker.csproj +++ b/Clicker/Clicker.csproj @@ -73,10 +73,17 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer + + About.xaml + App.xaml Code diff --git a/Clicker/MainWindow.xaml b/Clicker/MainWindow.xaml index e058579..7070e5b 100644 --- a/Clicker/MainWindow.xaml +++ b/Clicker/MainWindow.xaml @@ -7,17 +7,22 @@ mc:Ignorable="d" WindowStartupLocation="CenterScreen" Closing="Window_Closing" - Title="Hold my mouse" Height="118.518" Width="300"> - - - - - - - - - - - - + Title="Hold my mouse" Height="177.037" Width="476.908"> + + + + + + + + + + + + + + + + + diff --git a/Clicker/MainWindow.xaml.cs b/Clicker/MainWindow.xaml.cs index 4b2f83d..be5b9b8 100644 --- a/Clicker/MainWindow.xaml.cs +++ b/Clicker/MainWindow.xaml.cs @@ -131,5 +131,12 @@ private void Shorcut_LostFocus(object sender, RoutedEventArgs e) { shorcut.Background = Brushes.White; } + + private void MenuItem_Click(object sender, RoutedEventArgs e) + { + About about = new About(); + about.Owner = this; + about.ShowDialog(); + } } }