From df282d1164f16cd830a692a8f39c5009d4ffc8da Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Tue, 3 Mar 2026 08:14:24 +0100 Subject: [PATCH] [chore:] deleting from course list --- MainWindow.axaml | 18 ++++++++++++++++-- MainWindow.axaml.cs | 15 +++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/MainWindow.axaml b/MainWindow.axaml index 968e35f..fc4e6b4 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -45,7 +45,7 @@ - + @@ -101,7 +101,7 @@ - + + + diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index f38e38c..5a43984 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -354,4 +354,19 @@ public partial class MainWindow : Window LbSportCourses.SelectedIndex = curr_selected; //} catch (Exception ex) {} } + + private void BtnClearCourseList_OnClick(object? sender, RoutedEventArgs e) + { + Settings.Instance.Sports.Clear(); + RefreshCoursesList(); + } + + private void BtnDeleteSinleCourse_OnClick(object? sender, RoutedEventArgs e) + { + try + { + Settings.Instance.Sports.Remove(LbSportCourses.SelectedItem as Sport); + RefreshCoursesList(); + } catch (Exception ex){} + } } \ No newline at end of file