[feat:] max courses per semester changeable

This commit is contained in:
2026-03-17 14:34:24 +01:00
parent c2e230ca48
commit ea280ea05d
2 changed files with 17 additions and 0 deletions

View File

@@ -188,6 +188,11 @@
</StackPanel>
</Grid>
<Line />
<Grid ColumnDefinitions="*,3*">
<Label Content="Maximale Sportkursanzahl pro Semester"></Label>
<NumericUpDown Grid.Column="1" x:Name="NudSportMaxPerSemester" ValueChanged="NudSportMaxPerSemester_OnValueChanged"></NumericUpDown>
</Grid>
</StackPanel>
</Grid>
</TabItem>

View File

@@ -17,6 +17,10 @@ public partial class MainWindow : Window
Settings.ImportInitial();
Instance = this;
RefreshCoursesList();
try
{
NudSportMaxPerSemester.Value = Settings.Instance.NumCoursesPerSemester;
} catch {}
}
private void MnuExpSettings_OnClick(object? sender, RoutedEventArgs e)
@@ -384,4 +388,12 @@ public partial class MainWindow : Window
{
// Export as PDF
}
private void NudSportMaxPerSemester_OnValueChanged(object? sender, NumericUpDownValueChangedEventArgs e)
{
try
{
Settings.Instance.NumCoursesPerSemester = Convert.ToInt32(NudSportMaxPerSemester.Value);
} catch {}
}
}