45 lines
1.1 KiB
C#
45 lines
1.1 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 = "config.json beside TaskbarLauncher.exe";
|
|
|
|
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 Close_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
}
|