58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using FoxTube.Controls;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices.WindowsRuntime;
|
|
using Windows.Foundation;
|
|
using Windows.Foundation.Collections;
|
|
using Windows.Storage;
|
|
using Windows.Storage.Pickers;
|
|
using Windows.System;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Navigation;
|
|
|
|
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
|
|
namespace FoxTube.Pages
|
|
{
|
|
/// <summary>
|
|
/// An empty page that can be used on its own or navigated to within a Frame.
|
|
/// </summary>
|
|
public sealed partial class Downloads : Page
|
|
{
|
|
public Downloads()
|
|
{
|
|
this.InitializeComponent();
|
|
try
|
|
{
|
|
stack.ItemsSource = Methods.MainPage.Agent.items;
|
|
}
|
|
catch { }
|
|
}
|
|
|
|
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
|
{
|
|
base.OnNavigatedFrom(e);
|
|
stack.ItemsSource = null;
|
|
stack.Items.Clear();
|
|
}
|
|
|
|
/*private async void changePath_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
FolderPicker picker = new FolderPicker()
|
|
{
|
|
SuggestedStartLocation = PickerLocationId.Downloads,
|
|
ViewMode = PickerViewMode.Thumbnail
|
|
};
|
|
picker.FileTypeFilter.Add(".shit"); //Because overwise it trhows an exception
|
|
|
|
StorageFolder p = await picker.PickSingleFolderAsync();
|
|
if (p != null)
|
|
settings.Values["defaultDownload"] = p.Path;
|
|
path.Text = settings.Values["defaultDownload"] as string;
|
|
}*/
|
|
}
|
|
}
|