mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
33 lines
1,013 B
C#
33 lines
1,013 B
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using System.Windows;
|
|
|
|
namespace SourceGit.Views {
|
|
|
|
/// <summary>
|
|
/// 关于对话框
|
|
/// </summary>
|
|
public partial class About : Window {
|
|
|
|
public About() {
|
|
InitializeComponent();
|
|
|
|
var asm = Assembly.GetExecutingAssembly().GetName();
|
|
var framework = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName;
|
|
var dotnetVer = framework.Substring(framework.IndexOf("=") + 1);
|
|
|
|
version.Text = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor} .NET : {dotnetVer}";
|
|
}
|
|
|
|
private void OnRequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) {
|
|
var info = new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}");
|
|
info.CreateNoWindow = true;
|
|
Process.Start(info);
|
|
}
|
|
|
|
private void Quit(object sender, RoutedEventArgs e) {
|
|
Close();
|
|
}
|
|
}
|
|
}
|