Files
DE70/.svn/pristine/81/8162605084f50faf2b443acd0713abc1a956cd76.svn-base
2024-09-02 10:03:23 +07:00

235 lines
12 KiB
Plaintext

<UserControl x:Class="SafeBagDE70.DepositSMUCv2"
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:SafeBagDE70"
mc:Ignorable="d"
Width="1280"
Height="1024"
Background="#F0F0F0"
Loaded="UserControl_Loaded"
Unloaded="UserControl_Unloaded">
<UserControl.Resources>
<local:LastItemIndexConverter x:Key="LastItemIndexConverter" />
<DataTemplate x:Key="BoldTemplateWithSeparator">
<Grid>
<Grid.RowDefinitions>
<!-- Separator Row -->
<RowDefinition Height="2"/>
<!-- Data Row -->
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Separator Line -->
<Rectangle Grid.Row="0" Height="2" Fill="Gray" HorizontalAlignment="Stretch"/>
<!-- Data Content for Last Row -->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}" FontWeight="Bold" Grid.Column="0" />
<TextBlock Text="{Binding Quantity}" FontWeight="Bold" Grid.Column="1" />
<TextBlock Text="{Binding Value}" FontWeight="Bold" Grid.Column="2" />
</Grid>
</Grid>
</DataTemplate>
</UserControl.Resources>
<Border BorderThickness="1" BorderBrush="Gray" Margin="10">
<Grid x:Name="gridMainPanel">
<!--<ContentControl x:Name="MainContent" />-->
<Grid.RowDefinitions>
<RowDefinition Height="120"/>
<RowDefinition Height="*"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Border BorderThickness="0" Background="#003366">
<StackPanel Grid.Row="0" >
<Label
x:Name="lblName"
Background="Transparent"
Foreground="White"
BorderThickness="0"
FontWeight="Bold"
FontSize="20"
Height="40"/>
<Label HorizontalAlignment="Center"
x:Name="lblUser"
Background="Transparent"
Foreground="White"
BorderThickness="0"
FontSize="20"
FontWeight="Bold"
Height="40"/>
<Label HorizontalAlignment="Center"
x:Name="lblTransactionCode"
Background="Transparent"
Foreground="White"
BorderThickness="0"
FontSize="20"
FontWeight="Bold"
Height="40"/>
<Border BorderThickness="1" BorderBrush="Gray">
<Separator BorderThickness="2" BorderBrush="Gray"/>
</Border>
</StackPanel>
</Border>
<Grid Grid.Row="1" x:Name="gridMain" VerticalAlignment="Center" Margin="5" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Button HorizontalAlignment="Stretch"
Content="BẮT ĐẦU"
x:Name="btnStart"
Click="btnCommon_Click"
FontSize="30"
FontWeight="Bold"
Height="80"
Margin="10,0,10,10"
Background="#4CAF50" Foreground="White"/>
<Button HorizontalAlignment="Stretch"
Content="NỘP TIỀN"
x:Name="btnCountStart"
Click="btnCommon_Click"
FontSize="30"
FontWeight="Bold"
Height="80"
Margin="10"
Background="#2196F3" Foreground="White"/>
<Button HorizontalAlignment="Stretch"
Content="KIỂM TRA"
x:Name="btnCheck"
Click="btnCommon_Click"
FontSize="30"
FontWeight="Bold"
Height="80"
Margin="10"
Background="#2196F3" Foreground="White"
/>
</StackPanel>
<StackPanel Grid.Column="2">
<Button HorizontalAlignment="Stretch"
Content="LƯU TRỮ"
x:Name="btnStoreStart"
Click="btnCommon_Click"
FontSize="30"
FontWeight="Bold"
Height="80"
Margin="10,0,10,10"
Background="#4CAF50" Foreground="White"/>
<Button HorizontalAlignment="Stretch"
Content="KẾT THÚC"
FontWeight="Bold"
x:Name="btnEnd"
Click="btnCommon_Click"
FontSize="30"
Height="80"
Margin="10"
Background="#4CAF50" Foreground="White"/>
<Button HorizontalAlignment="Stretch"
Content="THOÁT"
FontWeight="Bold"
x:Name="btnLogout"
Click="btnCommon_Click"
FontSize="30"
Height="80"
Margin="10"
Background="Red" Foreground="White"/>
</StackPanel>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<ListView HorizontalAlignment="Center" FontSize="30" Width="600" x:Name="lvCount"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.CanContentScroll="False"
Background="Transparent">
<ListView.Resources>
<!-- Style for GridViewColumnHeader to set font to bold -->
<Style TargetType="GridViewColumnHeader">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Right"/>
</Style>
</ListView.Resources>
<ListView.View>
<GridView>
<GridViewColumn Header="Mệnh giá"
DisplayMemberBinding="{Binding Name}"
Width="200"/>
<GridViewColumn Header="Số lượng"
DisplayMemberBinding="{Binding Quantity}"
Width="150"/>
<GridViewColumn Header="Thành tiền"
DisplayMemberBinding="{Binding Value}"
Width="200"/>
</GridView>
</ListView.View>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<!-- Condition 1: Check if AlternationIndex equals Item Count - 1 -->
<Condition Value="True">
<Condition.Binding>
<MultiBinding Converter="{StaticResource LastItemIndexConverter}">
<Binding Path="Name"/>
</MultiBinding>
</Condition.Binding>
</Condition>
</MultiDataTrigger.Conditions>
<Setter Property="FontWeight" Value="Bold" />
</MultiDataTrigger>
</Style.Triggers>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<Grid Grid.Row="1" x:Name="spNotesInSession">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Height="50" FontSize="20" FontWeight="Bold" BorderBrush="Transparent" Background="Transparent" Content="Số tờ hợp lệ"/>
<Label Grid.Column="1" Height="50" FontSize="20" FontWeight="Bold" BorderBrush="Transparent" Background="Transparent" x:Name="lblGenuineNotesInSession" Content="{Binding GenuineNotes}"/>
<Label Grid.Column="2" Height="50" FontSize="20" FontWeight="Bold" BorderBrush="Transparent" Background="Transparent" Content="Không hợp lệ"/>
<Label Grid.Column="3" Height="50" FontSize="20" FontWeight="Bold" BorderBrush="Transparent" Background="Transparent" x:Name="lblRejectNotesInSession" Content="{Binding RejectNotes}"/>
</Grid>
</Grid>
</Grid>
<StackPanel Grid.Row="2" Background="#003366">
<Separator BorderThickness="2" BorderBrush="Gray"/>
<Label Height="40" x:Name="lblStatus" Background="Transparent" BorderThickness="0" Foreground="Red" FontSize="20" Content="TRẠNG THÁI"/>
</StackPanel>
</Grid>
</Border>
</UserControl>