2020-07-05 18:18:06 -07:00
|
|
|
using System.Diagnostics;
|
2020-07-03 00:24:31 -07:00
|
|
|
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();
|
2020-11-30 18:31:46 -08:00
|
|
|
|
|
|
|
var asm = Assembly.GetExecutingAssembly().GetName();
|
|
|
|
version.Content = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor}";
|
2020-07-03 00:24:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Open source code link
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
/// <param name="e"></param>
|
|
|
|
private void OpenSource(object sender, RequestNavigateEventArgs e) {
|
2020-11-30 18:31:46 -08:00
|
|
|
Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true });
|
2020-07-03 00:24:31 -07:00
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Close this dialog
|
|
|
|
/// </summary>
|
|
|
|
private void Quit(object sender, RoutedEventArgs e) {
|
|
|
|
Close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|