2024-03-17 18:37:06 -07:00
|
|
|
using System.Reflection;
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
using Avalonia.Input;
|
|
|
|
using Avalonia.Interactivity;
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
namespace SourceGit.Views
|
|
|
|
{
|
2024-06-12 20:54:10 -07:00
|
|
|
public partial class About : ChromelessWindow
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
|
|
|
public string Version
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
get;
|
|
|
|
private set;
|
|
|
|
}
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
public About()
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
var ver = Assembly.GetExecutingAssembly().GetName().Version;
|
2024-07-14 00:55:15 -07:00
|
|
|
if (ver != null)
|
|
|
|
Version = $"{ver.Major}.{ver.Minor}";
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
DataContext = this;
|
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
2024-07-14 00:55:15 -07:00
|
|
|
private void BeginMoveWindow(object _, PointerPressedEventArgs e)
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-03-14 03:23:36 -07:00
|
|
|
BeginMoveDrag(e);
|
|
|
|
}
|
|
|
|
|
2024-07-14 00:55:15 -07:00
|
|
|
private void CloseWindow(object _1, RoutedEventArgs _2)
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
Close();
|
|
|
|
}
|
|
|
|
|
2024-07-14 00:55:15 -07:00
|
|
|
private void OnVisitAvaloniaUI(object _, PointerPressedEventArgs e)
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
Native.OS.OpenBrowser("https://www.avaloniaui.net/");
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
|
2024-07-14 00:55:15 -07:00
|
|
|
private void OnVisitAvaloniaEdit(object _, PointerPressedEventArgs e)
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-02-19 23:44:26 -08:00
|
|
|
Native.OS.OpenBrowser("https://github.com/AvaloniaUI/AvaloniaEdit");
|
2024-02-05 23:08:37 -08:00
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
|
2024-07-14 00:55:15 -07:00
|
|
|
private void OnVisitJetBrainsMonoFont(object _, PointerPressedEventArgs e)
|
2024-03-17 18:37:06 -07:00
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
Native.OS.OpenBrowser("https://www.jetbrains.com/lp/mono/");
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
2024-03-31 20:45:30 -07:00
|
|
|
|
2024-07-14 00:55:15 -07:00
|
|
|
private void OnVisitSourceCode(object _, PointerPressedEventArgs e)
|
2024-03-31 20:45:30 -07:00
|
|
|
{
|
|
|
|
Native.OS.OpenBrowser("https://github.com/sourcegit-scm/sourcegit");
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
2024-02-05 23:08:37 -08:00
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
}
|