@@ -67,7 +67,7 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
public static int Volume
|
public static int Volume
|
||||||
{
|
{
|
||||||
get { return (int)settings[6]; }
|
get { return Convert.ToInt32(settings[6]); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
settings[6] = value;
|
settings[6] = value;
|
||||||
@@ -95,7 +95,7 @@ namespace FoxTube
|
|||||||
}
|
}
|
||||||
public static int SafeSearch
|
public static int SafeSearch
|
||||||
{
|
{
|
||||||
get { return (int)settings[9]; }
|
get { return Convert.ToInt32(settings[9]); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
settings[9] = value;
|
settings[9] = value;
|
||||||
@@ -105,7 +105,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
public static int Theme
|
public static int Theme
|
||||||
{
|
{
|
||||||
get { return (int)settings[10]; }
|
get { return Convert.ToInt32(settings[10]); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
settings[10] = value;
|
settings[10] = value;
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ using System.Net;
|
|||||||
using Windows.UI.Popups;
|
using Windows.UI.Popups;
|
||||||
using Windows.Networking.Connectivity;
|
using Windows.Networking.Connectivity;
|
||||||
using Windows.UI.Core;
|
using Windows.UI.Core;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
{
|
{
|
||||||
@@ -67,6 +69,12 @@ namespace FoxTube
|
|||||||
SetTitleBar();
|
SetTitleBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnNavigatedTo(e);
|
||||||
|
content.Navigate(typeof(Home));
|
||||||
|
}
|
||||||
|
|
||||||
public Video GetCurrentItem()
|
public Video GetCurrentItem()
|
||||||
{
|
{
|
||||||
try { return (videoPlaceholder.Content as VideoPage).item; }
|
try { return (videoPlaceholder.Content as VideoPage).item; }
|
||||||
@@ -235,10 +243,10 @@ namespace FoxTube
|
|||||||
await dialog.ShowAsync();
|
await dialog.ShowAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
content.Navigate(typeof(Home));
|
|
||||||
|
|
||||||
if (videoPlaceholder.Content != null)
|
if (videoPlaceholder.Content != null)
|
||||||
GoToVideo((videoPlaceholder.Content as VideoPage).videoId);
|
GoToVideo((videoPlaceholder.Content as VideoPage).videoId);
|
||||||
|
|
||||||
|
nav.SelectedItem = toHome;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void feedback_Click(object sender, TappedRoutedEventArgs e)
|
private async void feedback_Click(object sender, TappedRoutedEventArgs e)
|
||||||
@@ -487,6 +495,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
private void nav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
private void nav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||||
{
|
{
|
||||||
|
Debug.WriteLine("Menu selection changed");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (s == Sender.None)
|
if (s == Sender.None)
|
||||||
@@ -522,6 +531,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
public void content_Navigated(object sender, NavigationEventArgs e)
|
public void content_Navigated(object sender, NavigationEventArgs e)
|
||||||
{
|
{
|
||||||
|
Debug.WriteLine($"Navigated to {e.SourcePageType}");
|
||||||
Dictionary<Type, Action> switchCase = new Dictionary<Type, Action>()
|
Dictionary<Type, Action> switchCase = new Dictionary<Type, Action>()
|
||||||
{
|
{
|
||||||
{ typeof(Settings), () => nav.Header = "Settings" },
|
{ typeof(Settings), () => nav.Header = "Settings" },
|
||||||
|
|||||||
Reference in New Issue
Block a user