using System; using System.Diagnostics; using System.Reflection; using System.Windows; using System.Windows.Navigation; namespace SourceGit.UI { /// /// About dialog /// public partial class About : Window { /// /// Constructor /// public About() { InitializeComponent(); var asm = Assembly.GetExecutingAssembly().GetName(); var framework = AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName; var dotnetVer = framework.Substring(framework.IndexOf("=") + 1); version.Content = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor} .NET : {dotnetVer}"; } /// /// Open source code link /// /// /// private void OpenSource(object sender, RequestNavigateEventArgs e) { Process.Start(e.Uri.AbsoluteUri); //Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true }); e.Handled = true; } /// /// Close this dialog /// private void Quit(object sender, RoutedEventArgs e) { Close(); } } }