diff --git a/AboutWindow.xaml b/AboutWindow.xaml
new file mode 100644
index 0000000..5b7f221
--- /dev/null
+++ b/AboutWindow.xaml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AboutWindow.xaml.cs b/AboutWindow.xaml.cs
new file mode 100644
index 0000000..f8bdae2
--- /dev/null
+++ b/AboutWindow.xaml.cs
@@ -0,0 +1,49 @@
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Input;
+using TaskbarLauncher.Services;
+
+namespace TaskbarLauncher;
+
+public partial class AboutWindow : Window
+{
+ public AboutWindow()
+ {
+ InitializeComponent();
+
+ AuthorText.Text = AppInfo.Author;
+ VersionText.Text = AppInfo.Version;
+ BuildText.Text = AppInfo.Build;
+ ConfigPathText.Text = ConfigService.ConfigPath;
+
+ if (string.IsNullOrWhiteSpace(AppInfo.GiveawaySiteUrl))
+ {
+ ProjectSiteText.Text = "Project giveaway site link will be added after review.";
+ }
+ else
+ {
+ ProjectSiteText.Text = AppInfo.GiveawaySiteUrl;
+ ProjectSiteText.Cursor = System.Windows.Input.Cursors.Hand;
+ ProjectSiteText.MouseLeftButtonUp += (_, _) => OpenUrl(AppInfo.GiveawaySiteUrl);
+ }
+ }
+
+ private static void OpenUrl(string url)
+ {
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = url,
+ UseShellExecute = true
+ });
+ }
+
+ private void OpenConfigFolder_Click(object sender, RoutedEventArgs e)
+ {
+ ConfigService.OpenConfigFolder();
+ }
+
+ private void Close_Click(object sender, RoutedEventArgs e)
+ {
+ Close();
+ }
+}
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 7f07c34..55b5d16 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -25,6 +25,7 @@
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 4928b40..c312fe0 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -4,7 +4,6 @@ using System.Windows.Forms;
using System.Windows.Media;
using System.IO;
using System.Windows.Input;
-using System.Reflection;
using TaskbarLauncher.Models;
using TaskbarLauncher.Services;
using MessageBox = System.Windows.MessageBox;
@@ -35,7 +34,7 @@ public partial class MainWindow : Window
DisplayModeBox.ItemsSource = Enum.GetValues();
ItemDisplayModeBox.ItemsSource = Enum.GetValues();
TypeBox.ItemsSource = Enum.GetValues();
- VersionText.Text = $"Version {GetAppVersion()}";
+ VersionText.Text = $"Version {AppInfo.Version} Build {AppInfo.Build}";
RefreshView();
}
@@ -68,13 +67,6 @@ public partial class MainWindow : Window
}
}
- private static string GetAppVersion()
- {
- return Assembly.GetExecutingAssembly()
- .GetCustomAttribute()?
- .InformationalVersion ?? "development";
- }
-
private static TreeViewItem CreateTreeItem(LauncherItem item)
{
var treeItem = new TreeViewItem { Header = $"{item.Title} ({item.Type})", Tag = item };
@@ -701,6 +693,16 @@ public partial class MainWindow : Window
ConfigService.OpenConfigFolder();
}
+ private void About_Click(object sender, RoutedEventArgs e)
+ {
+ AboutWindow aboutWindow = new()
+ {
+ Owner = this
+ };
+
+ aboutWindow.ShowDialog();
+ }
+
private void Close_Click(object sender, RoutedEventArgs e)
{
Hide();
diff --git a/Services/AppInfo.cs b/Services/AppInfo.cs
new file mode 100644
index 0000000..67d0a21
--- /dev/null
+++ b/Services/AppInfo.cs
@@ -0,0 +1,18 @@
+using System.Reflection;
+
+namespace TaskbarLauncher.Services;
+
+public static class AppInfo
+{
+ public const string ProductName = "Taskbar Launcher";
+ public const string Author = "Ray Berezowski";
+ public const string GiveawaySiteUrl = "";
+
+ public static string Version =>
+ Assembly.GetExecutingAssembly()
+ .GetCustomAttribute()?
+ .InformationalVersion ?? "development";
+
+ public static string Build =>
+ Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "development";
+}
diff --git a/Services/LauncherController.cs b/Services/LauncherController.cs
index 6923cb4..89ae3cc 100644
--- a/Services/LauncherController.cs
+++ b/Services/LauncherController.cs
@@ -13,6 +13,7 @@ public sealed class LauncherController : IDisposable
private NotifyIcon? notifyIcon;
private LauncherPopup? popup;
private MainWindow? settingsWindow;
+ private AboutWindow? aboutWindow;
public LauncherConfig Config { get; private set; } = new();
@@ -38,6 +39,20 @@ public sealed class LauncherController : IDisposable
settingsWindow.Activate();
}
+ public void ShowAbout()
+ {
+ if (aboutWindow?.IsVisible == true)
+ {
+ aboutWindow.Activate();
+ return;
+ }
+
+ aboutWindow = new AboutWindow();
+ aboutWindow.Closed += (_, _) => aboutWindow = null;
+ aboutWindow.Show();
+ aboutWindow.Activate();
+ }
+
public void TogglePopup()
{
if (popup?.IsVisible == true)
@@ -83,6 +98,7 @@ public sealed class LauncherController : IDisposable
notifyIcon.DoubleClick += (_, _) => TogglePopup();
notifyIcon.ContextMenuStrip.Items.Add("Open Launcher", null, (_, _) => TogglePopup());
notifyIcon.ContextMenuStrip.Items.Add("Settings", null, (_, _) => ShowSettings());
+ notifyIcon.ContextMenuStrip.Items.Add("About", null, (_, _) => ShowAbout());
notifyIcon.ContextMenuStrip.Items.Add("Reload Config", null, (_, _) => ReloadConfig());
notifyIcon.ContextMenuStrip.Items.Add("Open Config Folder", null, (_, _) => ConfigService.OpenConfigFolder());
notifyIcon.ContextMenuStrip.Items.Add("Exit", null, (_, _) => System.Windows.Application.Current.Shutdown());
diff --git a/TaskbarLauncher.csproj b/TaskbarLauncher.csproj
index 0013e36..f66d4c1 100644
--- a/TaskbarLauncher.csproj
+++ b/TaskbarLauncher.csproj
@@ -8,6 +8,7 @@
true
true
$(DefaultItemExcludes);bin\**;obj\**;builds\**;_*\**;..\TaskbarLauncher-build\**
+ Ray Berezowski
1.0.0
1.0.0.0
1.0.0.0