-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMachineCheckHistoryForm.xaml
More file actions
110 lines (103 loc) · 4.64 KB
/
MachineCheckHistoryForm.xaml
File metadata and controls
110 lines (103 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<Window x:Class="MachineCheck.MachineCheckHistoryForm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Historia przeglądów" Height="450" Width="650"
WindowStartupLocation="CenterOwner"
Background="#F4F6F8"
FontFamily="Segoe UI"
FontSize="14"
ResizeMode="NoResize">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Title -->
<TextBlock Text="Historia przeglądów maszyny"
FontSize="22"
FontWeight="Bold"
Foreground="#333"
Margin="0,0,0,20" />
<!-- DataGrid -->
<DataGrid x:Name="dgHistory"
Grid.Row="1"
AutoGenerateColumns="False"
CanUserAddRows="False"
HeadersVisibility="Column"
GridLinesVisibility="Horizontal"
RowBackground="White"
AlternatingRowBackground="#F9FAFB"
HorizontalGridLinesBrush="#E0E0E0"
VerticalGridLinesBrush="#E0E0E0"
Margin="0,0,0,10"
ItemsSource="{Binding MachineChecks}"
SelectionMode="Single"
BorderBrush="#CCC"
BorderThickness="1"
FontSize="14"
IsReadOnly="True"
FontWeight="Normal">
<DataGrid.Resources>
<Style TargetType="DataGridRow">
<Setter Property="Height" Value="36" />
<Setter Property="Margin" Value="2" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="#333" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FFDCDEE0" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Header="Data przeglądu" Binding="{Binding CheckDate, StringFormat=d}" Width="*" />
<DataGridTextColumn Header="Operator" Binding="{Binding OperatorName}" Width="*" />
<DataGridTemplateColumn Header="Protokół" Width="120">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="Otwórz PDF"
Padding="4"
Background="#2196F3"
Foreground="White"
BorderThickness="0"
FontWeight="Bold"
Cursor="Hand"
Click="OpenPdfButton_Click" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Akcje" Width="100">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="Usuń"
Padding="4"
Background="#E53935"
Foreground="White"
BorderThickness="0"
FontWeight="Bold"
Cursor="Hand"
Click="DeleteCheckButton_Click" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<!-- Back Button -->
<Button Content="Powrót"
Grid.Row="2"
Width="120"
Padding="8"
HorizontalAlignment="Right"
Background="#4CAF50"
Foreground="White"
BorderThickness="0"
FontWeight="Bold"
Cursor="Hand"
Click="BackButton_Click" />
</Grid>
</Window>