From f7f482ef30f1b510eded035329ea9a63ae8883cd Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Fri, 13 Feb 2026 21:37:37 +0100 Subject: [PATCH 01/17] [chore:] Changed "spplus" to "SP+" in title --- MainWindow.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MainWindow.axaml b/MainWindow.axaml index 84f54c6..f251005 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -4,7 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="spplus.MainWindow" - Title="spplus"> + Title="SP+"> From 78050de03f3378903edd1cb02318faa772cbb0ce Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Sat, 14 Feb 2026 17:27:40 +0100 Subject: [PATCH 02/17] [file:] added MessageBox files from logofclient --- MessageBox.axaml | 18 ++++++++++ MessageBox.axaml.cs | 85 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 MessageBox.axaml create mode 100644 MessageBox.axaml.cs diff --git a/MessageBox.axaml b/MessageBox.axaml new file mode 100644 index 0000000..84b78ed --- /dev/null +++ b/MessageBox.axaml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/MessageBox.axaml.cs b/MessageBox.axaml.cs new file mode 100644 index 0000000..4ab872b --- /dev/null +++ b/MessageBox.axaml.cs @@ -0,0 +1,85 @@ +using System; +using System.Threading.Tasks; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace spplus; + +public partial class MessageBox : Window +{ + public MessageBox() + { + AvaloniaXamlLoader.Load(this); + } + + public static Task Show(Window parent, string text, string title, + MessageBoxButton buttons = MessageBoxButton.Ok) + { + try + { + var msgbox = new MessageBox + { + Title = title + }; + msgbox.FindControl("Text").Text = text; + var buttonPanel = msgbox.FindControl("Buttons"); + + var res = MessageBoxResult.Ok; + + void AddButton(string caption, MessageBoxResult r, bool def = false) + { + var btn = new Button { Content = caption }; + btn.Click += (_, __) => + { + res = r; + msgbox.Close(); + }; + buttonPanel.Children.Add(btn); + if (def) + res = r; + } + + if (buttons == MessageBoxButton.Ok || buttons == MessageBoxButton.OkCancel) + AddButton("Ok", MessageBoxResult.Ok, true); + if (buttons == MessageBoxButton.YesNo || buttons == MessageBoxButton.YesNoCancel) + { + AddButton("Yes", MessageBoxResult.Yes); + AddButton("No", MessageBoxResult.No, true); + } + + if (buttons == MessageBoxButton.OkCancel || buttons == MessageBoxButton.YesNoCancel) + AddButton("Cancel", MessageBoxResult.Cancel, true); + + + var tcs = new TaskCompletionSource(); + msgbox.Closed += delegate { tcs.TrySetResult(res); }; + if (parent != null) + msgbox.ShowDialog(parent); + else msgbox.Show(); + + return tcs.Task; + } + catch (Exception ex) + { + Console.WriteLine("Error while showing messagebox: " + ex.Message); + return Task.FromResult(MessageBoxResult.Error); + } + } +} + +public enum MessageBoxButton +{ + Ok, + OkCancel, + YesNo, + YesNoCancel +} + +public enum MessageBoxResult +{ + Ok, + Cancel, + Yes, + No, + Error +} \ No newline at end of file From a7c2b7e5d195e713ddd32f56c7035c3d6cd55819 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Sat, 14 Feb 2026 17:28:19 +0100 Subject: [PATCH 03/17] [chore:] added button-click handlers --- MainWindow.axaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MainWindow.axaml b/MainWindow.axaml index f251005..2180bd0 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -11,13 +11,13 @@ - - + + - - - + + + From 186a77eaccd853da2158eebb26dd77b82951830e Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Sat, 14 Feb 2026 17:28:34 +0100 Subject: [PATCH 04/17] [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 From dd30ebd516a824fabb024e3507a582f5bb8aadad Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Tue, 17 Feb 2026 08:21:09 +0000 Subject: [PATCH 05/17] Update README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31f37c6..f87c106 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ -# spplus +# SP+ -Interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch SuS. \ No newline at end of file +Interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch SuS. + +## (future) Features +* Import von CSV-Dateien mit Kurswahl +* Wahlansicht +* Statistiken +* Pflege von Sportkursen (inkl. Kürzel/ alternativen Bezeichnungen) +* Fehleransicht für nicht-existente, aber gewählte Kurse + +## Nutzung +* Build from source: + * Benötigt .NET-SDK 9.0 + * Im Projektordner: `dotnet run +* Release: + * Suche `spplus` bzw. `spplus.exe` und führe aus + * Linux/MacOS evl.: `chmod +x spplus` +` From 60c8a19a584a81bae371e9450aed1021fb5f9610 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Tue, 17 Feb 2026 08:21:25 +0000 Subject: [PATCH 06/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f87c106..e698303 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ Interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch * Release: * Suche `spplus` bzw. `spplus.exe` und führe aus * Linux/MacOS evl.: `chmod +x spplus` -` + From d5ff2aeee037e3a9145fec55a63e94b4db3dc4b5 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Tue, 17 Feb 2026 08:21:46 +0000 Subject: [PATCH 07/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e698303..1cbd12a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch ## Nutzung * Build from source: * Benötigt .NET-SDK 9.0 - * Im Projektordner: `dotnet run + * Im Projektordner: `dotnet run` * Release: * Suche `spplus` bzw. `spplus.exe` und führe aus * Linux/MacOS evl.: `chmod +x spplus` From bbfe6299b5058eb27e66cb375d2a18f2a85fe954 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Tue, 17 Feb 2026 09:30:24 +0100 Subject: [PATCH 08/17] [chore:] added basic ui --- MainWindow.axaml | 49 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/MainWindow.axaml b/MainWindow.axaml index 2180bd0..8159cd1 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -3,7 +3,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" - x:Class="spplus.MainWindow" + x:Class="spplus.MainWindow" WindowState="Maximized" Title="SP+"> @@ -28,7 +28,52 @@