mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
53 lines
No EOL
1.3 KiB
C#
53 lines
No EOL
1.3 KiB
C#
using System.Reflection;
|
|
|
|
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace SourceGit.Views
|
|
{
|
|
public partial class About : Window
|
|
{
|
|
public string Version
|
|
{
|
|
get;
|
|
private set;
|
|
}
|
|
|
|
public About()
|
|
{
|
|
var ver = Assembly.GetExecutingAssembly().GetName().Version;
|
|
Version = $"{ver.Major}.{ver.Minor}";
|
|
DataContext = this;
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void BeginMoveWindow(object sender, PointerPressedEventArgs e)
|
|
{
|
|
BeginMoveDrag(e);
|
|
}
|
|
|
|
private void CloseWindow(object sender, RoutedEventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
|
|
private void OnVisitAvaloniaUI(object sender, PointerPressedEventArgs e)
|
|
{
|
|
Native.OS.OpenBrowser("https://www.avaloniaui.net/");
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnVisitAvaloniaEdit(object sender, PointerPressedEventArgs e)
|
|
{
|
|
Native.OS.OpenBrowser("https://github.com/AvaloniaUI/AvaloniaEdit");
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnVisitJetBrainsMonoFont(object sender, PointerPressedEventArgs e)
|
|
{
|
|
Native.OS.OpenBrowser("https://www.jetbrains.com/lp/mono/");
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
} |