2021-04-29 05:05:55 -07:00
|
|
|
using System;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Reflection;
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
namespace SourceGit.Views {
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 关于对话框
|
|
|
|
/// </summary>
|
2021-06-17 18:26:19 -07:00
|
|
|
public partial class About : Controls.Window {
|
2021-04-29 05:05:55 -07:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|