diff --git a/Aurora/Aurora.csproj b/Aurora/Aurora.csproj
index ad3b7f1..99cc804 100644
--- a/Aurora/Aurora.csproj
+++ b/Aurora/Aurora.csproj
@@ -30,10 +30,12 @@
-
+
+
+
diff --git a/Aurora/Frontend/Components/ContentPresenter.cs b/Aurora/Frontend/Components/ContentPresenter.cs
deleted file mode 100644
index 8fd6fa6..0000000
--- a/Aurora/Frontend/Components/ContentPresenter.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using Xamarin.Forms;
-
-namespace Aurora.Frontend.Components
-{
- public class ContentPresenter : ContentView
- {
- public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(ContentPresenter), null, propertyChanged: OnItemTemplateChanged);
-
- private static void OnItemTemplateChanged(BindableObject bindable, object oldvalue, object newvalue)
- {
- var cp = (ContentPresenter)bindable;
-
- var template = cp.ItemTemplate;
- if (template != null)
- {
- var content = (View)template.CreateContent();
- cp.Content = content;
- }
- else
- {
- cp.Content = null;
- }
- }
-
- public DataTemplate ItemTemplate
- {
- get
- {
- return (DataTemplate)GetValue(ItemTemplateProperty);
- }
- set
- {
- SetValue(ItemTemplateProperty, value);
- }
- }
- }
-}
diff --git a/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs b/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs
index 0766b6f..446718f 100755
--- a/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs
+++ b/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Windows.Input;
using Xamarin.Forms;
-namespace Movies.Controls
+namespace Aurora.Frontend.Components.HorizontalList
{
public class HorizontalList : Grid
{
@@ -62,7 +62,7 @@ namespace Movies.Controls
public HorizontalList()
{
- BackgroundColor = Color.FromHex("#1E2634");
+ // BackgroundColor = Color.FromHex("#1E2634");
Spacing = 6;
_scrollView = new ScrollView();
_itemsStackLayout = new StackLayout
@@ -83,7 +83,7 @@ namespace Movies.Controls
_itemsStackLayout.Children.Clear();
_itemsStackLayout.Spacing = Spacing;
- _innerSelectedCommand = new Command(view =>
+ _innerSelectedCommand = new Command(view =>
{
SelectedItem = view.BindingContext;
SelectedItem = null; // Allowing item second time selection
diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml
new file mode 100644
index 0000000..6b0144d
--- /dev/null
+++ b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs
new file mode 100644
index 0000000..8ccd5b0
--- /dev/null
+++ b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+
+namespace Aurora.Frontend.Components.HostSelector
+{
+ public partial class HostSelector : ContentView
+ {
+ public HostSelector()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Aurora/Frontend/Components/MemberList/MemberList.xaml b/Aurora/Frontend/Components/MemberList/MemberList.xaml
new file mode 100644
index 0000000..f6fcc1b
--- /dev/null
+++ b/Aurora/Frontend/Components/MemberList/MemberList.xaml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Aurora/Frontend/Components/MemberList/MemberList.xaml.cs b/Aurora/Frontend/Components/MemberList/MemberList.xaml.cs
new file mode 100644
index 0000000..01d4e7d
--- /dev/null
+++ b/Aurora/Frontend/Components/MemberList/MemberList.xaml.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Aurora.Frontend.Components.HorizontalList;
+
+namespace Aurora.Frontend.Components.MemberList
+{
+ public partial class MemberList : ContentView
+ {
+ public MemberList()
+ {
+ InitializeComponent();
+
+ }
+
+ ///
+ /// Bindable property for members list.
+ ///
+ ///
+ ///
+ ///
+ public static readonly BindableProperty MembersProperty =
+ BindableProperty.Create(propertyName: "Members",
+ returnType: typeof(IEnumerable),
+ declaringType: typeof(MemberList),
+ defaultBindingMode: BindingMode.Default,
+ propertyChanged: OnMembersChanged);
+
+ ///
+ /// Backing property for MembersProperty
+ ///
+ ///
+ public IEnumerable Members
+ {
+ get
+ {
+ return (IEnumerable)GetValue(MembersProperty);
+ }
+ set
+ {
+ SetValue(MembersProperty, value);
+ }
+ }
+
+ ///
+ /// Memberes changed event handler. Assign member list source.
+ ///
+ ///
+ ///
+ ///
+ private static void OnMembersChanged(BindableObject bindable, object oldValue, object newValue)
+ {
+ var control = (MemberList)bindable;
+ var membersList = control.FindByName("MembersHorizontalList") as HorizontalList.HorizontalList;
+ if (membersList != null)
+ {
+ membersList.ItemsSource = newValue as IEnumerable;
+ }
+ }
+ }
+}
diff --git a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs b/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs
index 98f4124..150d282 100644
--- a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs
+++ b/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs
@@ -24,16 +24,22 @@ namespace Aurora.Frontend.Components.NavigationMenu
public ObservableCollection Items
{
- get
- {
- return (ObservableCollection)GetValue(ItemsProperty);
+ get
+ {
+ return (ObservableCollection)GetValue(ItemsProperty);
}
- set
- {
- SetValue(ItemsProperty, value);
+ set
+ {
+ SetValue(ItemsProperty, value);
}
}
+ ///
+ /// Items changed event handler. Organizes items in groups for display.
+ ///
+ /// The changed Item.
+ /// The previous value.
+ /// The new value.
private static void OnItemsChanged(BindableObject bindable, object oldValue, object newValue)
{
var control = (NavigationMenu)bindable;
@@ -41,9 +47,9 @@ namespace Aurora.Frontend.Components.NavigationMenu
Dictionary groupDictioanry = new Dictionary();
//Populate dictionary where group heading is the key
- foreach(NavigationItem item in items)
- {
- if(groupDictioanry.ContainsKey(item.Group))
+ foreach (NavigationItem item in items)
+ {
+ if (groupDictioanry.ContainsKey(item.Group))
{
groupDictioanry.TryGetValue(item.Group, out var groupItem);
groupItem.Items.Add(item);
@@ -58,7 +64,7 @@ namespace Aurora.Frontend.Components.NavigationMenu
}
ObservableCollection groups = new ObservableCollection();
- foreach(string groupHeading in groupDictioanry.Keys)
+ foreach (string groupHeading in groupDictioanry.Keys)
{
groupDictioanry.TryGetValue(groupHeading, out var groupItem);
groups.Add(groupItem);
diff --git a/Aurora/Frontend/Components/Queue/Queue.xaml b/Aurora/Frontend/Components/Queue/Queue.xaml
new file mode 100644
index 0000000..34740ae
--- /dev/null
+++ b/Aurora/Frontend/Components/Queue/Queue.xaml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ 15
+ 13
+ 20
+
+
+
+
+
+
+
+
+
+
+ #F2F2F2
+ #FFFFFF
+
+
+
+
+
\ No newline at end of file
diff --git a/Aurora/Frontend/Components/Queue/Queue.xaml.cs b/Aurora/Frontend/Components/Queue/Queue.xaml.cs
new file mode 100644
index 0000000..4ba7d33
--- /dev/null
+++ b/Aurora/Frontend/Components/Queue/Queue.xaml.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Xamarin.Forms;
+using Xamarin.Forms.DataGrid;
+using Aurora.Backend.Models.Media;
+
+namespace Aurora.Frontend.Components.Queue
+{
+ public partial class Queue : ContentView
+ {
+ public Queue()
+ {
+ InitializeComponent();
+ }
+
+ #region ItemsSource Property
+ ///
+ /// Bindable Property for the ItemsSource of the datagrid.
+ ///
+ ///
+ ///
+ ///
+ public static readonly BindableProperty ItemsSourceProperty =
+ BindableProperty.Create(propertyName: "ItemsSource",
+ returnType: typeof(IEnumerable