From 186a77eaccd853da2158eebb26dd77b82951830e Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Sat, 14 Feb 2026 17:28:34 +0100 Subject: [PATCH] [chore:] implemented button-click handlers --- MainWindow.axaml.cs | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 8289a7e..1dec9ee 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -1,4 +1,7 @@ +using System; +using System.Diagnostics; using Avalonia.Controls; +using Avalonia.Interactivity; namespace spplus; @@ -8,4 +11,57 @@ public partial class MainWindow : Window { InitializeComponent(); } + + private void MnuExpSettings_OnClick(object? sender, RoutedEventArgs e) + { + var res = MessageBox.Show(this, "Dieses Feature ist noch nicht implementiert", "Fehlend"); + } + + private void MnuExit_OnClick(object? sender, RoutedEventArgs e) + { + Environment.Exit(0); + } + + private void MnuHelp_OnClick(object? sender, RoutedEventArgs e) + { + try + { + Process.Start(new ProcessStartInfo + { + FileName = "https://git.mypapercloud.de/fierke/spplus/wiki", + UseShellExecute = true // Wichtig für Plattformübergreifendes Öffnen + }); + } + catch (Exception ex) + { + Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}"); + } + } + + private void MnuGit_OnClick(object? sender, RoutedEventArgs e) + { + try + { + Process.Start(new ProcessStartInfo + { + FileName = "https://git.mypapercloud.de/fierke/spplus", + UseShellExecute = true // Wichtig für Plattformübergreifendes Öffnen + }); + } + catch (Exception ex) + { + Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}"); + } + } + + private void MnuAbout_OnClick(object? sender, RoutedEventArgs e) + { + Window w = new(); + Grid g = new(); + TextBlock tb = new(); + tb.Text = "Spplus v1.0.0\n(c)2026 MyPapertown, Elias Fierke"; + g.Children.Add(tb); + w.Content = g; + w.Show(); + } } \ No newline at end of file