kursovaya/StudentWindow.axaml
2025-04-11 13:14:28 +03:00

66 lines
5.7 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="kursovaya.StudentWindow"
x:CompileBindings="False"
Title="StudentWindow">
<Border Background="Bisque">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Background="LightBlue" Height="30">
<Button DockPanel.Dock="Left" Content="Назад" Click="ButtonBack_OnClick" Width="100" HorizontalAlignment="Left" Foreground="Black" Background="LightGray"/>
<ComboBox x:Name="DisciplineComboBox" HorizontalAlignment="Center" SelectionChanged="DisciplineCombobox_OnSelectionChanged"/>
<Button Content="Просмотр аттестации" Click="CheckAttest_OnClick" Foreground="Black"/>
<TextBlock x:Name="InfoTextBlock" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="15" DockPanel.Dock="Right" Foreground="Black"/>
</StackPanel>
<Grid DockPanel.Dock="Top" ColumnDefinitions="3*,3*,1*,1*,1*,1*,1*" Background="LightGray" Height="35">
<TextBlock Grid.Column="0" Text="Дисциплина" VerticalAlignment="Center" Margin="5" FontWeight="Bold" Foreground="Black"/>
<TextBlock Grid.Column="1" Text="Преподаватель" VerticalAlignment="Center" Margin="5" FontWeight="Bold" Foreground="Black"/>
<TextBlock Grid.Column="2" Text="1 Аттестация" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" Foreground="Black"/>
<TextBlock Grid.Column="3" Text="2 Аттестация" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" Foreground="Black"/>
<TextBlock Grid.Column="4" Text="3 Аттестация" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" Foreground="Black"/>
<TextBlock Grid.Column="5" Text="Итог" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" Foreground="Black"/>
<TextBlock Grid.Column="6" Text="Оценка" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold" Foreground="Black"/>
</Grid>
<ScrollViewer>
<ItemsControl x:Name="FlatAttestationGrid" ItemsSource="{Binding Attestations}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid ColumnDefinitions="3*,3*,1*,1*,1*,1*,1*" Margin="2" Background="LightGray" Height="40">
<Border Grid.Column="0" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding DisciplineName}" VerticalAlignment="Center" Margin="10,0" Foreground="Black"/>
</Border>
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding TeacherName}" VerticalAlignment="Center" Margin="10,0" Foreground="Black"/>
</Border>
<Border Grid.Column="2" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding AttestFirst}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black"/>
</Border>
<Border Grid.Column="3" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding AttestSecond}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black"/>
</Border>
<Border Grid.Column="4" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding AttestThird}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black"/>
</Border>
<Border Grid.Column="5" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding Total}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black"/>
</Border>
<Border Grid.Column="6" BorderBrush="Black" BorderThickness="0.5">
<TextBlock Text="{Binding Grade}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black"/>
</Border>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</DockPanel>
</Border>
</Window>