Added in app WebView to view Privacy page
This commit is contained in:
Родитель
ff34dd6f95
Коммит
7cbbc48a9e
|
@ -241,7 +241,6 @@
|
|||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Button x:Name="HelpNavRightButton" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20,10,20,10" Foreground="{StaticResource ToolBarButtonBackground}" FontSize="24" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Padding="0,0,0,0" Click="OnHelpNavRight">
|
||||
<Border Background="White" CornerRadius="5" HorizontalAlignment="Stretch">
|
||||
<TextBlock Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" FontFamily="Segoe MDL2 Assets" FontSize="72"></TextBlock>
|
||||
|
@ -259,7 +258,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="1" HorizontalAlignment="Center" TextWrapping="Wrap" Text="How to Play" VerticalAlignment="Center" FontSize="48" Foreground="White" FontFamily="Segoe UI"/>
|
||||
<TextBlock Grid.Column="1" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Eyes First Tile Slide is a game with four puzzle boards of increasing difficulty.

 You may choose from a 3, 8, 15 or 24 board, each with the corresponding number of sliding tiles plus one empty space." VerticalAlignment="Top" FontSize="{StaticResource HelpTextFontSize}" Foreground="White" Grid.Row="1"/>
|
||||
<TextBlock Text="1 of 4" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="1 of 5" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid x:Name="HelpScreen2" Grid.Column="1" Visibility="Collapsed" Margin="50,0,50,0" >
|
||||
<Grid.RowDefinitions>
|
||||
|
@ -272,7 +271,7 @@
|
|||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" HorizontalAlignment="Center" TextWrapping="Wrap" Text="How to Play" VerticalAlignment="Center" FontSize="48" Foreground="White" FontFamily="Segoe UI" Grid.ColumnSpan="2"/>
|
||||
<TextBlock Text="2 of 4" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<TextBlock Text="2 of 5" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="The goal of the game is to unscramble the puzzle board by getting all the tiles back in order." VerticalAlignment="Top" FontSize="{StaticResource HelpTextFontSize}" Foreground="White" Grid.RowSpan="2" Grid.Row="1"/>
|
||||
<Image Source="/Assets/Solved15.PNG" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="20,20,20,20" Grid.Column="1" Grid.RowSpan="2" Grid.Row="1"/>
|
||||
</Grid>
|
||||
|
@ -283,7 +282,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="How to Play" VerticalAlignment="Center" FontSize="48" Foreground="White" FontFamily="Segoe UI"/>
|
||||
<TextBlock Text="3 of 4" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<TextBlock Text="3 of 5" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<Grid HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
|
@ -318,7 +317,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="How to Play" VerticalAlignment="Center" FontSize="48" Foreground="White" FontFamily="Segoe UI"/>
|
||||
<TextBlock Text="4 of 4" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<TextBlock Text="4 of 5" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<Grid HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
|
@ -349,20 +348,71 @@
|
|||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<Grid x:Name="HelpScreen5" Grid.Column="1" Visibility="Collapsed" Margin="50,0,50,0" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="150px"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Privacy & Terms" VerticalAlignment="Center" FontSize="48" Foreground="White" FontFamily="Segoe UI"/>
|
||||
<TextBlock Text="5 of 5" Foreground="White" FontSize="24" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
|
||||
<Grid HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Foreground="White" FontSize="{StaticResource HelpTextFontSize}" VerticalAlignment="Center" Margin="10,0,0,19" TextWrapping="Wrap" Grid.ColumnSpan="2"></TextBlock>
|
||||
|
||||
<HyperlinkButton x:Name="PrivacyHyperlink" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="1" Height="150" Width="150" Foreground="White" FontFamily="Segoe UI" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Click="PrivacyHyperlink_Click" Margin="50,0,0,0">
|
||||
<Border CornerRadius="5" Background="{StaticResource ToolBarButtonBackground}" BorderThickness="3,0,0,0">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Privacy & Cookies</TextBlock>
|
||||
</Border>
|
||||
</HyperlinkButton>
|
||||
|
||||
<HyperlinkButton x:Name="UseTermsHyperlink" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Column="1" Grid.Row="1" Height="150" Width="150" Foreground="White" FontFamily="Segoe UI" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0,0,50,0" Click="UseTermsHyperlink_Click">
|
||||
<Border CornerRadius="5" Background="{StaticResource ToolBarButtonBackground}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Segoe UI">Use Terms</TextBlock>
|
||||
</Border>
|
||||
</HyperlinkButton>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<Button Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontFamily="Segoe MDL2 Assets" FontSize="52" Height="100" Background="{x:Null}" FontWeight="SemiBold" Margin="0,20,20,20" FocusVisualPrimaryBrush="Transparent" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Padding="0,0,0,0" Click="DismissButton">
|
||||
<Border Background="White" CornerRadius="5" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Stretch">
|
||||
<!--<TextBlock Text="" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" ></TextBlock>-->
|
||||
<TextBlock Text="Back to game" Foreground="{StaticResource ToolBarButtonBackground}" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Segoe UI" FontWeight="SemiBold" FontSize="24" Padding="60,0,60,0" ></TextBlock>
|
||||
</Border>
|
||||
</Button>
|
||||
<HyperlinkButton NavigateUri="https://go.microsoft.com/fwlink/?LinkId=521839" VerticalAlignment="Bottom" HorizontalAlignment="Left" Grid.Column="1" Height="75" Width="150" Margin="50,0,0,20" Foreground="White" FontFamily="Segoe UI" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
|
||||
<Border CornerRadius="5" Background="{StaticResource ToolBarButtonBackground}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Privacy & Cookies</TextBlock>
|
||||
</Border>
|
||||
</HyperlinkButton>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="PrivacyViewGrid" Grid.RowSpan="6" Grid.ColumnSpan="6" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1.2" MappingMode="RelativeToBoundingBox" SpreadMethod="Pad">
|
||||
<GradientStop Color="#c6ffff" Offset="0.8"/>
|
||||
<GradientStop Color="#FFc6beff" Offset="0.009"/>
|
||||
<GradientStop Color="White" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
<WebView x:Name="PrivacyWebView" Margin="50,50,50,230" NavigationCompleted="PrivacyWebView_NavigationCompleted">
|
||||
|
||||
</WebView>
|
||||
<TextBlock x:Name="WebViewLoadingText" Visibility="Collapsed" Text="Loading.." VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="24" Margin="0,0,0,200" Foreground="{StaticResource ToolBarButtonBackground}" FontFamily="Segoe UI" />
|
||||
<Button x:Name="PrivacyViewScrollUpButton" Content="" Width="150" Height="150" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="150,50,50,50" Click="PrivacyViewScrollUpButton_Click" Background="{StaticResource ToolBarButtonBackground}" Foreground="White" FontFamily="Segoe MDL2 Assets" gaze:GazeInput.MaxDwellRepeatCount="99"></Button>
|
||||
|
||||
<Button x:Name="PrivacyViewScrollDownButton" Content="" Width="150" Height="150" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="400,50,0,50" Click="PrivacyViewScrollDownButton_Click" Background="{StaticResource ToolBarButtonBackground}" Foreground="White" FontFamily="Segoe MDL2 Assets" gaze:GazeInput.MaxDwellRepeatCount="99"/>
|
||||
|
||||
<Button x:Name="PrivacyViewContinueButton" Width="300" Height="150" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,50,150,50" Click="PrivacyViewContinueButton_Click" Background="{StaticResource ToolBarButtonBackground}" Foreground="White" Content="Continue" FontSize="24"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Page>
|
||||
|
|
|
@ -39,8 +39,7 @@ namespace Fifteen
|
|||
});
|
||||
|
||||
GazeInput.DwellFeedbackProgressBrush = new SolidColorBrush(Colors.White);
|
||||
GazeInput.DwellFeedbackCompleteBrush = new SolidColorBrush(Colors.Transparent);
|
||||
|
||||
GazeInput.DwellFeedbackCompleteBrush = new SolidColorBrush(Colors.Transparent);
|
||||
}
|
||||
|
||||
private void OnBoardSizeSelected(object sender, RoutedEventArgs e)
|
||||
|
@ -72,6 +71,7 @@ namespace Fifteen
|
|||
HelpScreen2.Visibility = Visibility.Collapsed;
|
||||
HelpScreen3.Visibility = Visibility.Collapsed;
|
||||
HelpScreen4.Visibility = Visibility.Collapsed;
|
||||
HelpScreen5.Visibility = Visibility.Collapsed;
|
||||
HelpNavLeftButton.IsEnabled = false;
|
||||
HelpNavRightButton.IsEnabled = true;
|
||||
|
||||
|
@ -98,10 +98,17 @@ namespace Fifteen
|
|||
{
|
||||
HelpScreen3.Visibility = Visibility.Collapsed;
|
||||
HelpScreen4.Visibility = Visibility.Visible;
|
||||
HelpNavRightButton.IsEnabled = false;
|
||||
HelpNavRightButton.IsEnabled = true;
|
||||
HelpNavLeftButton.IsEnabled = true;
|
||||
}
|
||||
else if (HelpScreen4.Visibility == Visibility.Visible)
|
||||
{
|
||||
HelpScreen4.Visibility = Visibility.Collapsed;
|
||||
HelpScreen5.Visibility = Visibility.Visible;
|
||||
HelpNavRightButton.IsEnabled = false;
|
||||
HelpNavLeftButton.IsEnabled = true;
|
||||
}
|
||||
else if (HelpScreen5.Visibility == Visibility.Visible)
|
||||
{
|
||||
HelpNavRightButton.IsEnabled = false;
|
||||
HelpNavLeftButton.IsEnabled = true;
|
||||
|
@ -137,6 +144,14 @@ namespace Fifteen
|
|||
HelpNavLeftButton.IsEnabled = true;
|
||||
HelpNavRightButton.IsEnabled = true;
|
||||
}
|
||||
|
||||
else if (HelpScreen5.Visibility == Visibility.Visible)
|
||||
{
|
||||
HelpScreen5.Visibility = Visibility.Collapsed;
|
||||
HelpScreen4.Visibility = Visibility.Visible;
|
||||
HelpNavLeftButton.IsEnabled = true;
|
||||
HelpNavRightButton.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void DismissButton(object sender, RoutedEventArgs e)
|
||||
|
@ -144,5 +159,39 @@ namespace Fifteen
|
|||
HelpDialogGrid.Visibility = Visibility.Collapsed;
|
||||
GazeInput.DwellFeedbackProgressBrush = new SolidColorBrush(Colors.White);
|
||||
}
|
||||
|
||||
private async void PrivacyViewScrollUpButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PrivacyWebView.InvokeScriptAsync("eval", new string[] { "window.scrollBy(0,-" + PrivacyWebView.ActualHeight / 2 + ") " });
|
||||
}
|
||||
|
||||
private void PrivacyViewScrollDownButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PrivacyWebView.InvokeScriptAsync("eval", new string[] { "window.scrollBy(0," + PrivacyWebView.ActualHeight / 2 + ") " });
|
||||
}
|
||||
|
||||
private void PrivacyViewContinueButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PrivacyViewGrid.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
private void PrivacyHyperlink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GazeInput.DwellFeedbackProgressBrush = new SolidColorBrush(Colors.Transparent);
|
||||
WebViewLoadingText.Visibility = Visibility.Visible;
|
||||
PrivacyWebView.Navigate(new System.Uri("https://go.microsoft.com/fwlink/?LinkId=521839"));
|
||||
PrivacyViewGrid.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void UseTermsHyperlink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void PrivacyWebView_NavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args)
|
||||
{
|
||||
GazeInput.DwellFeedbackProgressBrush = _solidTileBrush;
|
||||
WebViewLoadingText.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче