Initial commit for a party view which displays members and the shared queue

This commit is contained in:
watsonb8
2019-05-27 11:23:14 -05:00
parent 9354c0b27b
commit d3f51371dd
12 changed files with 207 additions and 53 deletions

View File

@ -7,6 +7,7 @@ using Aurora.Frontend.Views.Albums;
using Aurora.Frontend.Views.Artists;
using Aurora.Frontend.Views.Songs;
using Aurora.Frontend.Views.Stations;
using Aurora.Frontend.Views.Party;
namespace Aurora.Frontend.Views.MainView
{
@ -30,7 +31,7 @@ namespace Aurora.Frontend.Views.MainView
{
_pages = new ObservableCollection<NavigationItem>(new[]
{
new NavigationItem { Id = 4, Title = "Party", Group="Social", TargetType = typeof(ArtistsView)},
new NavigationItem { Id = 4, Title = "Party", Group="Social", TargetType = typeof(PartyView)},
new NavigationItem { Id = 5, Title = "Profile", Group="Social", TargetType = typeof(ArtistsView)},
new NavigationItem { Id = 0, Title = "Songs", Group="Library", TargetType = typeof(SongsView) },
new NavigationItem { Id = 1, Title = "Artists", Group="Library", TargetType = typeof(ArtistsView)},

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:hs="clr-namespace:Aurora.Frontend.Components.HostSelector"
xmlns:ml="clr-namespace:Aurora.Frontend.Components.MemberList"
x:Class="Aurora.Frontend.Views.Party.PartyView">
<ContentView.Content>
<AbsoluteLayout
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<StackLayout>
<ml:MemberList
Members="{Binding Members}"/>
</StackLayout>
<hs:HostSelector
AbsoluteLayout.LayoutFlags="All"
AbsoluteLayout.LayoutBounds="0.5,0.5,0.7,0.7"
BackgroundColor="Green"
IsVisible="False"/>
</AbsoluteLayout>
</ContentView.Content>
</ContentView>

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Aurora.Frontend.Views.Party
{
public partial class PartyView : ContentView
{
public PartyView()
{
InitializeComponent();
BindingContext = new PartyViewModel();
}
}
}

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.ObjectModel;
namespace Aurora.Frontend.Views.Party
{
public class PartyViewModel : BaseViewModel
{
private ObservableCollection<string> _members;
public PartyViewModel()
{
_members = new ObservableCollection<string>()
{
"Kevin",
"Brandon",
"Sheila",
"Dale",
"Austin",
"Tori",
"Ashley",
"Spencer",
};
OnPropertyChanged("Members");
}
public ObservableCollection<string> Members
{
get { return _members; }
set { SetProperty(ref _members, value); }
}
}
}