Compare commits
3 Commits
987f27fcbc
...
be436f1b1c
| Author | SHA1 | Date | |
|---|---|---|---|
| be436f1b1c | |||
| 14c11b81b6 | |||
| dd38b91d68 |
@@ -88,6 +88,11 @@
|
||||
<Label Content="Anzahl gewählte Kurse"></Label>
|
||||
<Label Grid.Column="1" x:Name="LblSelectedAmount"></Label>
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="*,3*">
|
||||
<Label Content="Wahlzahlen"></Label>
|
||||
<Label Grid.Column="1" x:Name="LblNumVoted"></Label>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -205,7 +210,7 @@
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<Grid ColumnDefinitions="*,*" RowDefinitions="50,2*,*">
|
||||
<ListBox Grid.RowSpan="2" x:Name="LbResult" Margin="10,10,10,10"></ListBox>
|
||||
<ListBox Grid.RowSpan="2" x:Name="LbResult" Margin="0,10,10,10"></ListBox>
|
||||
<Button Grid.Row="0" Grid.Column="1" Margin="0,10,0,0" x:Name="BtnExportCoursePDF" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnExportCoursePDF_OnClick" HorizontalContentAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="FileText" Width="24" Height="24" />
|
||||
|
||||
@@ -122,6 +122,32 @@ public partial class MainWindow : Window
|
||||
LblStudentAmount.Content = Settings.Instance.Students.Count.ToString();
|
||||
LblSelectedAmount.Content = count_selected.ToString();
|
||||
|
||||
List<(Sport, List<string>)> initial_sportlist = new();
|
||||
foreach (var sp in Settings.Instance.Sports)
|
||||
{
|
||||
initial_sportlist.Add((sp, new()));
|
||||
}
|
||||
foreach (Student s in Settings.Instance.Students)
|
||||
{
|
||||
foreach (var sp in s.SelectedCourseNames)
|
||||
{
|
||||
foreach (var item in initial_sportlist)
|
||||
{
|
||||
if (item.Item1.AlternativeNames.Contains(sp))
|
||||
{
|
||||
item.Item2.Add(s.ID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LblNumVoted.Content = "";
|
||||
foreach (var s in initial_sportlist)
|
||||
{
|
||||
LblNumVoted.Content += $"{s.Item1.Name}: {s.Item2.Count}\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void BtnCraftCourses_OnClick(object? sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user