diff --git a/FoxTube/About.xaml b/FoxTube/About.xaml index 587c430..13be59f 100644 --- a/FoxTube/About.xaml +++ b/FoxTube/About.xaml @@ -23,7 +23,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -51,9 +51,9 @@ - + - + diff --git a/FoxTube/Assets/videoThumbSample.png b/FoxTube/Assets/videoThumbSample.png new file mode 100644 index 0000000..28c0f63 Binary files /dev/null and b/FoxTube/Assets/videoThumbSample.png differ diff --git a/FoxTube/ChannelCard.xaml b/FoxTube/ChannelCard.xaml new file mode 100644 index 0000000..8c38112 --- /dev/null +++ b/FoxTube/ChannelCard.xaml @@ -0,0 +1,36 @@ + + + + diff --git a/FoxTube/ChannelCard.xaml.cs b/FoxTube/ChannelCard.xaml.cs new file mode 100644 index 0000000..6a44152 --- /dev/null +++ b/FoxTube/ChannelCard.xaml.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +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.Media.Imaging; +using Windows.UI.Xaml.Navigation; + +// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 + +namespace FoxTube +{ + public sealed partial class ChannelCard : UserControl + { + string channelId; + public ChannelCard() + { + this.InitializeComponent(); + } + + public void AddInfo(string name, int videos, string avatarUrl, string channelUrl, int subs, Visibility live) + { + channelName.Text = name; + videoCount.Text = string.Format("{0} videos", videos); + + avatar.ProfilePicture = new BitmapImage(new Uri(avatarUrl)); + + subscribers.Text = string.Format("{0} subscribers", subs); + + channelId = channelUrl; + liveTag.Visibility = live; + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + /*Debug.WriteLine(channelId); + Process.Start(channelId);*/ + } + } +} diff --git a/FoxTube/FoxTube.csproj b/FoxTube/FoxTube.csproj index 121f385..c0dd4e1 100644 --- a/FoxTube/FoxTube.csproj +++ b/FoxTube/FoxTube.csproj @@ -101,6 +101,9 @@ Channel.xaml + + ChannelCard.xaml + ChannelVideos.xaml @@ -121,18 +124,30 @@ + + Search.xaml + Settings.xaml Translate.xaml + + Video.xaml + VideoCard.xaml + + VideoCardWide.xaml + VideoGrid.xaml + + VideoList.xaml + @@ -182,6 +197,7 @@ + @@ -208,6 +224,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -232,6 +252,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -240,14 +264,26 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/FoxTube/MainPage.xaml b/FoxTube/MainPage.xaml index c10dced..b5d8b8e 100644 --- a/FoxTube/MainPage.xaml +++ b/FoxTube/MainPage.xaml @@ -101,18 +101,18 @@ - - + diff --git a/FoxTube/VideoCardWide.xaml.cs b/FoxTube/VideoCardWide.xaml.cs new file mode 100644 index 0000000..20ae434 --- /dev/null +++ b/FoxTube/VideoCardWide.xaml.cs @@ -0,0 +1,41 @@ +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.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.Media.Imaging; +using Windows.UI.Xaml.Navigation; + +// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 + +namespace FoxTube +{ + public sealed partial class VideoCardWide : UserControl + { + public VideoCardWide() + { + this.InitializeComponent(); + } + public void AddInfo(string name, string description, string thumbUrl, string avatarUrl, string channelUrl, string channel, string subs, Visibility live) + { + title.Text = name; + info.Text = description; + + thumbnail.Source = new BitmapImage(new Uri(thumbUrl)); + //avatar.ProfilePicture = new BitmapImage(new Uri(avatarUrl)); + + channelName.Text = channel; + channelSubs.Text = string.Format("{0} subscribers", subs); + channelLink.NavigateUri = new Uri(channelUrl); + liveTag.Visibility = live; + } + } +} diff --git a/FoxTube/VideoGrid.xaml b/FoxTube/VideoGrid.xaml index 34ad9bc..e7bfaf9 100644 --- a/FoxTube/VideoGrid.xaml +++ b/FoxTube/VideoGrid.xaml @@ -13,8 +13,30 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FoxTube/VideoList.xaml b/FoxTube/VideoList.xaml new file mode 100644 index 0000000..7cf9438 --- /dev/null +++ b/FoxTube/VideoList.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/FoxTube/VideoList.xaml.cs b/FoxTube/VideoList.xaml.cs new file mode 100644 index 0000000..62cee54 --- /dev/null +++ b/FoxTube/VideoList.xaml.cs @@ -0,0 +1,30 @@ +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.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 Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 + +namespace FoxTube +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class VideoList : Page + { + public VideoList() + { + this.InitializeComponent(); + } + } +} diff --git a/Src/videoThumbSample.png b/Src/videoThumbSample.png new file mode 100644 index 0000000..28c0f63 Binary files /dev/null and b/Src/videoThumbSample.png differ