Files
CineBook/Views/AdminPanelView.xaml

72 lines
4.0 KiB
XML

<UserControl x:Class="CineBook.Views.AdminPanelView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="#0A0A0A">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="🛠 ADMIN-PANEL — BENUTZERVERWALTUNG"
Style="{StaticResource RetroHeader}" Margin="0,0,0,16"/>
<!-- TOOLBAR -->
<Border Grid.Row="1" Background="#111" BorderBrush="#222" BorderThickness="1" Padding="12" Margin="0,0,0,12">
<DockPanel>
<TextBlock Text="BENUTZERLISTE" Style="{StaticResource RetroLabel}" VerticalAlignment="Center"/>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="[ + BENUTZER ANLEGEN ]" Style="{StaticResource RetroButtonGreen}"
Height="30" Click="AddUserClick"/>
<Button x:Name="BtnEditUser" Content="[ ✎ BEARBEITEN ]" Style="{StaticResource RetroButton}"
Margin="6,0" Height="30" Click="EditUserClick" IsEnabled="False"/>
<Button x:Name="BtnDeleteUser" Content="[ ✕ LÖSCHEN ]" Style="{StaticResource RetroButtonRed}"
Height="30" Click="DeleteUserClick" IsEnabled="False"/>
<Button Content="[ ↺ AKTUALISIEREN ]" Style="{StaticResource RetroButtonGray}"
Margin="6,0,0,0" Height="30" Click="RefreshClick"/>
</StackPanel>
</DockPanel>
</Border>
<DataGrid x:Name="UsersGrid" Grid.Row="2" Style="{StaticResource RetroDataGrid}"
SelectionChanged="GridSelectionChanged">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#1a1a1a"/>
<Setter Property="Foreground" Value="#F5C518"/>
<Setter Property="FontFamily" Value="Courier New"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Padding" Value="8,6"/>
<Setter Property="BorderBrush" Value="#333"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#CCC"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#1E1A00"/>
<Setter Property="Foreground" Value="#F5C518"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding UserID}" Width="50"/>
<DataGridTextColumn Header="BENUTZERNAME" Binding="{Binding Username}" Width="160"/>
<DataGridTextColumn Header="ROLLE" Binding="{Binding Role}" Width="100"/>
<DataGridTextColumn Header="E-MAIL" Binding="{Binding Email}" Width="*"/>
<DataGridTextColumn Header="ERSTELLT AM" Binding="{Binding CreatedAt, StringFormat='dd.MM.yyyy'}" Width="120"/>
</DataGrid.Columns>
</DataGrid>
<TextBlock x:Name="StatusText" Grid.Row="3" Style="{StaticResource RetroLabel}"
Foreground="#666" Margin="0,8,0,0"/>
</Grid>
</UserControl>