forked from E-menu/E_Menu_Personel_App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
151 lines (135 loc) · 8.44 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
<Window x:Class="E_Menu_Personel_App.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:E_Menu_Personel_App"
mc:Ignorable="d" Title="Easy Bistro V2.0" Loaded="Connect_Server"
Width="1920" Height="1080" WindowState="Maximized" WindowStyle="None">
<!--Width="800" Height="700">-->
<Window.Resources>
<!--Add images for button mouse over event-->
<ImageBrush x:Key="power_icon" Stretch="Uniform"
ImageSource="C:\Users\ReXuS\source\repos\E_Menu_Personel_App\Images\pngfuel_hover.png"/>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" StrokeDashArray="1 2" SnapsToDevicePixels="true" StrokeThickness="1" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
<Style x:Key="powerStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource power_icon}"/>
<Setter Property="BorderBrush" TargetName="border" Value="Transparent"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource power_icon}"/>
<Setter Property="BorderBrush" TargetName="border" Value="Transparent"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<Grid.Background>
<ImageBrush ImageSource="Images\bg_grid2.jpg"/>
</Grid.Background>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="250"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="5"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/>
</Grid.RowDefinitions>
<!--Row 1-->
<TextBlock Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="3"
Text="Easy Bistro V2.0" FontSize="50"
FontWeight="Bold" Foreground="White"
HorizontalAlignment="Center" />
<!--Row 2-->
<Grid Grid.Row="0" Grid.Column="0" Grid.RowSpan="8" Grid.ColumnSpan="2">
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF191919" Offset="0.254"/>
<GradientStop Color="#FF474747" Offset="1"/>
</LinearGradientBrush>
</Grid.Background>
</Grid>
<Label x:Name="Timer" Grid.Row="1" Grid.Column="1" FontSize="36" Loaded="Clock_Loaded"
Foreground="White" HorizontalAlignment="Center" Margin="0,15,0,0"/>
<!--<Frame Grid.Row="2" Grid.Column="2" Grid.RowSpan="5" Grid.ColumnSpan="2"
x:Name="Menu" Loaded="Menu_Loaded"
NavigationUIVisibility="Hidden">
</Frame>-->
<Frame Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="5"
Background="Transparent" Loaded="Order_Loaded"
x:Name="Orders" NavigationUIVisibility="Hidden"/>
<Button Style="{DynamicResource powerStyle}" Grid.Column="1" Grid.Row="2"
Click="Button3_Click" Cursor="Hand" Height="200" BorderBrush="{x:Null}">
<Button.Background>
<ImageBrush ImageSource="C:\Users\ReXuS\source\repos\E_Menu_Personel_App\Images\pngfuel.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<!--Row 3-->
<Button Grid.Row="3" Grid.Column="1" x:Name="ButtonTb" Content="Add Dish/Order"
Foreground="White" FontSize="25" Height="60"
Width="180" Margin="10,10,10,10" Background="#FF3F4646"
BorderBrush="#FF871987" Click="Click_Add" Cursor="Hand"/>
<!--Row 4-->
<Button Grid.Row="4" Grid.Column="1" x:Name="RefreshBT" Content="Refresh Table"
Foreground="White" FontSize="25" Height="60"
Width="180" Margin="10,10,10,10" Background="#FF3F4646"
BorderBrush="#FF871987" Click="Click_Refresh" Cursor="Hand"/>
<!--Row 5-->
<!-- DEBUG BOX -->
<!--<TextBox Grid.Row="5" Grid.Column="2" Grid.RowSpan="2" Grid.ColumnSpan="4" MinWidth="400" x:Name="DebugBox" HorizontalAlignment="Center" VerticalAlignment="Bottom"/>-->
<!-- DEBUG BOX -->
</Grid>
</Window>