Skip to content

Commit

Permalink
Add about window.
Browse files Browse the repository at this point in the history
  • Loading branch information
Casilio committed Jul 11, 2019
1 parent af844f2 commit b758c69
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 13 deletions.
23 changes: 23 additions & 0 deletions Clicker/About.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Window x:Class="Clicker.About"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:local="clr-namespace:Clicker"
mc:Ignorable="d"
WindowStartupLocation="CenterOwner"
Title="About" Height="186.667" Width="449.167">
<Grid>
<TextBlock Margin="10">
Thanks for using this shit. <Bold>It's under development at the moment.</Bold>
<LineBreak></LineBreak>
<LineBreak></LineBreak>
Project page: <Hyperlink NavigateUri="https://github.com/Casilio/Hold-my-mouse" RequestNavigate="Hyperlink_RequestNavigate">https://github.com/Casilio/Hold-my-mouse</Hyperlink>
<LineBreak></LineBreak>
<LineBreak></LineBreak>
Email for questions and suggestions: <Hyperlink NavigateUri="emailto:[email protected]" RequestNavigate="Hyperlink_RequestNavigate_1">[email protected]</Hyperlink>
</TextBlock>
</Grid>
</Window>
41 changes: 41 additions & 0 deletions Clicker/About.xaml.cs
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// Interaction logic for About.xaml
/// </summary>
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;
}
}
}
7 changes: 7 additions & 0 deletions Clicker/Clicker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,17 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="About.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
Expand Down
31 changes: 18 additions & 13 deletions Clicker/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Closing="Window_Closing"
Title="Hold my mouse" Height="118.518" Width="300">
<Grid VerticalAlignment="Center" Focusable="True" Name="grid">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="78"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0">RMB Down:</Label>
<TextBox Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" KeyUp="TextBox_KeyUp" KeyDown="TextBox_KeyDown" IsReadOnly="true" Name="shorcut" GotFocus="Shorcut_GotFocus" LostFocus="Shorcut_LostFocus"/>
</Grid>
Title="Hold my mouse" Height="177.037" Width="476.908">
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="About" Click="MenuItem_Click"></MenuItem>
</Menu>
<Grid VerticalAlignment="Center" Focusable="True" Name="grid">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="78"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0">RMB Down:</Label>
<TextBox Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" KeyUp="TextBox_KeyUp" KeyDown="TextBox_KeyDown" IsReadOnly="true" Name="shorcut" GotFocus="Shorcut_GotFocus" LostFocus="Shorcut_LostFocus"/>
</Grid>
</DockPanel>
</Window>
7 changes: 7 additions & 0 deletions Clicker/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

0 comments on commit b758c69

Please sign in to comment.