xmlns:local="clr-namespace:NEA"
StartupUri="SplashPage.xaml">
<Application.Resources>
-
+
+ <Style x:Key="FocusVisual">
+ <Setter Property="Control.Template">
+ <Setter.Value>
+ <ControlTemplate>
+ <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
+ </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="#00BEE6FD"/>
+ <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#003C7FB1"/>
+ <SolidColorBrush x:Key="Button.Pressed.Background" Color="#00C4E5F6"/>
+ <SolidColorBrush x:Key="Button.Pressed.Border" Color="#002C628B"/>
+ <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="NoBlueHighlightOnWordButton" 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" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" 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 Button.MouseOver.Background}"/>
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
+ </Trigger>
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
+ </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>
+ <SolidColorBrush x:Key="Button.MouseOver.Background2" Color="#FFBEE6FD"/>
+ <SolidColorBrush x:Key="Button.MouseOver.Border2" Color="#FF3C7FB1"/>
+ <SolidColorBrush x:Key="Button.Pressed.Background2" Color="#FFC4E5F6"/>
+ <SolidColorBrush x:Key="Button.Pressed.Border2" Color="#FF2C628B"/>
+ <Style x:Key="NoBlueHighlightOnPictureButton" 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" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" 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="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>
+ <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
+ <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA"/>
+ <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5"/>
+ <Style x:Key="TextboxHint" TargetType="{x:Type TextBox}">
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
+ <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
+ <Setter Property="BorderThickness" Value="1"/>
+ <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="AllowDrop" Value="true"/>
+ <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
+ <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type TextBox}">
+ <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
+ <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
+ </Border>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Opacity" TargetName="border" Value="0.56"/>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.MouseOver.Border}"/>
+ </Trigger>
+ <Trigger Property="IsKeyboardFocused" Value="true">
+ <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.Focus.Border}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
+ <Condition Property="IsSelectionActive" Value="false"/>
+ </MultiTrigger.Conditions>
+ <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
+ </MultiTrigger>
+ </Style.Triggers>
+ </Style>
+
</Application.Resources>
</Application>
xmlns:local="clr-namespace:NEA"
mc:Ignorable="d"
Title="Store"
- ResizeMode="NoResize"
+
WindowStartupLocation="CenterScreen"
- WindowState="Maximized" Width="1089" Height="719" Background="#FF403939">
+ WindowState="Maximized" Width="1231.5" Height="1069" Background="#FF403939">
<Grid>
- <Border x:Name="bor1" BorderBrush="White" BorderThickness="1" Height="41" Margin="1534,262,0,0" CornerRadius="15" Background="#FF499E3C" HorizontalAlignment="Left" Width="347" VerticalAlignment="Top"/>
- <Button x:Name="btnSignUp" Content="Sign Up" BorderBrush="#00707070" ClipToBounds="True" Background="#01F4F7FC" Foreground="White" HorizontalAlignment="Left" Width="346" Height="41" VerticalAlignment="Top" Margin="1534,551,0,0" Style="{DynamicResource ButtonStyle1}" />
- <Label x:Name="lblIGN" Content="" HorizontalAlignment="Left" Height="35" Margin="488,262,0,0" VerticalAlignment="Top" Width="200" Foreground="White" FontSize="18"/>
- <TextBox x:Name="txtSearch" HorizontalAlignment="Left" Height="30" Margin="663,80,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="257"/>
- <Button x:Name="btnsearch" Content="Button" HorizontalAlignment="Left" Height="30" Margin="952,80,0,0" VerticalAlignment="Top" Width="59"/>
- <TextBox x:Name="txtname" HorizontalAlignment="Left" Height="24" Margin="54,158,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="164"/>
- <Image x:Name="imglogo" HorizontalAlignment="Left" Height="231" Margin="411,262,0,0" VerticalAlignment="Top" Width="259"/>
- <Button Content="Button" HorizontalAlignment="Left" Height="162" Margin="98,331,0,0" VerticalAlignment="Top" Width="238" Click="Button_Click"/>
+
+ <Border BorderBrush="Black" BorderThickness="1" Background="#FF343232" Height="64" VerticalAlignment="Top"/>
+ <TextBox x:Name="txtSearch" HorizontalAlignment="Right" Height="30" Margin="0,10,69,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="257" BorderBrush="#00ABADB3" Foreground="White" >
+ <TextBox.Style>
+ <Style xmlns:sys="clr-namespace:System;assembly=mscorlib" TargetType="{x:Type TextBox}">
+ <Style.Resources>
+ <VisualBrush x:Key="CueBannerBrush" AlignmentX="Left" AlignmentY="Center" Stretch="None">
+ <VisualBrush.Visual>
+ <Label Content="Search" Foreground="White" FontSize="35"/>
+ </VisualBrush.Visual>
+ </VisualBrush>
+ </Style.Resources>
+ <Style.Triggers>
+ <Trigger Property="IsKeyboardFocused" Value="False">
+ <Setter Property="Background" Value="#FF4D4B4B" />
+ </Trigger>
+ <Trigger Property="Text" Value="{x:Static sys:String.Empty}">
+ <Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
+ </Trigger>
+ <Trigger Property="Text" Value="{x:Null}">
+ <Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
+ </Trigger>
+ <Trigger Property="IsKeyboardFocused" Value="True">
+ <Setter Property="Background" Value="#FF4D4B4B" />
+ </Trigger>
+
+ </Style.Triggers>
+ </Style>
+ </TextBox.Style>
+ </TextBox>
+ <Button x:Name="btnsearch" Content="" BorderBrush="#00938484" HorizontalAlignment="Right" Width="59" Height="30" VerticalAlignment="Top" Margin="0,10,10,0" Style="{DynamicResource NoBlueHighlightOnPictureButton}" RenderTransformOrigin="1.907,0.6">
+ <Button.Background>
+ <ImageBrush ImageSource="search.png"/>
+ </Button.Background>
+ </Button>
+ <Button x:Name="btnStore" Content="STORE" HorizontalAlignment="Left" Height="64" VerticalAlignment="Top" Width="150" Background="#00DDDDDD" BorderBrush="#00707070" Foreground="White" FontFamily="Tw Cen MT Condensed Extra Bold" FontSize="48" Style="{DynamicResource NoBlueHighlightOnWordButton}">
+ <Button.Effect>
+ <DropShadowEffect Color="White" Direction="100" Opacity="0.5" ShadowDepth="2"/>
+ </Button.Effect>
+ </Button>
+ <TextBox x:Name="txtname" HorizontalAlignment="Left" Height="56" Margin="0,64,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="725" Background="#FF403939" BorderBrush="#00ABADB3" Foreground="#FF9E9E9E" SelectionBrush="#000078D7" FontSize="40" IsEnabled="False"/>
+ <Button x:Name="btnlirary" Content="LIBRARY" HorizontalAlignment="Left" Height="64" VerticalAlignment="Top" Width="174" Background="#00DDDDDD" BorderBrush="#00707070" Foreground="White" FontFamily="Tw Cen MT Condensed Extra Bold" FontSize="48" Margin="150,0,0,0" Style="{DynamicResource NoBlueHighlightOnWordButton}">
+ <Button.Effect>
+ <DropShadowEffect Color="White" Direction="100" Opacity="0.5" ShadowDepth="2"/>
+ </Button.Effect>
+ </Button>
+ <Button x:Name="BTNaCCOUNT" Content="ACCOUNT" HorizontalAlignment="Left" Height="64" VerticalAlignment="Top" Width="174" Background="#00DDDDDD" BorderBrush="#00707070" Foreground="White" FontFamily="Tw Cen MT Condensed Extra Bold" FontSize="48" Margin="329,0,0,0" Style="{DynamicResource NoBlueHighlightOnWordButton}">
+ <Button.Effect>
+ <DropShadowEffect Color="White" Direction="100" Opacity="0.5" ShadowDepth="2"/>
+ </Button.Effect>
+ </Button>
+ <Image x:Name="imgLogo" HorizontalAlignment="Left" Height="242" Margin="0,125,0,0" VerticalAlignment="Top" Width="503" Stretch="UniformToFill"/>
+ <ListBox x:Name="lstTags" HorizontalAlignment="Left" Height="46" Margin="0,601,0,0" VerticalAlignment="Top" Width="503"/>
+ <Button x:Name="btnBuy" Content="" HorizontalAlignment="Left" Height="67" Margin="0,367,0,0" VerticalAlignment="Top" Width="503" FontSize="35"/>
+ <Label x:Name="lblPublisher" Content="" HorizontalAlignment="Left" Height="54" Margin="0,542,0,0" VerticalAlignment="Top" Width="503" FontSize="35" Foreground="#FF9E9E9E"/>
+ <Label x:Name="lblReviews" Content="" HorizontalAlignment="Left" Height="54" Margin="0,488,0,0" VerticalAlignment="Top" Width="503" FontSize="35" Foreground="#FF9E9E9E"/>
+ <Label x:Name="lblRating" Content="" HorizontalAlignment="Left" Height="54" Margin="0,434,0,0" VerticalAlignment="Top" Width="503" Background="#00000000" FontSize="35" Foreground="#FF9E9E9E"/>
</Grid>
Dim dr As System.Data.DataRow
Dim da As New NEADataSetTableAdapters.GamesTableAdapter
Dim dt As System.Data.DataTable
+ Dim search As String
+ search = LCase(txtSearch.Text)
dt = ds.Tables("Games")
da.Fill(dt)
For Each dr In dt.Rows
- If String.Compare(dr("Name"), txtSearch.Text) = 0 Then
-
-
- Dim Q As String = "[Name] = '" & txtSearch.Text & "'"
+ If String.Compare(dr("Name"), search) = 0 Then
+ Dim Q As String = "[Name] = '" & search & "'"
Dim result() As NEADataSet.GamesRow = dt.Select(Q)
-
id = result(0).GameID
-
-
GoTo LineBreak
+ Else
+ MsgBox("The game you entered is not in the database", vbExclamation)
End If
Next
- MsgBox("The game you entered is not in the database", vbExclamation)
+
LineBreak:
ds.Dispose()
-
For Each dr In dt.Rows
If String.Compare(dr("GameID"), id) = 0 Then
txtname.AppendText(dr.Item("Name"))
-
-
-
-
+ btnBuy.Content = "Buy for £" & dr.Item("Price")
+ lblPublisher.Content = "Publisher: " & dr.Item("Publisher")
+ lblRating.Content = "This game is rated " & dr.Item("Rating") & " out of 5"
+ lblReviews.Content = "Gamer review: "
Dim bytes As [Byte]() = dr.Item("Icon")
Dim ms As New MemoryStream(bytes)
-
Dim bi As New BitmapImage()
bi.BeginInit()
bi.StreamSource = ms
bi.EndInit()
-
- imglogo.Source = bi
+ imgLogo.Source = bi
End If
Next