mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using System.Windows;
|
|
using System.Windows.Navigation;
|
|
|
|
namespace SourceGit.UI {
|
|
|
|
/// <summary>
|
|
/// About dialog
|
|
/// </summary>
|
|
public partial class About : Window {
|
|
|
|
/// <summary>
|
|
/// Constructor
|
|
/// </summary>
|
|
public About() {
|
|
InitializeComponent();
|
|
|
|
var asm = Assembly.GetExecutingAssembly().GetName();
|
|
version.Content = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor}";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Open source code link
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OpenSource(object sender, RequestNavigateEventArgs e) {
|
|
Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true });
|
|
e.Handled = true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Close this dialog
|
|
/// </summary>
|
|
private void Quit(object sender, RoutedEventArgs e) {
|
|
Close();
|
|
}
|
|
}
|
|
}
|