From aefa631ff3f648060f5c0fe5d51aee89e3898a85 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 9 Feb 2021 22:55:40 -0500 Subject: Discord RPC; About window --- Erable/Views/About.axaml | 17 +++++++++++++++++ Erable/Views/About.axaml.cs | 30 ++++++++++++++++++++++++++++++ Erable/Views/MainWindow.axaml | 7 ++++--- Erable/Views/MainWindow.axaml.cs | 9 ++++++++- 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 Erable/Views/About.axaml create mode 100644 Erable/Views/About.axaml.cs (limited to 'Erable/Views') diff --git a/Erable/Views/About.axaml b/Erable/Views/About.axaml new file mode 100644 index 0000000..7d6017f --- /dev/null +++ b/Erable/Views/About.axaml @@ -0,0 +1,17 @@ + + + About Erable 0.1 Pre-Alpha + © Copyright 2021, Alee Productions + Licensed with GPL-3.0 + Report Bugs at https://git.io/JtrAO + + diff --git a/Erable/Views/About.axaml.cs b/Erable/Views/About.axaml.cs new file mode 100644 index 0000000..d3d2846 --- /dev/null +++ b/Erable/Views/About.axaml.cs @@ -0,0 +1,30 @@ +using System; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Input; +using Avalonia.Markup.Xaml; + +namespace Erable.Views +{ + public class About : Window + { + + public About() + { + InitializeComponent(); +#if DEBUG + this.AttachDevTools(); +#endif + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + + private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e) + { + Environment.Exit(0); + } + } +} \ No newline at end of file diff --git a/Erable/Views/MainWindow.axaml b/Erable/Views/MainWindow.axaml index de6c5b7..ca78244 100644 --- a/Erable/Views/MainWindow.axaml +++ b/Erable/Views/MainWindow.axaml @@ -19,17 +19,18 @@ - + - + - + + diff --git a/Erable/Views/MainWindow.axaml.cs b/Erable/Views/MainWindow.axaml.cs index 78cde38..f849f26 100644 --- a/Erable/Views/MainWindow.axaml.cs +++ b/Erable/Views/MainWindow.axaml.cs @@ -21,9 +21,16 @@ namespace Erable.Views AvaloniaXamlLoader.Load(this); } - private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e) + private void Exit_OnPointerPressed(object? sender, PointerPressedEventArgs e) { Environment.Exit(0); } + + private void About_OnPointerPressed(object? sender, PointerPressedEventArgs e) + { + About about = new(); + about.ShowDialog(this); + + } } } \ No newline at end of file -- cgit v1.2.3