From d3f51371dd19c57eadeffb857352cfa762adc286 Mon Sep 17 00:00:00 2001 From: watsonb8 Date: Mon, 27 May 2019 11:23:14 -0500 Subject: [PATCH] Initial commit for a party view which displays members and the shared queue --- Aurora/Aurora.csproj | 4 +- .../Frontend/Components/ContentPresenter.cs | 38 ------------ .../HorizontalList/HorizontalList.cs | 6 +- .../Components/HostSelector/HostSelector.xaml | 13 ++++ .../HostSelector/HostSelector.xaml.cs | 14 +++++ .../Components/MemberList/MemberList.xaml | 26 ++++++++ .../Components/MemberList/MemberList.xaml.cs | 61 +++++++++++++++++++ .../NavigationMenu/NavigationMenu.xaml.cs | 26 +++++--- .../Frontend/Views/MainView/MainViewModel.cs | 3 +- Aurora/Frontend/Views/Party/PartyView.xaml | 23 +++++++ Aurora/Frontend/Views/Party/PartyView.xaml.cs | 15 +++++ Aurora/Frontend/Views/Party/PartyViewModel.cs | 31 ++++++++++ 12 files changed, 207 insertions(+), 53 deletions(-) delete mode 100644 Aurora/Frontend/Components/ContentPresenter.cs create mode 100644 Aurora/Frontend/Components/HostSelector/HostSelector.xaml create mode 100644 Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs create mode 100644 Aurora/Frontend/Components/MemberList/MemberList.xaml create mode 100644 Aurora/Frontend/Components/MemberList/MemberList.xaml.cs create mode 100644 Aurora/Frontend/Views/Party/PartyView.xaml create mode 100644 Aurora/Frontend/Views/Party/PartyView.xaml.cs create mode 100644 Aurora/Frontend/Views/Party/PartyViewModel.cs 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 @@ + + + + +