Skip to content

Commit

Permalink
Add Help tab to settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalmers committed Jul 16, 2024
1 parent 4b9f9a8 commit 81e3c80
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
91 changes: 91 additions & 0 deletions DesktopClock/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,96 @@
Margin="0,0,0,12" />
</StackPanel>
</TabItem>

<TabItem Header="Help">
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">Shortcuts</TextBlock>
<StackPanel Margin="0,0,0,12">
<TextBlock>
<Run FontWeight="Bold">Right-click:</Run>
Open the context menu</TextBlock>
<TextBlock>
<Run FontWeight="Bold">Double-click:</Run>
Copy clock text to clipboard</TextBlock>
<TextBlock>
<Run FontWeight="Bold">Ctrl and Mouse Wheel:</Run>
Zoom</TextBlock>
<TextBlock>
<Run FontWeight="Bold">Ctrl and +:</Run>
Zoom in</TextBlock>
<TextBlock>
<Run FontWeight="Bold">Ctrl and -:</Run>
Zoom out</TextBlock>
</StackPanel>

<TextBlock FontWeight="Bold" FontSize="16">Links</TextBlock>
<StackPanel Margin="0,0,0,12">
<TextBlock>
<Hyperlink NavigateUri="https://github.com/danielchalmers/DesktopClock/releases" RequestNavigate="Hyperlink_RequestNavigate">
GitHub Releases (Check for updates)
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/danielchalmers/DesktopClock/issues" RequestNavigate="Hyperlink_RequestNavigate">
GitHub Issues (Found a bug or have an idea?)
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/danielchalmers/JournalApp" RequestNavigate="Hyperlink_RequestNavigate">
JournalApp - Write notes and keep track of your day (Android).
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/danielchalmers/Network-Monitor" RequestNavigate="Hyperlink_RequestNavigate">
Network Monitor - View latency and bandwidth usage (Windows).
</Hyperlink>
</TextBlock>
</StackPanel>

<TextBlock FontWeight="Bold" FontSize="16">Credits</TextBlock>
<StackPanel Margin="0,0,0,12">
<TextBlock>
<Hyperlink NavigateUri="https://github.com/CommunityToolkit/dotnet" RequestNavigate="Hyperlink_RequestNavigate">
CommunityToolkit
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/Fody/Costura" RequestNavigate="Hyperlink_RequestNavigate">
Costura.Fody
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/HavenDV/H.NotifyIcon" RequestNavigate="Hyperlink_RequestNavigate">
H.NotifyIcon.Wpf
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/Humanizr/Humanizer" RequestNavigate="Hyperlink_RequestNavigate">
Humanizer
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://www.newtonsoft.com/json" RequestNavigate="Hyperlink_RequestNavigate">
Newtonsoft.Json
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/Fody/PropertyChanged" RequestNavigate="Hyperlink_RequestNavigate">
PropertyChanged.Fody
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/danielchalmers/WpfWindowPlacement" RequestNavigate="Hyperlink_RequestNavigate">
WpfWindowPlacement
</Hyperlink>
</TextBlock>
<TextBlock>
<Hyperlink NavigateUri="https://www.flaticon.com/free-icon/three-o-clock-clock_13435" RequestNavigate="Hyperlink_RequestNavigate">
Clock icon
</Hyperlink>
</TextBlock>
</StackPanel>
</StackPanel>
</TabItem>
</TabControl>
</Window>
8 changes: 8 additions & 0 deletions DesktopClock/SettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Navigation;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DesktopClock.Properties;
Expand Down Expand Up @@ -62,6 +64,12 @@ private void BrowseWavFilePath(object sender, RoutedEventArgs e)

ViewModel.Settings.WavFilePath = openFileDialog.FileName;
}

private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
e.Handled = true;
}
}

public partial class SettingsWindowViewModel : ObservableObject
Expand Down

0 comments on commit 81e3c80

Please sign in to comment.