-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
92 lines (82 loc) · 4.32 KB
/
MainWindow.xaml
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
<Window x:Class="WpfApp1.MainWindow"
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:WpfApp1"
mc:Ignorable="d"
Title="Hennessy QC V1.0.0" Height="450" Width="800">
<!-- Window Background with Gradient Color -->
<Window.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#FF007ACC" Offset="0.0"/>
<!-- Light Blue -->
<GradientStop Color="#FF4CAF50" Offset="1.0"/>
<!-- Green -->
</LinearGradientBrush>
</Window.Background>
<Window.Resources>
<!-- Green Full Circle Flash Animation -->
<Storyboard x:Key="GoodFlashAnimation">
<ColorAnimation Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
From="Transparent" To="Green" Duration="0:0:0.5" AutoReverse="True"/>
</Storyboard>
<!-- Red Full Circle Flash Animation -->
<Storyboard x:Key="BadFlashAnimation">
<ColorAnimation Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
From="Transparent" To="Red" Duration="0:0:0.5" AutoReverse="True"/>
</Storyboard>
</Window.Resources>
<Grid>
<!-- Main Layout -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<!-- Left Panel -->
<ColumnDefinition Width="4*"/>
<!-- Right Panel -->
</Grid.ColumnDefinitions>
<!-- Left Panel -->
<DockPanel Grid.Column="0" Background="LightGray">
<!-- Spacer to Push Content Up -->
<StackPanel DockPanel.Dock="Top">
<!-- Placeholder for other buttons or content -->
</StackPanel>
<!-- About Button at the Bottom -->
<Button Content="About" Height="40" Margin="0" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" DockPanel.Dock="Bottom" Command="{Binding AboutCommand}"/>
</DockPanel>
<!-- Main Data Section -->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<!-- Top Section -->
<RowDefinition Height="Auto"/>
<!-- Buttons -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<!-- Product Count -->
<ColumnDefinition Width="1*"/>
<!-- Bad Product Count -->
</Grid.ColumnDefinitions>
<!-- Good Product Circle -->
<Grid Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">
<Ellipse x:Name="GoodEllipse" Width="200" Height="200" Stroke="Green" StrokeThickness="5" Fill="Transparent"/>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{Binding GoodProductCount}" FontSize="36" FontWeight="Bold" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</Grid>
<!-- Bad Product Count Circle with Counter -->
<Grid Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Ellipse Width="200" Height="200" Stroke="Red" StrokeThickness="5"/>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{Binding BadProductCount}" FontSize="36" FontWeight="Bold" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</Grid>
<!-- Buttons at the Bottom -->
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,20,0,0">
<Button Width="100" Height="30" Content="{Binding StartStopButtonText}" Command="{Binding StartStopCommand}" Margin="10,0"/>
<Button Content="Reset" Width="100" Height="30" Command="{Binding ResetCommand}" Margin="10,0"/>
</StackPanel>
</Grid>
</Grid>
</Window>