@@ -144,6 +144,12 @@ namespace FoxTube
|
||||
SetTitleBar();
|
||||
}
|
||||
|
||||
public Video GetCurrentItem()
|
||||
{
|
||||
try { return (videoPlaceholder.Content as VideoPage).item; }
|
||||
catch { return null; }
|
||||
}
|
||||
|
||||
public void SetTitleBar()
|
||||
{
|
||||
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
|
||||
@@ -307,6 +313,7 @@ namespace FoxTube
|
||||
|
||||
public void GoToSearch(SearchParameters args)
|
||||
{
|
||||
nav.IsPaneOpen = false;
|
||||
MinimizeAsInitializer();
|
||||
content.Navigate(typeof(Search), args);
|
||||
}
|
||||
@@ -319,27 +326,31 @@ namespace FoxTube
|
||||
|
||||
public async void GoToVideo(string id, string playlistId = null)
|
||||
{
|
||||
var connection = NetworkInformation.GetInternetConnectionProfile().GetConnectionCost();
|
||||
if ((bool)settings.Values["moblieWarning"] && (connection.NetworkCostType == NetworkCostType.Fixed || connection.NetworkCostType == NetworkCostType.Variable))
|
||||
try
|
||||
{
|
||||
bool cancel = false;
|
||||
MessageDialog dialog = new MessageDialog("You are on metered connection now. Additional charges may apply. Do you want to continue?")
|
||||
var connection = NetworkInformation.GetInternetConnectionProfile().GetConnectionCost();
|
||||
if ((bool)settings.Values["moblieWarning"] && (connection.NetworkCostType == NetworkCostType.Fixed || connection.NetworkCostType == NetworkCostType.Variable))
|
||||
{
|
||||
DefaultCommandIndex = 2,
|
||||
CancelCommandIndex = 1
|
||||
};
|
||||
dialog.Commands.Add(new UICommand("Yes"));
|
||||
dialog.Commands.Add(new UICommand("No", (command) => cancel = true));
|
||||
dialog.Commands.Add(new UICommand("Add to 'Watch later' playlist", (command) =>
|
||||
{
|
||||
//TO-DO: Adding video to "Watch later"
|
||||
cancel = true;
|
||||
}));
|
||||
await dialog.ShowAsync();
|
||||
bool cancel = false;
|
||||
MessageDialog dialog = new MessageDialog("You are on metered connection now. Additional charges may apply. Do you want to continue?")
|
||||
{
|
||||
DefaultCommandIndex = 2,
|
||||
CancelCommandIndex = 1
|
||||
};
|
||||
dialog.Commands.Add(new UICommand("Yes"));
|
||||
dialog.Commands.Add(new UICommand("No", (command) => cancel = true));
|
||||
dialog.Commands.Add(new UICommand("Add to 'Watch later' playlist", (command) =>
|
||||
{
|
||||
//TO-DO: Adding video to "Watch later"
|
||||
cancel = true;
|
||||
}));
|
||||
await dialog.ShowAsync();
|
||||
|
||||
if (cancel)
|
||||
return;
|
||||
if (cancel)
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
nav.IsPaneOpen = false;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace FoxTube.Pages
|
||||
|
||||
public string videoId;
|
||||
string playlistId = null;
|
||||
Video item;
|
||||
public Video item;
|
||||
|
||||
List<string> downloads = new List<string>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user