mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 21:54:59 +00:00
refactor<*>: rewrite all with AvaloniaUI
This commit is contained in:
parent
0136904612
commit
2a62596999
521 changed files with 19780 additions and 23244 deletions
39
src/Views/About.axaml.cs
Normal file
39
src/Views/About.axaml.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using System.Reflection;
|
||||
|
||||
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 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://www.nuget.org/packages/OneWare.AvaloniaEdit");
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnVisitJetBrainsMonoFont(object sender, PointerPressedEventArgs e) {
|
||||
Native.OS.OpenBrowser("https://www.jetbrains.com/lp/mono/");
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue