Dark theme, navigation
This commit is contained in:
+2
-27
@@ -2,33 +2,8 @@
|
|||||||
x:Class="FoxTube.App"
|
x:Class="FoxTube.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:FoxTube"
|
xmlns:local="using:FoxTube">
|
||||||
RequestedTheme="Light">
|
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<!--<Style TargetType="ListBoxItem">
|
<Color x:Key="SystemAccentColor">Red</Color>
|
||||||
<Setter Property="Height" Value="50"/>
|
|
||||||
</Style>-->
|
|
||||||
<Style TargetType="TextBlock" x:Key="ItemIcon">
|
|
||||||
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
|
||||||
<Setter Property="FontSize" Value="16"/>
|
|
||||||
<Setter Property="Padding" Value="5,4,17,6"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="TextBlock" x:Key="MenuItem">
|
|
||||||
<Setter Property="Margin" Value="5,0,0,0"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="ToggleButton" x:Key="hPanel">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="ToggleButton">
|
|
||||||
<ToggleButton />
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="HyperlinkButton" x:Key="Pivot">
|
|
||||||
|
|
||||||
</Style>
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Windows.ApplicationModel.Activation;
|
|||||||
using Windows.ApplicationModel.Core;
|
using Windows.ApplicationModel.Core;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Windows.Foundation.Collections;
|
using Windows.Foundation.Collections;
|
||||||
|
using Windows.Storage;
|
||||||
using Windows.UI.Core;
|
using Windows.UI.Core;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
@@ -28,8 +29,23 @@ namespace FoxTube
|
|||||||
/// Initializes the singleton application object. This is the first line of authored code
|
/// Initializes the singleton application object. This is the first line of authored code
|
||||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
switch((int)settings.Values["themeMode"])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
RequestedTheme = ApplicationTheme.Light;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
RequestedTheme = ApplicationTheme.Dark;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch { }
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
this.Suspending += OnSuspending;
|
this.Suspending += OnSuspending;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
{
|
{
|
||||||
|
public delegate void Event();
|
||||||
|
|
||||||
public delegate void ObjectEventHandler(object sender, params object[] args);
|
public delegate void ObjectEventHandler(object sender, params object[] args);
|
||||||
|
|
||||||
public class SearchParameters
|
public class SearchParameters
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace FoxTube
|
|||||||
public static string AccountId { get; private set; }
|
public static string AccountId { get; private set; }
|
||||||
public static bool IsAuthorized { get; private set; } = false;
|
public static bool IsAuthorized { get; private set; } = false;
|
||||||
|
|
||||||
public static Google.Apis.YouTube.v3.Data.Channel UserChannel { get; private set; }
|
public static Channel UserChannel { get; private set; }
|
||||||
public static List<PlaylistItem> WatchLater { get; private set; } = new List<PlaylistItem>();
|
public static List<PlaylistItem> WatchLater { get; private set; } = new List<PlaylistItem>();
|
||||||
public static List<PlaylistItem> UserHistory { get; private set; } = new List<PlaylistItem>();
|
public static List<PlaylistItem> UserHistory { get; private set; } = new List<PlaylistItem>();
|
||||||
public static List<Subscription> Subscriptions { get; private set; } = new List<Subscription>();
|
public static List<Subscription> Subscriptions { get; private set; } = new List<Subscription>();
|
||||||
@@ -180,6 +180,7 @@ namespace FoxTube
|
|||||||
if(await Credential.RevokeTokenAsync(CancellationToken.None))
|
if(await Credential.RevokeTokenAsync(CancellationToken.None))
|
||||||
{
|
{
|
||||||
Credential = null;
|
Credential = null;
|
||||||
|
IsAuthorized = false;
|
||||||
AuthorizationStateChanged.Invoke(null, null);
|
AuthorizationStateChanged.Invoke(null, null);
|
||||||
settings.Values["authorized"] = false;
|
settings.Values["authorized"] = false;
|
||||||
}
|
}
|
||||||
@@ -192,5 +193,21 @@ namespace FoxTube
|
|||||||
else
|
else
|
||||||
Authorize();
|
Authorize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool AdsDisabled { get; private set; } = true;
|
||||||
|
|
||||||
|
public static void CheckAddons()
|
||||||
|
{
|
||||||
|
//TO-DO: Check addons list
|
||||||
|
bool purchased = true;
|
||||||
|
|
||||||
|
if(!purchased)
|
||||||
|
{
|
||||||
|
AdsDisabled = false;
|
||||||
|
NotPurchased.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static event Event NotPurchased;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
d:DesignWidth="384">
|
d:DesignWidth="384">
|
||||||
|
|
||||||
<Button Padding="0" Background="Transparent" Click="Button_Click" VerticalContentAlignment="Stretch" VerticalAlignment="Stretch">
|
<Button Padding="0" Background="Transparent" Click="Button_Click" VerticalContentAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid Background="WhiteSmoke" BorderBrush="LightGray" BorderThickness="1">
|
<Grid Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Ellipse Height="80" Width="80" Margin="0,-45,0,0" VerticalAlignment="Bottom" Fill="WhiteSmoke"/>
|
<Ellipse Height="80" Width="80" Margin="0,-45,0,0" VerticalAlignment="Bottom" Fill="{ThemeResource SystemControlBackgroundChromeMediumBrush}"/>
|
||||||
<PersonPicture Name="avatar" Grid.Column="0" Height="74" Margin="3,-45,3,3" VerticalAlignment="Bottom" BorderBrush="White" BorderThickness="10"/>
|
<PersonPicture Name="avatar" Grid.Column="0" Height="74" Margin="3,-45,3,3" VerticalAlignment="Bottom" BorderBrush="White" BorderThickness="10"/>
|
||||||
|
|
||||||
<TextBlock Name="title" Grid.Column="1" Text="[Channel name]" Margin="5" TextWrapping="WrapWholeWords" MaxLines="2"/>
|
<TextBlock Name="title" Grid.Column="1" Text="[Channel name]" Margin="5" TextWrapping="WrapWholeWords" MaxLines="2"/>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignWidth="400">
|
d:DesignWidth="400">
|
||||||
|
|
||||||
<Grid Background="WhiteSmoke" Margin="2" Name="grid">
|
<Grid Background="{ThemeResource AppBarBackgroundThemeBrush}" Margin="2" Name="grid">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
<RowDefinition Height="0"/>
|
<RowDefinition Height="0"/>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBox Grid.Row="1" Name="reply" TextChanged="reply_TextChanged" BorderThickness="0" Background="LightGray" AcceptsReturn="True" MaxLength="500"
|
<TextBox Grid.Row="1" Name="reply" TextChanged="reply_TextChanged" BorderThickness="0" Background="{ThemeResource SystemControlBackgroundChromeMediumLowBrush}" AcceptsReturn="True" MaxLength="500"
|
||||||
Padding="5" Margin="0,0,32,0"
|
Padding="5" Margin="0,0,32,0"
|
||||||
PlaceholderText="Enter your reply..."/>
|
PlaceholderText="Enter your reply..."/>
|
||||||
<Button Grid.Row="1" Name="send" Click="send_Click" IsEnabled="False" HorizontalAlignment="Right" VerticalAlignment="Top"
|
<Button Grid.Row="1" Name="send" Click="send_Click" IsEnabled="False" HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
d:DesignWidth="1500">
|
d:DesignWidth="1500">
|
||||||
|
|
||||||
<!--<Button HorizontalAlignment="Stretch" Background="WhiteSmoke" Height="100" Padding="0" HorizontalContentAlignment="Stretch"/>-->
|
<!--<Button HorizontalAlignment="Stretch" Background="WhiteSmoke" Height="100" Padding="0" HorizontalContentAlignment="Stretch"/>-->
|
||||||
<Grid Background="WhiteSmoke" Height="100">
|
<Grid Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" Height="100">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
d:DesignWidth="384">
|
d:DesignWidth="384">
|
||||||
|
|
||||||
<Button Padding="0" Background="Transparent" Click="Button_Click">
|
<Button Padding="0" Background="Transparent" Click="Button_Click">
|
||||||
<Grid Background="WhiteSmoke" BorderBrush="LightGray" BorderThickness="1">
|
<Grid Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="75"/>
|
<RowDefinition Height="75"/>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<ColumnDefinition Width="60"/>
|
<ColumnDefinition Width="60"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Ellipse Grid.Column="0" Height="50" Width="50" Margin="5,-30,5,10" Fill="WhiteSmoke"/>
|
<Ellipse Grid.Column="0" Height="50" Width="50" Margin="5,-30,5,10" Fill="{ThemeResource SystemControlBackgroundChromeMediumBrush}"/>
|
||||||
<PersonPicture Name="avatar" Grid.Column="0" Height="46" Margin="5,-30,5,0" BorderBrush="White" BorderThickness="10"/>
|
<PersonPicture Name="avatar" Grid.Column="0" Height="46" Margin="5,-30,5,0" BorderBrush="White" BorderThickness="10"/>
|
||||||
|
|
||||||
<TextBlock Name="channelName" Grid.Column="1" Text="[Channel name]" Foreground="Gray" Margin="0,2,0,0" FontSize="12"/>
|
<TextBlock Name="channelName" Grid.Column="1" Text="[Channel name]" Foreground="Gray" Margin="0,2,0,0" FontSize="12"/>
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ using Windows.UI.Xaml.Navigation;
|
|||||||
|
|
||||||
namespace FoxTube.Controls
|
namespace FoxTube.Controls
|
||||||
{
|
{
|
||||||
public delegate void Event();
|
|
||||||
|
|
||||||
public sealed partial class ShowMore : UserControl
|
public sealed partial class ShowMore : UserControl
|
||||||
{
|
{
|
||||||
public event Event Clicked;
|
public event Event Clicked;
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<UserControl
|
|
||||||
x:Class="FoxTube.Controls.SuggestionsQueries"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:FoxTube.Controls"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="350">
|
|
||||||
|
|
||||||
<Grid Background="WhiteSmoke" Name="grid">
|
|
||||||
<StackPanel Width="350">
|
|
||||||
<StackPanel Width="350" Name="searchStandby" Visibility="Visible" Margin="10">
|
|
||||||
<TextBlock Text="Loading results... Please, wait."/>
|
|
||||||
<ProgressBar IsIndeterminate="True"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Name="suggestions"/>
|
|
||||||
<StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="10,0,10,0">
|
|
||||||
<TextBlock Foreground="Gray" Text="History"/>
|
|
||||||
<Line VerticalAlignment="Center" X1="0" X2="500" StrokeThickness="2" Stroke="Gray" Margin="5,0,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Name="history">
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Foundation.Collections;
|
|
||||||
using Windows.Storage;
|
|
||||||
using Windows.UI;
|
|
||||||
using Windows.UI.Xaml;
|
|
||||||
using Windows.UI.Xaml.Controls;
|
|
||||||
using Windows.UI.Xaml.Controls.Primitives;
|
|
||||||
using Windows.UI.Xaml.Data;
|
|
||||||
using Windows.UI.Xaml.Input;
|
|
||||||
using Windows.UI.Xaml.Media;
|
|
||||||
using Windows.UI.Xaml.Navigation;
|
|
||||||
|
|
||||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
|
||||||
|
|
||||||
namespace FoxTube.Controls
|
|
||||||
{
|
|
||||||
public sealed partial class SuggestionsQueries : UserControl
|
|
||||||
{
|
|
||||||
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
|
||||||
List<string> lastRequests = new List<string>();
|
|
||||||
public SuggestionsQueries()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
for (int k = 0; k < 5; k++)
|
|
||||||
if (settings.Values["history" + k] != null)
|
|
||||||
lastRequests.Add((string)settings.Values["history" + k]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Item_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
string term = (sender as Button).Content as string;
|
|
||||||
if (!lastRequests.Contains(term))
|
|
||||||
AddToHistory(term);
|
|
||||||
Methods.MainPage.GoToSearch(term);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async void BuildList(string keyword)
|
|
||||||
{
|
|
||||||
(grid.Children[0] as StackPanel).Visibility = Visibility.Visible;
|
|
||||||
searchStandby.Visibility = Visibility.Visible;
|
|
||||||
suggestions.Children.Clear();
|
|
||||||
|
|
||||||
foreach(string s in lastRequests)
|
|
||||||
{
|
|
||||||
Button item = new Button()
|
|
||||||
{
|
|
||||||
HorizontalAlignment = HorizontalAlignment.Stretch,
|
|
||||||
HorizontalContentAlignment = HorizontalAlignment.Left,
|
|
||||||
Background = new SolidColorBrush(Colors.Transparent),
|
|
||||||
Content = s
|
|
||||||
};
|
|
||||||
item.Click += Item_Click;
|
|
||||||
history.Children.Add(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
XmlDocument doc = new XmlDocument();
|
|
||||||
await Task.Run(() =>
|
|
||||||
{
|
|
||||||
doc.Load(string.Format("http://suggestqueries.google.com/complete/search?output=toolbar&hl={0}&q={1}",
|
|
||||||
(settings.Values["region"] as string)[0] + (settings.Values["region"] as string)[1],
|
|
||||||
keyword));
|
|
||||||
});
|
|
||||||
|
|
||||||
if(doc["toplevel"].HasChildNodes)
|
|
||||||
for (int k = 0; k < 5; k++)
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Button item = new Button()
|
|
||||||
{
|
|
||||||
HorizontalAlignment = HorizontalAlignment.Stretch,
|
|
||||||
HorizontalContentAlignment = HorizontalAlignment.Left,
|
|
||||||
Background = new SolidColorBrush(Colors.Transparent),
|
|
||||||
Content = doc["toplevel"].ChildNodes[k]["suggestion"].GetAttribute("data")
|
|
||||||
};
|
|
||||||
item.Click += Item_Click;
|
|
||||||
suggestions.Children.Add(item);
|
|
||||||
} catch { break; }
|
|
||||||
else
|
|
||||||
suggestions.Children.Add(new Button()
|
|
||||||
{
|
|
||||||
Content = "No suggestions found.",
|
|
||||||
IsEnabled = false,
|
|
||||||
Foreground = new SolidColorBrush(Colors.Gray),
|
|
||||||
Background = new SolidColorBrush(Colors.Transparent)
|
|
||||||
});
|
|
||||||
|
|
||||||
searchStandby.Visibility = Visibility.Collapsed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddToHistory(string keyword)
|
|
||||||
{
|
|
||||||
lastRequests.Insert(0, keyword);
|
|
||||||
if (lastRequests.Count > 5)
|
|
||||||
lastRequests.RemoveAt(5);
|
|
||||||
|
|
||||||
for(int k = 0; k < 5; k++)
|
|
||||||
try { settings.Values["history" + k] = lastRequests[k]; }
|
|
||||||
catch { settings.Values.Add("history" + k, lastRequests[k]); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Hide()
|
|
||||||
{
|
|
||||||
(grid.Children[0] as StackPanel).Visibility = Visibility.Collapsed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,18 +12,18 @@
|
|||||||
d:DesignWidth="384">
|
d:DesignWidth="384">
|
||||||
|
|
||||||
<Button Padding="0" Background="Transparent" Click="Button_Click">
|
<Button Padding="0" Background="Transparent" Click="Button_Click">
|
||||||
<Grid Background="WhiteSmoke" BorderBrush="LightGray" BorderThickness="1">
|
<Grid Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="75"/>
|
<RowDefinition Height="75"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Image Name="thumbnail" Source="/Assets/videoThumbSample.png" Stretch="Fill"/>
|
<Image Name="thumbnail" Source="/Assets/videoThumbSample.png" Stretch="Fill"/>
|
||||||
<Grid Background="#7FFFFFFF" Name="watched" Visibility="Collapsed">
|
<Grid Background="{ThemeResource ButtonBackgroundThemeBrush}" Name="watched" Visibility="Collapsed">
|
||||||
<StackPanel Margin="5" Background="WhiteSmoke" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="5,2,5,2" BorderBrush="Gray" BorderThickness="1">
|
<StackPanel Margin="5" Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="5,2,5,2" BorderBrush="Gray" BorderThickness="1">
|
||||||
<TextBlock Text="Watched" Foreground="Gray" FontSize="12"/>
|
<TextBlock Text="Watched" Foreground="Gray" FontSize="12"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Margin="0,0,5,5" Background="WhiteSmoke" VerticalAlignment="Bottom" HorizontalAlignment="Right" Padding="5,2,5,3">
|
<StackPanel Margin="0,0,5,5" Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" VerticalAlignment="Bottom" HorizontalAlignment="Right" Padding="5,2,5,3">
|
||||||
<TextBlock Name="info" Text="[Duration] | [Published at]" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Gray" FontSize="12"/>
|
<TextBlock Name="info" Text="[Duration] | [Published at]" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Gray" FontSize="12"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Name="liveTag" Margin="0,0,5,30" Background="Red" BorderBrush="White" BorderThickness="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Padding="5,2,5,3" Orientation="Horizontal" Visibility="Collapsed">
|
<StackPanel Name="liveTag" Margin="0,0,5,30" Background="Red" BorderBrush="White" BorderThickness="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Padding="5,2,5,3" Orientation="Horizontal" Visibility="Collapsed">
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<ColumnDefinition Width="60"/>
|
<ColumnDefinition Width="60"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Ellipse Grid.Column="0" Height="50" Width="50" Margin="5,-30,5,10" Fill="WhiteSmoke"/>
|
<Ellipse Grid.Column="0" Height="50" Width="50" Margin="5,-30,5,10" Fill="{ThemeResource SystemControlBackgroundChromeMediumBrush}"/>
|
||||||
<PersonPicture Name="avatar" Grid.Column="0" Height="46" Margin="5,-30,5,0" BorderBrush="White" BorderThickness="10"/>
|
<PersonPicture Name="avatar" Grid.Column="0" Height="46" Margin="5,-30,5,0" BorderBrush="White" BorderThickness="10"/>
|
||||||
|
|
||||||
<TextBlock Name="channelName" Grid.Column="1" Text="[Channel name]" Foreground="Gray" Margin="0,2,0,0" FontSize="12"/>
|
<TextBlock Name="channelName" Grid.Column="1" Text="[Channel name]" Foreground="Gray" Margin="0,2,0,0" FontSize="12"/>
|
||||||
|
|||||||
@@ -12,14 +12,15 @@ namespace FoxTube.Controls
|
|||||||
{
|
{
|
||||||
public sealed partial class VideoCard : UserControl
|
public sealed partial class VideoCard : UserControl
|
||||||
{
|
{
|
||||||
|
public string playlistId;
|
||||||
public string videoId;
|
public string videoId;
|
||||||
Google.Apis.YouTube.v3.Data.Video item;
|
Video item;
|
||||||
|
|
||||||
bool embed = true;
|
bool embed = true;
|
||||||
public VideoCard(string id)
|
public VideoCard(string id, string playlist = null)
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
Initialize(id);
|
Initialize(id, playlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
|
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
@@ -27,7 +28,7 @@ namespace FoxTube.Controls
|
|||||||
Height = e.NewSize.Width * 0.75;
|
Height = e.NewSize.Width * 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void Initialize(string id)
|
public async void Initialize(string id, string playlist = null)
|
||||||
{
|
{
|
||||||
YouTubeService ytService = SecretsVault.NoAuthService;
|
YouTubeService ytService = SecretsVault.NoAuthService;
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ namespace FoxTube.Controls
|
|||||||
|
|
||||||
item = response.Items[0];
|
item = response.Items[0];
|
||||||
videoId = id;
|
videoId = id;
|
||||||
|
playlistId = playlist;
|
||||||
|
|
||||||
title.Text = item.Snippet.Title;
|
title.Text = item.Snippet.Title;
|
||||||
channelName.Text = item.Snippet.ChannelTitle;
|
channelName.Text = item.Snippet.ChannelTitle;
|
||||||
@@ -104,7 +106,7 @@ namespace FoxTube.Controls
|
|||||||
await dialog.ShowAsync();
|
await dialog.ShowAsync();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Methods.MainPage.GoToVideo(videoId);
|
Methods.MainPage.GoToVideo(videoId, playlistId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,9 +115,6 @@
|
|||||||
<Compile Include="Controls\ShowMore.xaml.cs">
|
<Compile Include="Controls\ShowMore.xaml.cs">
|
||||||
<DependentUpon>ShowMore.xaml</DependentUpon>
|
<DependentUpon>ShowMore.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controls\SuggestionsQueries.xaml.cs">
|
|
||||||
<DependentUpon>SuggestionsQueries.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Pages\ChannelPage.xaml.cs">
|
<Compile Include="Pages\ChannelPage.xaml.cs">
|
||||||
<DependentUpon>ChannelPage.xaml</DependentUpon>
|
<DependentUpon>ChannelPage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -298,10 +295,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Controls\SuggestionsQueries.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Pages\ChannelPage.xaml">
|
<Page Include="Pages\ChannelPage.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace FoxTube.Pages
|
|||||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnNavigatedTo(e);
|
base.OnNavigatedTo(e);
|
||||||
if (e.Parameter == null)
|
if ((string)e.Parameter == null)
|
||||||
loading.Error("NullReferenceException", "Unable to initialize search. Search term is not stated.");
|
loading.Error("NullReferenceException", "Unable to initialize search. Search term is not stated.");
|
||||||
else
|
else
|
||||||
Initialize(e.Parameter as string);
|
Initialize(e.Parameter as string);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
|
||||||
<Grid Background="White" Name="grid">
|
<Grid Name="grid">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<TextBlock Name="counter" Grid.Row="1" Text="[Comments count] Comments" Margin="5,0,0,0" VerticalAlignment="Center" FontWeight="SemiBold"/>
|
<TextBlock Name="counter" Grid.Row="1" Text="[Comments count] Comments" Margin="5,0,0,0" VerticalAlignment="Center" FontWeight="SemiBold"/>
|
||||||
<StackPanel Padding="0" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
|
<StackPanel Padding="0" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
|
||||||
<TextBlock Text="Sort by: " VerticalAlignment="Center" Margin="0,0,5,0"/>
|
<TextBlock Text="Sort by: " VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||||
<Button Name="orderBtn" Background="Transparent" Content="Relevance" Foreground="Blue" Padding="0" VerticalAlignment="Center">
|
<Button Name="orderBtn" Background="Transparent" Content="Relevance" Foreground="Red" Padding="0" VerticalAlignment="Center">
|
||||||
|
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<MenuFlyout>
|
<MenuFlyout>
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
|
GC.Collect();
|
||||||
pivot.Items.Clear();
|
pivot.Items.Clear();
|
||||||
|
|
||||||
if(SecretsVault.IsAuthorized)
|
if(SecretsVault.IsAuthorized)
|
||||||
|
|||||||
@@ -5,10 +5,9 @@
|
|||||||
xmlns:local="using:FoxTube"
|
xmlns:local="using:FoxTube"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d">
|
||||||
Background="White">
|
|
||||||
|
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<ProgressRing Name="ring" IsActive="True" Foreground="Red" Width="100" Height="100"/>
|
<ProgressRing Name="ring" IsActive="True" Foreground="Red" Width="100" Height="100"/>
|
||||||
|
|
||||||
<StackPanel Name="wifiTrouble" Visibility="Collapsed" VerticalAlignment="Center">
|
<StackPanel Name="wifiTrouble" Visibility="Collapsed" VerticalAlignment="Center">
|
||||||
|
|||||||
+28
-37
@@ -6,52 +6,45 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:ads="using:Microsoft.Advertising.WinRT.UI"
|
xmlns:ads="using:Microsoft.Advertising.WinRT.UI"
|
||||||
|
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||||||
|
xmlns:pages="using:FoxTube.Pages"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
SizeChanged="Page_SizeChanged">
|
SizeChanged="Page_SizeChanged">
|
||||||
|
|
||||||
<Grid Name="grid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Name="grid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<VisualStateManager.VisualStateGroups>
|
<NavigationView SelectedItem="toHome" BackRequested="nav_BackRequested" PaneTitle="FoxTube" OpenPaneLength="300" Name="nav" IsPaneOpen="False" SelectionChanged="nav_SelectionChanged">
|
||||||
<VisualStateGroup>
|
|
||||||
<VisualState>
|
|
||||||
<VisualState.StateTriggers>
|
|
||||||
<AdaptiveTrigger MinWindowWidth="600"/>
|
|
||||||
</VisualState.StateTriggers>
|
|
||||||
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="openSearch.Visibility" Value="Collapsed"/>
|
|
||||||
<Setter Target="compactSearch.Visibility" Value="Visible"/>
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateManager.VisualStateGroups>
|
|
||||||
|
|
||||||
<NavigationView PaneTitle="FoxTube" OpenPaneLength="300" Name="nav" IsPaneOpen="False" SelectionChanged="nav_SelectionChanged">
|
|
||||||
|
|
||||||
<NavigationView.MenuItems>
|
<NavigationView.MenuItems>
|
||||||
<NavigationViewItem Icon="Home" Content="Home" Name="toHome"/>
|
<NavigationViewItem Icon="Home" Content="Home" Name="toHome"/>
|
||||||
<NavigationViewItem Content="History" Name="toHistory">
|
<NavigationViewItem Icon="Contact" Content="My channel" Name="toChannel" Visibility="Collapsed"/>
|
||||||
|
<NavigationViewItem Icon="People" Content="Subscriptions" Name="toSubscriptions" Visibility="Collapsed"/>
|
||||||
|
<NavigationViewItemHeader Content="My library" Name="libHeader" Visibility="Collapsed"/>
|
||||||
|
<NavigationViewItem Content="History" Name="toHistory" Visibility="Collapsed">
|
||||||
<NavigationViewItem.Icon>
|
<NavigationViewItem.Icon>
|
||||||
<FontIcon Glyph=""/>
|
<FontIcon Glyph=""/>
|
||||||
</NavigationViewItem.Icon>
|
</NavigationViewItem.Icon>
|
||||||
</NavigationViewItem>
|
</NavigationViewItem>
|
||||||
<NavigationViewItem Icon="Like" Content="Liked videos" Name="toLiked"/>
|
<NavigationViewItem Icon="Like" Content="Liked videos" Name="toLiked" Visibility="Collapsed"/>
|
||||||
<NavigationViewItem Icon="Clock" Content="Watch later" Name="toLater"/>
|
<NavigationViewItem Icon="Clock" Content="Watch later" Name="toLater" Visibility="Collapsed"/>
|
||||||
<NavigationViewItem Icon="People" Content="Subscriptions" Name="toSubscriptions"/>
|
<NavigationViewItem Icon="Download" Content="Downloads" Name="toDownloads" Visibility="Collapsed"/>
|
||||||
<NavigationViewItem Icon="Download" Content="Downloads" Name="toDownloads"/>
|
<NavigationViewItemHeader Content="Subscriptions" Name="subsHeader" Visibility="Collapsed"/>
|
||||||
<NavigationViewItemHeader Content="Subscriptions" Name="subsHeader"/>
|
|
||||||
</NavigationView.MenuItems>
|
</NavigationView.MenuItems>
|
||||||
|
|
||||||
<NavigationView.PaneFooter>
|
<NavigationView.PaneFooter>
|
||||||
<NavigationViewList>
|
<StackPanel>
|
||||||
<NavigationViewItem Content="My channel" Icon="Contact" Name="toChannel"/>
|
<Button Visibility="Visible" Name="feedback" Click="feedback_Click" Height="40" HorizontalAlignment="Stretch" Background="Transparent" HorizontalContentAlignment="Left">
|
||||||
<!--<NavigationViewItem>
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<PersonPicture Height="20" Margin="-2,0,14,0"/>
|
<FontIcon Glyph="" FontSize="16" Margin="6,0,16,0"/>
|
||||||
<TextBlock Text="My channel"/>
|
<TextBlock Text="Give a feedback"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</NavigationViewItem>-->
|
</Button>
|
||||||
<NavigationViewItem Icon="Shop" Content="Remove ads"/>
|
<Button Visibility="Collapsed" Name="removeAds" Height="40" HorizontalAlignment="Stretch" Background="Transparent" HorizontalContentAlignment="Left">
|
||||||
</NavigationViewList>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<FontIcon Glyph="" FontSize="16" Margin="6,0,16,0"/>
|
||||||
|
<TextBlock Text="Remove ads"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
</NavigationView.PaneFooter>
|
</NavigationView.PaneFooter>
|
||||||
|
|
||||||
<NavigationView.AutoSuggestBox>
|
<NavigationView.AutoSuggestBox>
|
||||||
@@ -70,10 +63,6 @@
|
|||||||
FontFamily="Segoe MDL2 Assets" Content=""
|
FontFamily="Segoe MDL2 Assets" Content=""
|
||||||
Width="50" Height="50" Background="Transparent"/>
|
Width="50" Height="50" Background="Transparent"/>
|
||||||
|
|
||||||
<Button Name="feedback" ToolTipService.ToolTip="Send feedback" Click="feedback_Click"
|
|
||||||
FontFamily="Segoe MDL2 Assets" Content=""
|
|
||||||
Width="50" Height="50" Background="Transparent"/>
|
|
||||||
|
|
||||||
<Button Name="account" ToolTipService.ToolTip="Sign in"
|
<Button Name="account" ToolTipService.ToolTip="Sign in"
|
||||||
FontFamily="Segoe MDL2 Assets" Content=""
|
FontFamily="Segoe MDL2 Assets" Content=""
|
||||||
Width="50" Height="50" Background="Transparent">
|
Width="50" Height="50" Background="Transparent">
|
||||||
@@ -85,7 +74,7 @@
|
|||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Width="50" Background="Transparent" Height="50" Visibility="Visible" Name="avatar" ToolTipService.ToolTip="My account">
|
<Button Width="50" Background="Transparent" Height="50" Visibility="Collapsed" Name="avatar" ToolTipService.ToolTip="My account">
|
||||||
<PersonPicture Width="30"/>
|
<PersonPicture Width="30"/>
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<MenuFlyout>
|
<MenuFlyout>
|
||||||
@@ -100,8 +89,10 @@
|
|||||||
</NavigationView.Header>
|
</NavigationView.Header>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Frame Name="content"/>
|
<Frame Name="content" Navigated="content_Navigated"/>
|
||||||
<Frame Name="videoPlaceholder"/>
|
<controls:DropShadowPanel Color="Black" BlurRadius="0" ShadowOpacity=".7" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
|
<Frame Name="videoPlaceholder"/>
|
||||||
|
</controls:DropShadowPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</NavigationView>
|
</NavigationView>
|
||||||
|
|||||||
+138
-108
@@ -38,6 +38,7 @@ using Google.Apis.Oauth2.v2;
|
|||||||
using Google.Apis.Oauth2.v2.Data;
|
using Google.Apis.Oauth2.v2.Data;
|
||||||
using FoxTube.Controls;
|
using FoxTube.Controls;
|
||||||
using FoxTube.Pages;
|
using FoxTube.Pages;
|
||||||
|
using Microsoft.Toolkit.Uwp.UI.Controls;
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
||||||
|
|
||||||
@@ -72,6 +73,8 @@ namespace FoxTube
|
|||||||
settings.Values.Add("moblieWarning", false);
|
settings.Values.Add("moblieWarning", false);
|
||||||
if (settings.Values["videoAutoplay"] == null)
|
if (settings.Values["videoAutoplay"] == null)
|
||||||
settings.Values.Add("videoAutoplay", false);
|
settings.Values.Add("videoAutoplay", false);
|
||||||
|
if (settings.Values["themeMode"] == null)
|
||||||
|
settings.Values.Add("themeMode", 2);
|
||||||
if (settings.Values["volume"] == null)
|
if (settings.Values["volume"] == null)
|
||||||
settings.Values.Add("volume", 100);
|
settings.Values.Add("volume", 100);
|
||||||
|
|
||||||
@@ -86,8 +89,8 @@ namespace FoxTube
|
|||||||
SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged;
|
SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged;
|
||||||
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
||||||
SecretsVault.CheckAuthorization();
|
SecretsVault.CheckAuthorization();
|
||||||
if(!SecretsVault.IsAuthorized)
|
if (!SecretsVault.IsAuthorized)
|
||||||
content.Navigate(typeof(Home));
|
nav.SelectedItem = toHome;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
@@ -100,6 +103,7 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
|
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
|
||||||
|
|
||||||
|
titleBar.ButtonForegroundColor = Colors.Black;
|
||||||
titleBar.ButtonBackgroundColor = Colors.Transparent;
|
titleBar.ButtonBackgroundColor = Colors.Transparent;
|
||||||
titleBar.ButtonHoverBackgroundColor = Colors.IndianRed;
|
titleBar.ButtonHoverBackgroundColor = Colors.IndianRed;
|
||||||
titleBar.ButtonPressedBackgroundColor = Colors.DarkRed;
|
titleBar.ButtonPressedBackgroundColor = Colors.DarkRed;
|
||||||
@@ -110,7 +114,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
private void SecretsVault_SubscriptionsChanged(object sender, params object[] args)
|
private void SecretsVault_SubscriptionsChanged(object sender, params object[] args)
|
||||||
{
|
{
|
||||||
if ((string)args[0] == "add" && nav.MenuItems.Count < 16)
|
if ((string)args[0] == "add" && nav.MenuItems.Count < 19)
|
||||||
{
|
{
|
||||||
Subscription s = args[1] as Subscription;
|
Subscription s = args[1] as Subscription;
|
||||||
StackPanel panel = new StackPanel() { Orientation = Orientation.Horizontal };
|
StackPanel panel = new StackPanel() { Orientation = Orientation.Horizontal };
|
||||||
@@ -121,10 +125,14 @@ namespace FoxTube
|
|||||||
ProfilePicture = new BitmapImage(new Uri(s.Snippet.Thumbnails.Medium.Url))
|
ProfilePicture = new BitmapImage(new Uri(s.Snippet.Thumbnails.Medium.Url))
|
||||||
});
|
});
|
||||||
panel.Children.Add(new TextBlock() { Text = s.Snippet.Title });
|
panel.Children.Add(new TextBlock() { Text = s.Snippet.Title });
|
||||||
nav.MenuItems.Add(new NavigationViewItem() { Content = panel });
|
nav.MenuItems.Add(new NavigationViewItem()
|
||||||
|
{
|
||||||
|
Content = panel,
|
||||||
|
Name = (nav.MenuItems.Count - 9).ToString()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if ((string)args[0] == "remove" && (int)args[1] < 10)
|
else if ((string)args[0] == "remove" && (int)args[1] < 10)
|
||||||
nav.MenuItems.RemoveAt((int)args[1]);
|
nav.MenuItems.RemoveAt((int)args[1] + 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Vault_AuthorizationStateChanged(object sender, EventArgs e)
|
private async void Vault_AuthorizationStateChanged(object sender, EventArgs e)
|
||||||
@@ -137,23 +145,24 @@ namespace FoxTube
|
|||||||
Userinfoplus info = await new Oauth2Service(SecretsVault.Initializer).Userinfo.Get().ExecuteAsync();
|
Userinfoplus info = await new Oauth2Service(SecretsVault.Initializer).Userinfo.Get().ExecuteAsync();
|
||||||
|
|
||||||
ToolTipService.SetToolTip(avatar, new ToolTip() { Content = info.Name });
|
ToolTipService.SetToolTip(avatar, new ToolTip() { Content = info.Name });
|
||||||
((avatar.Content as Grid).Children[1] as PersonPicture).ProfilePicture = new BitmapImage(new Uri(info.Picture));
|
(avatar.Content as PersonPicture).ProfilePicture = new BitmapImage(new Uri(info.Picture));
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
avatar.Visibility = Visibility.Visible;
|
avatar.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
|
toChannel.Visibility = Visibility.Visible;
|
||||||
|
toSubscriptions.Visibility = Visibility.Visible;
|
||||||
|
libHeader.Visibility = Visibility.Visible;
|
||||||
toHistory.Visibility = Visibility.Visible;
|
toHistory.Visibility = Visibility.Visible;
|
||||||
toLiked.Visibility = Visibility.Visible;
|
toLiked.Visibility = Visibility.Visible;
|
||||||
toLater.Visibility = Visibility.Visible;
|
toLater.Visibility = Visibility.Visible;
|
||||||
toSubscriptions.Visibility = Visibility.Visible;
|
toDownloads.Visibility = Visibility.Visible;
|
||||||
toChannel.Visibility = Visibility.Visible;
|
subsHeader.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
if (SecretsVault.Subscriptions.Count > 0)
|
if (SecretsVault.Subscriptions.Count > 0)
|
||||||
{
|
{
|
||||||
subsHeader.Visibility = Visibility.Visible;
|
subsHeader.Visibility = Visibility.Visible;
|
||||||
int l = SecretsVault.Subscriptions.Count;
|
for(int k = 0; k < SecretsVault.Subscriptions.Count && k < 10; k++)
|
||||||
int n = 10;
|
|
||||||
for(int k = 0; k < l && k < n; k++)
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Subscription s = SecretsVault.Subscriptions[k];
|
Subscription s = SecretsVault.Subscriptions[k];
|
||||||
@@ -165,7 +174,11 @@ namespace FoxTube
|
|||||||
ProfilePicture = new BitmapImage(new Uri(s.Snippet.Thumbnails.Medium.Url))
|
ProfilePicture = new BitmapImage(new Uri(s.Snippet.Thumbnails.Medium.Url))
|
||||||
});
|
});
|
||||||
panel.Children.Add(new TextBlock() { Text = s.Snippet.Title });
|
panel.Children.Add(new TextBlock() { Text = s.Snippet.Title });
|
||||||
nav.MenuItems.Add(new NavigationViewItem() { Content = panel });
|
nav.MenuItems.Add(new NavigationViewItem()
|
||||||
|
{
|
||||||
|
Content = panel,
|
||||||
|
Name = k.ToString()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch { continue; }
|
catch { continue; }
|
||||||
}
|
}
|
||||||
@@ -175,22 +188,26 @@ namespace FoxTube
|
|||||||
account.Visibility = Visibility.Visible;
|
account.Visibility = Visibility.Visible;
|
||||||
avatar.Visibility = Visibility.Collapsed;
|
avatar.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
toChannel.Visibility = Visibility.Collapsed;
|
||||||
|
toSubscriptions.Visibility = Visibility.Collapsed;
|
||||||
|
libHeader.Visibility = Visibility.Collapsed;
|
||||||
toHistory.Visibility = Visibility.Collapsed;
|
toHistory.Visibility = Visibility.Collapsed;
|
||||||
toLiked.Visibility = Visibility.Collapsed;
|
toLiked.Visibility = Visibility.Collapsed;
|
||||||
toLater.Visibility = Visibility.Collapsed;
|
toLater.Visibility = Visibility.Collapsed;
|
||||||
toSubscriptions.Visibility = Visibility.Collapsed;
|
toDownloads.Visibility = Visibility.Collapsed;
|
||||||
toChannel.Visibility = Visibility.Collapsed;
|
subsHeader.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
subsHeader.Visibility = Visibility.Collapsed;
|
subsHeader.Visibility = Visibility.Collapsed;
|
||||||
for(int k = 7; k < nav.MenuItems.Count; k++)
|
for(int k = 9; k < nav.MenuItems.Count; k++)
|
||||||
nav.MenuItems.RemoveAt(k);
|
nav.MenuItems.RemoveAt(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
content.CacheSize = 0;
|
nav.SelectedItem = toHome;
|
||||||
content.Navigate(typeof(Home));
|
content.Navigate(typeof(Home));
|
||||||
|
content.CacheSize = 0;
|
||||||
|
|
||||||
if (videoPlaceholder.Content != null)
|
if (videoPlaceholder.Content != null)
|
||||||
(videoPlaceholder.Content as VideoPage).refresh_Click(this, null);
|
GoToVideo((videoPlaceholder.Content as VideoPage).videoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GotNotification()
|
public void GotNotification()
|
||||||
@@ -198,75 +215,9 @@ namespace FoxTube
|
|||||||
notificationMenu.Content = "\xED0C";
|
notificationMenu.Content = "\xED0C";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void MainListSelected(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (mainList.SelectedItem == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
subscriptionsList.SelectedItem = null;
|
|
||||||
serviceList.SelectedItem = null;
|
|
||||||
|
|
||||||
object s = mainList.SelectedItem;
|
|
||||||
|
|
||||||
if (s == toHistory)
|
|
||||||
content.Navigate(typeof(Settings));
|
|
||||||
else if (s == toLiked)
|
|
||||||
content.Navigate(typeof(PlaylistPage), SecretsVault.UserChannel.ContentDetails.RelatedPlaylists.Likes);
|
|
||||||
else if (s == toLater)
|
|
||||||
content.Navigate(typeof(PlaylistPage), SecretsVault.UserChannel.ContentDetails.RelatedPlaylists.WatchLater);
|
|
||||||
else if (s == toSubscriptions)
|
|
||||||
content.Navigate(typeof(Settings));
|
|
||||||
else if (s == toDownloads)
|
|
||||||
content.Navigate(typeof(Downloads));
|
|
||||||
else
|
|
||||||
content.Navigate(typeof(Home));
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
void ServiceListSelected(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (serviceList.SelectedItem == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mainList.SelectedItem = null;
|
|
||||||
subscriptionsList.SelectedItem = null;
|
|
||||||
|
|
||||||
object s = serviceList.SelectedItem;
|
|
||||||
|
|
||||||
if (s == toChannel)
|
|
||||||
content.Navigate(typeof(Channel), SecretsVault.AccountId);
|
|
||||||
else if (s == toRemoveAds)
|
|
||||||
content.Navigate(typeof(Settings), "adblock");
|
|
||||||
else
|
|
||||||
content.Navigate(typeof(Settings));
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
void SubscriptionSelected(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (subscriptionsList.SelectedItem == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mainList.SelectedItem = null;
|
|
||||||
serviceList.SelectedItem = null;
|
|
||||||
|
|
||||||
GoToChannel(SecretsVault.Subscriptions[subscriptionsList.SelectedIndex - 1].Snippet.ResourceId.ChannelId);
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public void notificationMenu_Click(object sender, RoutedEventArgs e)
|
public void notificationMenu_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
notificationMenu.Content = "\xED0D";
|
notificationMenu.Content = "\xED0D";
|
||||||
//notificationPane.IsOpen = !notificationPane.IsOpen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void feedback_Click(object sender, RoutedEventArgs e)
|
private void feedback_Click(object sender, RoutedEventArgs e)
|
||||||
@@ -319,7 +270,7 @@ namespace FoxTube
|
|||||||
content.Navigate(typeof(ChannelPage), id);
|
content.Navigate(typeof(ChannelPage), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GoToVideo(string id)
|
public void GoToVideo(string id, string playlistId = null)
|
||||||
{
|
{
|
||||||
nav.IsPaneOpen = false;
|
nav.IsPaneOpen = false;
|
||||||
|
|
||||||
@@ -327,7 +278,7 @@ namespace FoxTube
|
|||||||
MaximizeVideo();
|
MaximizeVideo();
|
||||||
Fullscreen(false);
|
Fullscreen(false);
|
||||||
|
|
||||||
videoPlaceholder.Navigate(typeof(VideoPage), id);
|
videoPlaceholder.Navigate(typeof(VideoPage), new string[2] { id, playlistId });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GoToDeveloper(string id)
|
public void GoToDeveloper(string id)
|
||||||
@@ -356,34 +307,45 @@ namespace FoxTube
|
|||||||
|
|
||||||
public void MinimizeVideo()
|
public void MinimizeVideo()
|
||||||
{
|
{
|
||||||
videoPlaceholder.Width = 432;
|
DropShadowPanel ph = videoPlaceholder.Parent as DropShadowPanel;
|
||||||
videoPlaceholder.Height = 243;
|
|
||||||
videoPlaceholder.VerticalAlignment = VerticalAlignment.Bottom;
|
ph.BlurRadius = 20;
|
||||||
videoPlaceholder.HorizontalAlignment = HorizontalAlignment.Right;
|
ph.Width = 432;
|
||||||
videoPlaceholder.Margin = new Thickness(0, 0, 25, 50);
|
ph.Height = 243;
|
||||||
|
ph.VerticalAlignment = VerticalAlignment.Bottom;
|
||||||
|
ph.HorizontalAlignment = HorizontalAlignment.Right;
|
||||||
|
ph.Margin = new Thickness(0, 0, 25, 50);
|
||||||
|
|
||||||
|
if (content.CanGoBack)
|
||||||
|
nav.IsBackEnabled = true;
|
||||||
|
else
|
||||||
|
nav.IsBackEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MaximizeVideo()
|
public void MaximizeVideo()
|
||||||
{
|
{
|
||||||
videoPlaceholder.Width = double.NaN;
|
DropShadowPanel ph = videoPlaceholder.Parent as DropShadowPanel;
|
||||||
videoPlaceholder.Height = double.NaN;
|
|
||||||
videoPlaceholder.VerticalAlignment = VerticalAlignment.Stretch;
|
ph.BlurRadius = 0;
|
||||||
videoPlaceholder.HorizontalAlignment = HorizontalAlignment.Stretch;
|
ph.Width = double.NaN;
|
||||||
videoPlaceholder.Margin = new Thickness(0);
|
ph.Height = double.NaN;
|
||||||
|
ph.VerticalAlignment = VerticalAlignment.Stretch;
|
||||||
|
ph.HorizontalAlignment = HorizontalAlignment.Stretch;
|
||||||
|
ph.Margin = new Thickness(0);
|
||||||
|
|
||||||
|
nav.IsBackEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Fullscreen(bool on)
|
public void Fullscreen(bool on)
|
||||||
{
|
{
|
||||||
if(on)
|
if(on)
|
||||||
{
|
{
|
||||||
nav.AlwaysShowHeader = false;
|
nav.Margin = new Thickness(-48, -93, 0, 0);
|
||||||
nav.CompactPaneLength = 0;
|
nav.OpenPaneLength = 48;
|
||||||
nav.OpenPaneLength = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nav.AlwaysShowHeader = true;
|
nav.Margin = new Thickness(0);
|
||||||
nav.CompactPaneLength = 48;
|
|
||||||
nav.OpenPaneLength = 300;
|
nav.OpenPaneLength = 300;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,6 +359,11 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
videoPlaceholder.Content = null;
|
videoPlaceholder.Content = null;
|
||||||
MaximizeVideo();
|
MaximizeVideo();
|
||||||
|
|
||||||
|
if (content.CanGoBack)
|
||||||
|
nav.IsBackEnabled = true;
|
||||||
|
else
|
||||||
|
nav.IsBackEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void search_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
|
private void search_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
|
||||||
@@ -409,21 +376,84 @@ namespace FoxTube
|
|||||||
if(search.Text.Length > 2)
|
if(search.Text.Length > 2)
|
||||||
{
|
{
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
doc.Load($"http://suggestqueries.google.com/complete/search?output=toolbar&hl={(settings.Values["region"] as string)[0] + (settings.Values["region"] as string)[1]}&q={search.Text}");
|
doc.Load($"http://suggestqueries.google.com/complete/search?output=toolbar&hl={(settings.Values["region"] as string).Remove(2)}&q={search.Text}");
|
||||||
|
|
||||||
if (doc["toplevel"].HasChildNodes)
|
List<string> suggestions = new List<string>();
|
||||||
for (int k = 0; k < 5; k++)
|
|
||||||
try
|
for (int i = 0; i < doc["toplevel"].ChildNodes.Count && i < 5; i++)
|
||||||
{
|
suggestions.Add(doc["toplevel"].ChildNodes[i]["suggestion"].GetAttribute("data"));
|
||||||
search.Items.Add(doc["toplevel"].ChildNodes[k]["suggestion"].GetAttribute("data"));
|
|
||||||
}
|
search.ItemsSource = suggestions;
|
||||||
catch { break; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void nav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
private void nav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||||
{
|
{
|
||||||
|
if (args.IsSettingsSelected)
|
||||||
|
content.Navigate(typeof(Settings));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (args.SelectedItem == toHome)
|
||||||
|
content.Navigate(typeof(Home));
|
||||||
|
else if (args.SelectedItem == toHistory)
|
||||||
|
content.Navigate(typeof(Settings));
|
||||||
|
else if (args.SelectedItem == toLiked)
|
||||||
|
content.Navigate(typeof(PlaylistPage), SecretsVault.UserChannel.ContentDetails.RelatedPlaylists.Likes);
|
||||||
|
else if (args.SelectedItem == toLater)
|
||||||
|
content.Navigate(typeof(PlaylistPage), SecretsVault.UserChannel.ContentDetails.RelatedPlaylists.WatchLater);
|
||||||
|
else if (args.SelectedItem == toSubscriptions)
|
||||||
|
content.Navigate(typeof(Settings));
|
||||||
|
else if (args.SelectedItem == toDownloads)
|
||||||
|
content.Navigate(typeof(Downloads));
|
||||||
|
else if (args.SelectedItem == toChannel)
|
||||||
|
content.Navigate(typeof(Channel), SecretsVault.UserChannel.Id);
|
||||||
|
else
|
||||||
|
content.Navigate(typeof(ChannelPage), SecretsVault.Subscriptions[Convert.ToInt32((args.SelectedItem as NavigationViewItem).Name)].Snippet.ResourceId.ChannelId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void content_Navigated(object sender, NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
Dictionary<Type, Action> switchCase = new Dictionary<Type, Action>()
|
||||||
|
{
|
||||||
|
{ typeof(Settings), () => header.Text = "Settings" },
|
||||||
|
{ typeof(ChannelPage), () => header.Text = "Channel" },
|
||||||
|
{ typeof(PlaylistPage), () => header.Text = "Playlist" },
|
||||||
|
{ typeof(Search), () => header.Text = "Search" },
|
||||||
|
{ typeof(History), () => header.Text = "History" },
|
||||||
|
{ typeof(Home), () => header.Text = "Home" },
|
||||||
|
{ typeof(Downloads), () => header.Text = "Downloads" }
|
||||||
|
};
|
||||||
|
|
||||||
|
switchCase[e.SourcePageType]();
|
||||||
|
|
||||||
|
if (content.CanGoBack)
|
||||||
|
nav.IsBackEnabled = true;
|
||||||
|
else
|
||||||
|
nav.IsBackEnabled = false;
|
||||||
|
|
||||||
|
if (videoPlaceholder.Content != null && (videoPlaceholder.Parent as DropShadowPanel).HorizontalAlignment == HorizontalAlignment.Stretch)
|
||||||
|
MinimizeAsInitializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toChannel_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
nav.SelectedItem = null;
|
||||||
|
GoToChannel(SecretsVault.UserChannel.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void nav_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args)
|
||||||
|
{
|
||||||
|
if (videoPlaceholder.Content != null)
|
||||||
|
{
|
||||||
|
DropShadowPanel panel = videoPlaceholder.Parent as DropShadowPanel;
|
||||||
|
if (panel.HorizontalAlignment == HorizontalAlignment.Stretch)
|
||||||
|
MinimizeAsInitializer();
|
||||||
|
else
|
||||||
|
content.GoBack();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
content.GoBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace FoxTube.Pages
|
|||||||
|
|
||||||
list.Clear();
|
list.Clear();
|
||||||
foreach (PlaylistItem i in response.Items)
|
foreach (PlaylistItem i in response.Items)
|
||||||
list.Add(new VideoCard(i.ContentDetails.VideoId));
|
list.Add(new VideoCard(i.ContentDetails.VideoId, playlistId));
|
||||||
|
|
||||||
while (response.NextPageToken != null)
|
while (response.NextPageToken != null)
|
||||||
{
|
{
|
||||||
@@ -99,7 +99,7 @@ namespace FoxTube.Pages
|
|||||||
response = await listRequest.ExecuteAsync();
|
response = await listRequest.ExecuteAsync();
|
||||||
|
|
||||||
foreach (PlaylistItem i in response.Items)
|
foreach (PlaylistItem i in response.Items)
|
||||||
list.Add(new VideoCard(i.ContentDetails.VideoId));
|
list.Add(new VideoCard(i.ContentDetails.VideoId, playlistId));
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.Close();
|
loading.Close();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace FoxTube
|
|||||||
public sealed partial class Search : Page
|
public sealed partial class Search : Page
|
||||||
{
|
{
|
||||||
public string Term;
|
public string Term;
|
||||||
|
bool isChannel = false;
|
||||||
SearchResource.ListRequest request;
|
SearchResource.ListRequest request;
|
||||||
string nextToken;
|
string nextToken;
|
||||||
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
||||||
@@ -65,8 +66,11 @@ namespace FoxTube
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "youtube#channel":
|
case "youtube#channel":
|
||||||
ChannelCard cCard = new ChannelCard(result.Id.ChannelId/*, result.Snippet.LiveBroadcastContent*/);
|
if(!isChannel)
|
||||||
list.Add(cCard);
|
{
|
||||||
|
ChannelCard cCard = new ChannelCard(result.Id.ChannelId/*, result.Snippet.LiveBroadcastContent*/);
|
||||||
|
list.Add(cCard);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "youtube#playlist":
|
case "youtube#playlist":
|
||||||
@@ -110,6 +114,7 @@ namespace FoxTube
|
|||||||
request = SecretsVault.Service.Search.List("id");
|
request = SecretsVault.Service.Search.List("id");
|
||||||
if (!string.IsNullOrWhiteSpace(channelId))
|
if (!string.IsNullOrWhiteSpace(channelId))
|
||||||
{
|
{
|
||||||
|
isChannel = true;
|
||||||
request.ChannelId = channelId;
|
request.ChannelId = channelId;
|
||||||
(grid.Children[1] as CommandBar).Visibility = Visibility.Collapsed;
|
(grid.Children[1] as CommandBar).Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<Pivot SelectedIndex="0" Name="pivot" IsHeaderItemsCarouselEnabled="False">
|
<Pivot SelectedIndex="0" Name="pivot" IsHeaderItemsCarouselEnabled="False" SelectionChanged="pivot_SelectionChanged">
|
||||||
<PivotItem Header="General">
|
<PivotItem Header="General">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<settingspages:General/>
|
<settingspages:General/>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace FoxTube
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Settings : Page
|
public sealed partial class Settings : Page
|
||||||
{
|
{
|
||||||
|
bool inboxLoaded = false;
|
||||||
public Settings()
|
public Settings()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
@@ -60,5 +61,14 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (pivot.SelectedIndex == 4 && !inboxLoaded)
|
||||||
|
{
|
||||||
|
(((pivot.Items[4] as PivotItem).Content as ScrollViewer).Content as Inbox).LoadItems();
|
||||||
|
inboxLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,17 +37,17 @@
|
|||||||
<TextBlock TextWrapping="WrapWholeWords" Visibility="Collapsed" Text="Special thanks to contributors for motivating me, testers and translators for making this app better everyday and you for using this app;)" Margin="0,0,0,10"/>
|
<TextBlock TextWrapping="WrapWholeWords" Visibility="Collapsed" Text="Special thanks to contributors for motivating me, testers and translators for making this app better everyday and you for using this app;)" Margin="0,0,0,10"/>
|
||||||
|
|
||||||
<TextBlock Text="Contacts" FontSize="22" FontWeight="SemiBold"/>
|
<TextBlock Text="Contacts" FontSize="22" FontWeight="SemiBold"/>
|
||||||
<TextBlock>Twitter: <Hyperlink NavigateUri="https://twitter.com/XFox_Mike" Foreground="Red">@XFox_Mike</Hyperlink></TextBlock>
|
<TextBlock>Twitter: <Hyperlink NavigateUri="https://twitter.com/XFox_Mike">@XFox_Mike</Hyperlink></TextBlock>
|
||||||
<TextBlock>Vkontakte: <Hyperlink NavigateUri="https://vk.com/XFox.Mike" Foreground="Red">@XFox.Mike</Hyperlink></TextBlock>
|
<TextBlock>Vkontakte: <Hyperlink NavigateUri="https://vk.com/XFox.Mike">@XFox.Mike</Hyperlink></TextBlock>
|
||||||
<TextBlock>YouTube: <Hyperlink NavigateUri="https://youtube.com/c/FoxGameStudioChannel" Foreground="Red">@FoxGameStudioChannel</Hyperlink></TextBlock>
|
<TextBlock>YouTube: <Hyperlink NavigateUri="https://youtube.com/c/FoxGameStudioChannel">@FoxGameStudioChannel</Hyperlink></TextBlock>
|
||||||
<TextBlock>E-mail: <Hyperlink NavigateUri="mailto:michael.xfox@outlook.com" Foreground="Red">michael.xfox@outlook.com</Hyperlink></TextBlock>
|
<TextBlock>E-mail: <Hyperlink NavigateUri="mailto:michael.xfox@outlook.com">michael.xfox@outlook.com</Hyperlink></TextBlock>
|
||||||
<TextBlock Margin="0,0,0,10">My blog (Russian language only): <Hyperlink NavigateUri="https://michael-xfox.com" Foreground="Red">https://michael-xfox.com</Hyperlink></TextBlock>
|
<TextBlock Margin="0,0,0,10">My blog (Russian language only): <Hyperlink NavigateUri="https://michael-xfox.com">https://michael-xfox.com</Hyperlink></TextBlock>
|
||||||
|
|
||||||
<TextBlock Text="Legal stuff" FontSize="22" FontWeight="SemiBold"/>
|
<TextBlock Text="Legal stuff" FontSize="22" FontWeight="SemiBold"/>
|
||||||
<HyperlinkButton Foreground="Red" Content="Our Privacy Policy" NavigateUri="https://michael-xfox.com/foxtubepp.txt" Padding="0,5,0,0"/>
|
<HyperlinkButton Content="Our Privacy Policy" NavigateUri="https://michael-xfox.com/foxtubepp.txt" Padding="0,5,0,0"/>
|
||||||
<HyperlinkButton Foreground="Red" Content="YouTube Privacy Policy" NavigateUri="https://youtube.com/t/privacy" Padding="0"/>
|
<HyperlinkButton Content="YouTube Privacy Policy" NavigateUri="https://youtube.com/t/privacy" Padding="0"/>
|
||||||
<HyperlinkButton Foreground="Red" Content="YouTube Terms of use" NavigateUri="https://youtube.com/t/terms" Padding="0"/>
|
<HyperlinkButton Content="YouTube Terms of use" NavigateUri="https://youtube.com/t/terms" Padding="0"/>
|
||||||
<HyperlinkButton Foreground="Red" Content="YouTube Community Guidelines" NavigateUri="https://youtube.com/t/community_guidelines" Padding="0,0,0,10"/>
|
<HyperlinkButton Content="YouTube Community Guidelines" NavigateUri="https://youtube.com/t/community_guidelines" Padding="0,0,0,10"/>
|
||||||
<TextBlock Text="© 2018 Michael Gordeev"/>
|
<TextBlock Text="© 2018 Michael Gordeev"/>
|
||||||
<TextBlock Text="© 2018 YouTube, LLC"/>
|
<TextBlock Text="© 2018 YouTube, LLC"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button Content="Submit feedback" Name="submit" Margin="0,10,10,10" Click="submit_Click" Background="Red" Foreground="White"/>
|
<Button Content="Submit feedback" Name="submit" Margin="0,10,10,10" Click="submit_Click" Background="{ThemeResource SystemControlForegroundAccentBrush}" Foreground="White"/>
|
||||||
<ProgressRing VerticalAlignment="Center" Name="ring" Foreground="Red"/>
|
<ProgressRing VerticalAlignment="Center" Name="ring" Foreground="Red"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -39,5 +39,11 @@
|
|||||||
|
|
||||||
<TextBlock Text="Notifications" FontSize="22"/>
|
<TextBlock Text="Notifications" FontSize="22"/>
|
||||||
<ToggleSwitch Name="newVideo" OnContent="Notify when someone of your subscriptions uploaded new video" OffContent="Notify when someone of your subscriptions uploaded new video" Toggled="notification_IsEnabledChanged"/>
|
<ToggleSwitch Name="newVideo" OnContent="Notify when someone of your subscriptions uploaded new video" OffContent="Notify when someone of your subscriptions uploaded new video" Toggled="notification_IsEnabledChanged"/>
|
||||||
|
|
||||||
|
<TextBlock Text="Color mode" FontSize="22"/>
|
||||||
|
<RadioButton Content="Light" Name="light" GroupName="color" Checked="RadioButton_Checked"/>
|
||||||
|
<RadioButton Content="Dark" Name="dark" GroupName="color" Checked="RadioButton_Checked"/>
|
||||||
|
<RadioButton Content="Windows default" Name="system" GroupName="color" Checked="RadioButton_Checked"/>
|
||||||
|
<HyperlinkButton Content="Windows color settings" NavigateUri="ms-settings:colors"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -39,6 +40,19 @@ namespace FoxTube.Pages.SettingsPages
|
|||||||
|
|
||||||
safeSearch.SelectedIndex = (int)settings.Values["safeSearch"];
|
safeSearch.SelectedIndex = (int)settings.Values["safeSearch"];
|
||||||
|
|
||||||
|
switch((int)settings.Values["themeMode"])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
light.IsChecked = true;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
dark.IsChecked = true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
system.IsChecked = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
|
foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
|
||||||
{
|
{
|
||||||
region.Items.Add(culture.DisplayName);
|
region.Items.Add(culture.DisplayName);
|
||||||
@@ -63,14 +77,9 @@ namespace FoxTube.Pages.SettingsPages
|
|||||||
|
|
||||||
private void notification_IsEnabledChanged(object sender, RoutedEventArgs e)
|
private void notification_IsEnabledChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if ((bool)settings.Values["newVideoNotification"] != newVideo.IsOn)
|
settings.Values["newVideoNotification"] = newVideo.IsOn;
|
||||||
settings.Values["newVideoNotification"] = newVideo.IsOn;
|
settings.Values["moblieWarning"] = mobileWarning.IsOn;
|
||||||
|
settings.Values["videoAutoplay"] = autoplay.IsOn;
|
||||||
if ((bool)settings.Values["moblieWarning"] != mobileWarning.IsOn)
|
|
||||||
settings.Values["moblieWarning"] = mobileWarning.IsOn;
|
|
||||||
|
|
||||||
if ((bool)settings.Values["videoAutoplay"] != autoplay.IsOn)
|
|
||||||
settings.Values["videoAutoplay"] = autoplay.IsOn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void region_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void region_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@@ -82,5 +91,24 @@ namespace FoxTube.Pages.SettingsPages
|
|||||||
{
|
{
|
||||||
settings.Values["safeSearch"] = safeSearch.SelectedIndex;
|
settings.Values["safeSearch"] = safeSearch.SelectedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RadioButton_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender == light)
|
||||||
|
{
|
||||||
|
settings.Values["themeMode"] = 0;
|
||||||
|
Application.Current.RequestedTheme = ApplicationTheme.Light;
|
||||||
|
}
|
||||||
|
if (sender == dark)
|
||||||
|
{
|
||||||
|
settings.Values["themeMode"] = 1;
|
||||||
|
Application.Current.RequestedTheme = ApplicationTheme.Dark;
|
||||||
|
}
|
||||||
|
if (sender == system)
|
||||||
|
{
|
||||||
|
settings.Values["themeMode"] = 2;
|
||||||
|
Application.Current.RequestedTheme = ApplicationTheme.;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<ColumnDefinition Width="0"/>
|
<ColumnDefinition Width="0"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel VerticalAlignment="Stretch" Background="#FFF2F2F2">
|
<StackPanel VerticalAlignment="Stretch">
|
||||||
<ComboBox Header="Filter" Margin="10" HorizontalAlignment="Stretch" SelectedIndex="0" Name="filter" SelectionChanged="filter_SelectionChanged">
|
<ComboBox Header="Filter" Margin="10" HorizontalAlignment="Stretch" SelectedIndex="0" Name="filter" SelectionChanged="filter_SelectionChanged">
|
||||||
<ComboBoxItem Content="All"/>
|
<ComboBoxItem Content="All"/>
|
||||||
<ComboBoxItem Content="Messages"/>
|
<ComboBoxItem Content="Messages"/>
|
||||||
|
|||||||
@@ -11,39 +11,10 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<VisualStateManager.VisualStateGroups>
|
|
||||||
<VisualStateGroup>
|
|
||||||
<VisualState>
|
|
||||||
<VisualState.StateTriggers>
|
|
||||||
<AdaptiveTrigger MinWindowWidth="728"/>
|
|
||||||
</VisualState.StateTriggers>
|
|
||||||
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="ad.Width" Value="728"/>
|
|
||||||
<Setter Target="ad.Height" Value="90"/>
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState>
|
|
||||||
<VisualState.StateTriggers>
|
|
||||||
<AdaptiveTrigger MinWindowWidth="640"/>
|
|
||||||
</VisualState.StateTriggers>
|
|
||||||
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="ad.Width" Value="640"/>
|
|
||||||
<Setter Target="ad.Height" Value="100"/>
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateManager.VisualStateGroups>
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<ui:AdControl VerticalAlignment="Top" Name="ad"
|
|
||||||
ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1"
|
|
||||||
AdUnitId="test"
|
|
||||||
Height="50"
|
|
||||||
Width="300"/>
|
|
||||||
<controls:AdaptiveGridView Name="list" OneRowModeEnabled="False" DesiredWidth="384" SelectionMode="None" Grid.Row="1"/>
|
<controls:AdaptiveGridView Name="list" OneRowModeEnabled="False" DesiredWidth="384" SelectionMode="None" Grid.Row="1"/>
|
||||||
<TextBlock Name="empty" Text="Ø" FontSize="200" Foreground="Gray" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.RowSpan="2"/>
|
<TextBlock Name="empty" Text="Ø" FontSize="200" Foreground="Gray" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.RowSpan="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -97,18 +97,37 @@
|
|||||||
<Pivot Grid.Row="1" Name="pivot" SelectedIndex="0" IsHeaderItemsCarouselEnabled="False">
|
<Pivot Grid.Row="1" Name="pivot" SelectedIndex="0" IsHeaderItemsCarouselEnabled="False">
|
||||||
<PivotItem Header="Suggestions">
|
<PivotItem Header="Suggestions">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel>
|
<StackPanel Name="relatedVideos"/>
|
||||||
<ui:AdControl
|
|
||||||
ApplicationId="3f83fe91-d6be-434d-a0ae-7351c5a997f1"
|
|
||||||
AdUnitId="test"
|
|
||||||
Width="320" Height="50"/>
|
|
||||||
<StackPanel Name="relatedVideos"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
<PivotItem Header="Comments" Name="commentsPlaceholder">
|
<PivotItem Header="Comments" Name="commentsPlaceholder">
|
||||||
<pages:CommentsPage/>
|
<pages:CommentsPage/>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
|
<PivotItem Header="Playlist" Name="playlist">
|
||||||
|
<StackPanel>
|
||||||
|
<StackPanel Padding="8" Background="WhiteSmoke">
|
||||||
|
<TextBlock Text="Music" FontSize="26" TextWrapping="WrapWholeWords" Name="playlistName"/>
|
||||||
|
<TextBlock Text="DAGames" Name="playlistChannel"/>
|
||||||
|
<TextBlock Text="15/155" Name="playlistCounter"/>
|
||||||
|
</StackPanel>
|
||||||
|
<ScrollViewer>
|
||||||
|
<StackPanel Name="playlistList">
|
||||||
|
<Button HorizontalAlignment="Stretch" Height="75" HorizontalContentAlignment="Stretch" Background="Transparent">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Text="15" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||||
|
<Image Grid.Column="1" Source="/Assets/videoThumbSample.png"/>
|
||||||
|
<TextBlock Grid.Column="2" Margin="8,0,0,0" VerticalAlignment="Center" TextWrapping="WrapWholeWords" Text="Title"/>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</StackPanel>
|
||||||
|
</PivotItem>
|
||||||
</Pivot>
|
</Pivot>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ namespace FoxTube.Pages
|
|||||||
{
|
{
|
||||||
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
|
||||||
|
|
||||||
string videoId;
|
public string videoId;
|
||||||
|
string playlistId = null;
|
||||||
Video item;
|
Video item;
|
||||||
|
|
||||||
List<string> downloads = new List<string>();
|
List<string> downloads = new List<string>();
|
||||||
@@ -99,21 +100,40 @@ namespace FoxTube.Pages
|
|||||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnNavigatedTo(e);
|
base.OnNavigatedTo(e);
|
||||||
if (e.Parameter == null)
|
if (e.Parameter == null || string.IsNullOrWhiteSpace((e.Parameter as string[])[0]))
|
||||||
loading.Error("NullReferenceException", "Unable to initialize page. Video ID is not stated.");
|
loading.Error("NullReferenceException", "Unable to initialize page. Video ID is not stated.");
|
||||||
else
|
else
|
||||||
Initialize(e.Parameter as string);
|
Initialize(e.Parameter as string[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void Initialize(string id)
|
public async void Initialize(string[] ids)
|
||||||
{
|
{
|
||||||
loading.Refresh();
|
loading.Refresh();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
videoId = id;
|
videoId = ids[0];
|
||||||
|
|
||||||
|
if (ids[1] != null)
|
||||||
|
{
|
||||||
|
PlaylistsResource.ListRequest playlistRequest = SecretsVault.Service.Playlists.List("snippet,contentDetails");
|
||||||
|
playlistRequest.Id = ids[1];
|
||||||
|
Playlist playlistItem = (await playlistRequest.ExecuteAsync()).Items[0];
|
||||||
|
|
||||||
|
playlistName.Text = playlistItem.Snippet.Title;
|
||||||
|
playlistChannel.Text = playlistItem.Snippet.ChannelTitle;
|
||||||
|
|
||||||
|
PlaylistItemsResource.ListRequest listRequest = SecretsVault.Service.PlaylistItems.List("snippet");
|
||||||
|
listRequest.PlaylistId = ids[1];
|
||||||
|
PlaylistItemListResponse listResponse = await listRequest.ExecuteAsync();
|
||||||
|
|
||||||
|
//Initialize playlist tab
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pivot.Items.Remove(playlist);
|
||||||
|
|
||||||
VideosResource.ListRequest request = SecretsVault.Service.Videos.List("snippet,statistics,status,contentDetails");
|
VideosResource.ListRequest request = SecretsVault.Service.Videos.List("snippet,statistics,status,contentDetails");
|
||||||
request.Id = id;
|
request.Id = ids[0];
|
||||||
item = (await request.ExecuteAsync()).Items[0];
|
item = (await request.ExecuteAsync()).Items[0];
|
||||||
|
|
||||||
title.Text = item.Snippet.Title;
|
title.Text = item.Snippet.Title;
|
||||||
@@ -135,7 +155,7 @@ namespace FoxTube.Pages
|
|||||||
|
|
||||||
if (SecretsVault.IsAuthorized)
|
if (SecretsVault.IsAuthorized)
|
||||||
{
|
{
|
||||||
VideoGetRatingResponse ratingResponse = await SecretsVault.Service.Videos.GetRating(id).ExecuteAsync();
|
VideoGetRatingResponse ratingResponse = await SecretsVault.Service.Videos.GetRating(ids[0]).ExecuteAsync();
|
||||||
if (ratingResponse.Items[0].Rating == "like")
|
if (ratingResponse.Items[0].Rating == "like")
|
||||||
{
|
{
|
||||||
userRating = Rating.Like;
|
userRating = Rating.Like;
|
||||||
@@ -274,7 +294,7 @@ namespace FoxTube.Pages
|
|||||||
public void refresh_Click(object sender, RoutedEventArgs e)
|
public void refresh_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
player = new VideoPlayer();
|
player = new VideoPlayer();
|
||||||
Initialize(videoId);
|
Initialize(new string[2] { videoId, playlistId });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void grid_SizeChanged(object sender, SizeChangedEventArgs e)
|
private void grid_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
@@ -291,6 +311,7 @@ namespace FoxTube.Pages
|
|||||||
mainContent.Children.Remove(pivot);
|
mainContent.Children.Remove(pivot);
|
||||||
tabsPlaceholder.Children.Add(pivot);
|
tabsPlaceholder.Children.Add(pivot);
|
||||||
|
|
||||||
|
(pivot.Items[0] as PivotItem).Content = null;
|
||||||
pivot.Items.RemoveAt(0);
|
pivot.Items.RemoveAt(0);
|
||||||
mainContent.Children.Add(descriptionPanel);
|
mainContent.Children.Add(descriptionPanel);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user