[chore:] deleting from course list
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<ListBox Grid.RowSpan="2" x:Name="LbStudentsImported" SelectionChanged="LbStudentsImported_OnSelectionChanged" Margin="0,70,0,70" Background="MintCream" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></ListBox>
|
<ListBox Grid.RowSpan="2" x:Name="LbStudentsImported" SelectionChanged="LbStudentsImported_OnSelectionChanged" Margin="0,70,0,70" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></ListBox>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Grid.Row="0" Margin="10,10,10,10" Orientation="Vertical" Spacing="10">
|
<StackPanel Grid.Column="1" Grid.Row="0" Margin="10,10,10,10" Orientation="Vertical" Spacing="10">
|
||||||
<Grid ColumnDefinitions="*,3*">
|
<Grid ColumnDefinitions="*,3*">
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<Grid ColumnDefinitions="*,2*">
|
<Grid ColumnDefinitions="*,2*">
|
||||||
<StackPanel Grid.ColumnSpan="2" Orientation="Horizontal">
|
<StackPanel Grid.ColumnSpan="2" Orientation="Horizontal" Spacing="10">
|
||||||
<Button Margin="0,10,0,0" x:Name="BtnImportDefaultCourses" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnImportDefaultCourses_OnClick" HorizontalContentAlignment="Center">
|
<Button Margin="0,10,0,0" x:Name="BtnImportDefaultCourses" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnImportDefaultCourses_OnClick" HorizontalContentAlignment="Center">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<LucideIcon Kind="Import" Width="24" Height="24" />
|
<LucideIcon Kind="Import" Width="24" Height="24" />
|
||||||
@@ -109,6 +109,20 @@
|
|||||||
FontWeight="Bold" />
|
FontWeight="Bold" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button Margin="0,10,0,0" x:Name="BtnDeleteSinleCourse" Background="#99963434" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnDeleteSinleCourse_OnClick" HorizontalContentAlignment="Center">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<LucideIcon Kind="Trash2" Width="24" Height="24" />
|
||||||
|
<Label Content="Ausgewähltes entfernen" VerticalContentAlignment="Center" FontSize="12"
|
||||||
|
FontWeight="Bold" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
<Button Margin="0,10,0,0" x:Name="BtnClearCourseList" Background="#99963434" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnClearCourseList_OnClick" HorizontalContentAlignment="Center">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<LucideIcon Kind="Trash" Width="24" Height="24" />
|
||||||
|
<Label Content="Liste leeren" VerticalContentAlignment="Center" FontSize="12"
|
||||||
|
FontWeight="Bold" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ListBox Grid.Column="0" x:Name="LbSportCourses" SelectionChanged="LbSportCourses_OnSelectionChanged" Margin="0,55,0,0" />
|
<ListBox Grid.Column="0" x:Name="LbSportCourses" SelectionChanged="LbSportCourses_OnSelectionChanged" Margin="0,55,0,0" />
|
||||||
<StackPanel Grid.Column="1" Grid.Row="0" Margin="10,10,10,10" Orientation="Vertical" Spacing="10">
|
<StackPanel Grid.Column="1" Grid.Row="0" Margin="10,10,10,10" Orientation="Vertical" Spacing="10">
|
||||||
|
|||||||
@@ -354,4 +354,19 @@ public partial class MainWindow : Window
|
|||||||
LbSportCourses.SelectedIndex = curr_selected;
|
LbSportCourses.SelectedIndex = curr_selected;
|
||||||
//} catch (Exception ex) {}
|
//} 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){}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user