Files
Taskbar-Launcher/AboutWindow.xaml.cs
2026-06-02 18:57:04 -04:00

50 lines
1.2 KiB
C#

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();
}
}