Archived
1
0

Age blocker

This commit is contained in:
Michael Gordeev
2018-05-08 17:45:50 +03:00
parent 96b81c02c6
commit a4aa95d25c
3 changed files with 39 additions and 1 deletions
+1
View File
@@ -62,6 +62,7 @@ namespace FoxTube
Debug.WriteLine("Skipped"); Debug.WriteLine("Skipped");
break; break;
} }
Google.Apis.YouTube.v3.Data.Video videItem = new Google.Apis.YouTube.v3.Data.Video();
} }
void AddVideo(string title, void AddVideo(string title,
+28
View File
@@ -120,5 +120,33 @@
</Grid> </Grid>
</Grid> </Grid>
</Grid> </Grid>
<StackPanel Background="#FF333333" Padding="25">
<TextBlock Text="Warning! Mature content!" Foreground="White" FontSize="30"/>
<Line Stroke="White" StrokeThickness="2" X1="0" X2="500"/>
<StackPanel Name="proceedMature" Visibility="Visible">
<TextBlock TextWrapping="WrapWholeWords" Foreground="White" Text="This content isn't advised for children. It can represent violance, blood or sexual scenes." FontSize="20"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<CheckBox Foreground="White">
<TextBlock Foreground="White" Text="Don't show me it again"/>
</CheckBox>
<Button Content="Continue" Margin="5,0,0,0" Foreground="White" Background="Gray"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" BorderBrush="OrangeRed" BorderThickness="5" Margin="0,10,0,0" Visibility="Collapsed" Name="signReq">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="&#xE192;" FontSize="40" Foreground="OrangeRed" Margin="5"/>
<StackPanel HorizontalAlignment="Stretch">
<TextBlock Text="Sign in into your account to continue" Foreground="OrangeRed" FontWeight="Bold" FontSize="20"/>
<TextBlock Text="To watch this video you have to prove your age by sign in into your account which contains your age" Foreground="OrangeRed"/>
</StackPanel>
<Button Content="Sign in now" Foreground="White" Background="Gray" HorizontalAlignment="Right"/>
</StackPanel>
<StackPanel Orientation="Horizontal" BorderBrush="OrangeRed" BorderThickness="5" Visibility="Collapsed" Margin="0,10,0,0" Name="denied">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="&#xEB90;" FontSize="40" Foreground="OrangeRed" Margin="5"/>
<StackPanel>
<TextBlock Text="Access denied" Foreground="OrangeRed" FontWeight="Bold" FontSize="20"/>
<TextBlock Text="Your age is below 18. Come back later." Foreground="OrangeRed"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid> </Grid>
</UserControl> </UserControl>
+10 -1
View File
@@ -28,7 +28,16 @@ namespace FoxTube
public VideoPlayer() public VideoPlayer()
{ {
this.InitializeComponent(); this.InitializeComponent();
volume.Value = (double)settings.Values["volume"]; try
{
volume.Value = (double)settings.Values["volume"];
}
catch
{
if (settings.Values["volume"] == null)
settings.Values.Add("volume", (double)100);
else settings.Values["volume"] = (double)100;
}
t.Elapsed += T_Elapsed; t.Elapsed += T_Elapsed;
UserControl_Tapped(this, null); UserControl_Tapped(this, null);
} }