generated from kzi-nastava/dotnet-wpf-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from kzi-nastava/feat/enter-results-window-la…
…yout Feat: add enter results window layout
- Loading branch information
Showing
3 changed files
with
349 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
<Window x:Class="LangLang.View.ExamSlotGUI.EnterResults" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
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" | ||
xmlns:local="clr-namespace:LangLang.View.ExamSlotGUI" | ||
mc:Ignorable="d" | ||
Title="EnterResults" Height="585" Width="800" | ||
WindowStartupLocation="CenterScreen" | ||
ResizeMode="NoResize"> | ||
<Grid RenderTransformOrigin="0.5,0.511"> | ||
|
||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="223*" /> | ||
<ColumnDefinition Width="177*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Label x:Name="Lsbl" Content="Students that entered exam and their points" Grid.Row="0" HorizontalAlignment="Center" Height="30" Margin="0,10,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.499,0.077" FontFamily="Arial" FontWeight="Bold" HorizontalContentAlignment="Center"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
|
||
<!--start of table--> | ||
<DataGrid EnableRowVirtualization="False" CanUserAddRows="False" AutoGenerateColumns="False" x:Name="studentsTable" Margin="10,57,0,88" SelectedItem="{Binding SelectedStudent, UpdateSourceTrigger=PropertyChanged}" SelectionChanged="studentsDataGrid_SelectionChanged"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn IsReadOnly="True" Header="Name" Binding="{Binding Name}"/> | ||
<DataGridTextColumn IsReadOnly="True" Header="LastName" Binding="{Binding LastName}"/> | ||
<DataGridTextColumn IsReadOnly="True" Header="Email" Binding="{Binding Email}"/> | ||
<DataGridTextColumn IsReadOnly="True" Header="Reading" Binding="{Binding PhoneNumber}"/> | ||
<DataGridTextColumn IsReadOnly="True" Header="Listening" Binding="{Binding BirthDate}"/> | ||
<DataGridTextColumn IsReadOnly="True" Header="Writing" Binding="{Binding BirthDate}"/> | ||
<DataGridTextColumn IsReadOnly="True" Header="Speaking" Binding="{Binding BirthDate}"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
|
||
<!-- start of student info label--> | ||
<Label x:Name="Lbl" Grid.Column="1" Content="Student information" Grid.Row="0" HorizontalAlignment="Center" Height="30" Margin="0,10,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.499,0.077" FontFamily="Arial" FontWeight="Bold" HorizontalContentAlignment="Center"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
<!-- end of student info label --> | ||
|
||
<!--NAME LABEL--> | ||
<Label x:Name="nameLBL" Content="name" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,57,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
<!--NAME TEXTBOX--> | ||
<TextBox x:Name="nameTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,83,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.Name, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
<!--LASTNAME LABEL--> | ||
<Label x:Name="lastnameLBL" Grid.Column="1" Content="lastname" HorizontalAlignment="Center" Height="26" Margin="0,119,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
<!--LASTNAME TEXTBOX--> | ||
<TextBox x:Name="lastnameTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,145,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.LastName, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" | ||
BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
|
||
<!--EMAIL LABEL--> | ||
<Label x:Name="emailLBL" Content="email" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,181,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
<!--EMAIL TEXTBOX--> | ||
<TextBox x:Name="emailTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,207,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.Email, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
<!--READING POINTS LABEL--> | ||
<Label x:Name="readingPointsLBL" Content="Reading points" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,243,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
<!--READING POINTS TEXTBOX--> | ||
<TextBox x:Name="readingPointsTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,269,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.PhoneNumber, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
|
||
<!--LISTENING POINTS LABEL--> | ||
<Label x:Name="listeningPointsLBL" Content="Listening points" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,305,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
|
||
<!--LISTENING POINTS TEXTBOX--> | ||
<TextBox x:Name="listeningPointsTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,331,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.PhoneNumber, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
|
||
<!--WRITING POINTS LABEL--> | ||
<Label x:Name="writingPointsLBL" Content="Writing points" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,367,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
|
||
<!-- WRITING POINTS TEXTBOX--> | ||
<TextBox x:Name="writingPointsTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,393,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.PhoneNumber, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
<!-- SPEAKING POINTS LABEL--> | ||
<Label x:Name="speakingPointsLBL" Content="Speaking points" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,429,0,0" VerticalAlignment="Top" Width="310" FontStyle="Italic" Foreground="Black" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" FontWeight="Bold"> | ||
<Label.RenderTransform> | ||
<TransformGroup> | ||
<ScaleTransform/> | ||
<SkewTransform AngleX="0"/> | ||
<RotateTransform/> | ||
<TranslateTransform X="0"/> | ||
</TransformGroup> | ||
</Label.RenderTransform> | ||
<Label.Background> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black" Offset="1"/> | ||
<GradientStop Color="#FFFFBDBD" Offset="0.889"/> | ||
<GradientStop Color="#FFFFF7F7" Offset="0.2"/> | ||
</LinearGradientBrush> | ||
</Label.Background> | ||
</Label> | ||
<!-- SPEAKING POINTS TEXTBOX--> | ||
<TextBox x:Name="speakingPointsTB" Grid.Column="1" HorizontalAlignment="Center" Height="26" Margin="0,455,0,0" TextWrapping="Wrap" | ||
Text="{Binding Path=Student.PhoneNumber, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" | ||
VerticalAlignment="Top" Width="310" VerticalContentAlignment="Center" Background="#FFFFF3F3" BorderBrush="#FF724879" FontFamily="Bahnschrift Light" SelectionTextBrush="#FFF3B0B0" SelectionBrush="#FFFFEBEB" > | ||
<TextBox.OpacityMask> | ||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> | ||
<GradientStop Color="Black"/> | ||
<GradientStop Color="White" Offset="1"/> | ||
</LinearGradientBrush> | ||
</TextBox.OpacityMask> | ||
</TextBox> | ||
|
||
<Button x:Name="confirmResultBtn" Content="Confirm results for student" HorizontalAlignment="Center" Height="35" Margin="0,501,0,0" VerticalAlignment="Top" Width="248" BorderBrush="White" Background="#FFFFDBDB" Foreground="#FF514141" FontFamily="Segoe UI Black" RenderTransformOrigin="0.676,0.745" Grid.Column="1"/> | ||
|
||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
|
||
|
||
namespace LangLang.View.ExamSlotGUI | ||
{ | ||
/// <summary> | ||
/// Interaction logic for EnterResults.xaml | ||
/// </summary> | ||
public partial class EnterResults : Window | ||
{ | ||
public EnterResults() | ||
{ | ||
InitializeComponent(); | ||
|
||
disableForm(); | ||
} | ||
|
||
private void disableForm() | ||
{ | ||
nameTB.IsEnabled = false; | ||
lastnameTB.IsEnabled = false; | ||
emailTB.IsEnabled = false; | ||
readingPointsTB.IsEnabled = false; | ||
listeningPointsTB.IsEnabled = false; | ||
writingPointsTB.IsEnabled = false; | ||
speakingPointsTB.IsEnabled = false; | ||
confirmResultBtn.IsEnabled = false; | ||
} | ||
|
||
private void enableForm() | ||
{ | ||
readingPointsTB.IsEnabled = true; | ||
listeningPointsTB.IsEnabled = true; | ||
writingPointsTB.IsEnabled = true; | ||
speakingPointsTB.IsEnabled = true; | ||
confirmResultBtn.IsEnabled = true; | ||
} | ||
|
||
private void studentsDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) | ||
{ | ||
// TODO: implement | ||
} | ||
|
||
private void fillForm() | ||
{ | ||
|
||
} | ||
|
||
} | ||
} |
Oops, something went wrong.