-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPaymentWindow.xaml
More file actions
138 lines (133 loc) · 8.07 KB
/
PaymentWindow.xaml
File metadata and controls
138 lines (133 loc) · 8.07 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<Window x:Class="FlamyPOS.PaymentWindow"
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:FlamyPOS"
mc:Ignorable="d"
x:Name="window"
Title="POS" MaxWidth="550" MinHeight="650"
WindowStartupLocation="CenterScreen"
WindowStyle="None" AllowsTransparency="True" ResizeMode="CanResizeWithGrip">
<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="0:0:.2" Storyboard.TargetProperty="Opacity" From="0" To="1.0"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Window.Resources>
<Style x:Key="numberButton" TargetType="{x:Type Button}">
<Setter Property="Margin" Value="5"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="26"/>
<Setter Property="Height" Value="75"/>
<Setter Property="Width" Value="75"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Ellipse x:Name="ellipse" Stroke="Black" StrokeThickness="1.5" Fill="LightGray"/>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="ellipse"
Storyboard.TargetProperty="Fill.Color"
To="CornflowerBlue" Duration="0:0:0.1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="ellipse"
Storyboard.TargetProperty="Fill.Color"
Duration="0:0:0.1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="confirmBtn" TargetType="{x:Type Button}">
<Setter Property="Background" Value="#039be5"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="MinWidth" Value="80"/>
<Setter Property="MinHeight" Value="45"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style x:Key="cancelBtn" TargetType="{x:Type Button}">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="MinWidth" Value="80"/>
<Setter Property="MinHeight" Value="45"/>
<Setter Property="Padding" Value="15"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
</Window.Resources>
<Border BorderBrush="Black" BorderThickness="2" CornerRadius="5">
<Grid Background="#e8eaf6">
<!-- #EEEEEE"-->
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- #039be5-->
<Label Height="15" Background="#006db3"/>
<Label Grid.Row="1" Background="#039be5" Foreground="White" FontSize="32" HorizontalContentAlignment="Center">Payment</Label>
<StackPanel Grid.Row="2" Margin="10" Orientation="Horizontal" Height="60" VerticalAlignment="Center" HorizontalAlignment="Center">
<Label FontSize="34" VerticalContentAlignment="Center" FontFamily="Kartika">Total due: </Label>
<Label Margin="5" Background="#EEEEEE" Width="200" Height="50" VerticalAlignment="Center"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center"
FontSize="26" FontWeight="Bold"
Content="{Binding TotalBill}" ContentStringFormat="RM {0:F2}"/>
</StackPanel>
<StackPanel Grid.Row="3" Margin="5" HorizontalAlignment="Center">
<Border Background="#ede7f6" BorderBrush="#006db3" BorderThickness="4" CornerRadius="10" Margin="5">
<Label Margin="5" Padding="10" Foreground="DimGray" FontWeight="DemiBold" FontSize="20"
HorizontalAlignment="Center"
MaxWidth="200"
MinHeight="50"
Content="{Binding TotalPayment, StringFormat='RM {0:F2}'}"/>
</Border>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="7">7</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="8">8</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="9">9</Button>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="4">4</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="5">5</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="6">6</Button>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="1">1</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="2">2</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="3">3</Button>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="C">C</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="0">0</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter=".7">.</Button>
</WrapPanel>
<DockPanel LastChildFill="False" Margin="10">
<Button DockPanel.Dock="Left" Style="{StaticResource cancelBtn}" Command="{Binding CancelBtnCommand}">Cancel</Button>
<Button DockPanel.Dock="Right" Style="{StaticResource confirmBtn}" Command="{Binding ConfirmBtnCommand}">Confirm</Button>
</DockPanel>
</StackPanel>
</Grid>
</Border>
</Window>