Reorganization
This commit is contained in:
parent
a01d399a1f
commit
ec6a7586c7
44
Aurora.gtk/Helpers/Settings.cs
Normal file
44
Aurora.gtk/Helpers/Settings.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
// Helpers/Settings.cs This file was automatically added when you installed the Settings Plugin. If you are not using a PCL then comment this file back in to use it.
|
||||||
|
using Plugin.Settings;
|
||||||
|
using Plugin.Settings.Abstractions;
|
||||||
|
|
||||||
|
namespace Aurora.gtk.Helpers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This is the Settings static class that can be used in your Core solution or in any
|
||||||
|
/// of your client applications. All settings are laid out the same exact way with getters
|
||||||
|
/// and setters.
|
||||||
|
/// </summary>
|
||||||
|
public static class Settings
|
||||||
|
{
|
||||||
|
private static ISettings AppSettings
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return CrossSettings.Current;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Setting Constants
|
||||||
|
|
||||||
|
private const string SettingsKey = "settings_key";
|
||||||
|
private static readonly string SettingsDefault = string.Empty;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
public static string GeneralSettings
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault);
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
AppSettings.AddOrUpdateValue(SettingsKey, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}*/
|
@ -1,26 +1,29 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Application xmlns="http://xamarin.com/schemas/2014/forms"
|
<Application
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:converters="clr-namespace:Aurora.Frontend.Converters"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="Aurora.App">
|
xmlns:converters="clr-namespace:Aurora.Design.Converters"
|
||||||
|
x:Class="Aurora.App">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary><!-- GENERAL COLORS -->
|
||||||
|
<Color
|
||||||
<!-- GENERAL COLORS -->
|
x:Key="WhiteColor">#FFFFFF</Color>
|
||||||
<Color x:Key="WhiteColor">#FFFFFF</Color>
|
<Color
|
||||||
<Color x:Key="BlackColor">#000000</Color>
|
x:Key="BlackColor">#000000</Color><!-- THEME COLORS -->
|
||||||
|
<Color
|
||||||
<!-- THEME COLORS -->
|
x:Key="AccentColor">#F5C210</Color>
|
||||||
<Color x:Key="AccentColor">#F5C210</Color>
|
<Color
|
||||||
<Color x:Key="ToolbarColor">#151C25</Color>
|
x:Key="ToolbarColor">#151C25</Color>
|
||||||
<Color x:Key="BackgroundColor">#1E2634</Color>
|
<Color
|
||||||
<Color x:Key="DarkBackgroundColor">#151C25</Color>
|
x:Key="BackgroundColor">#1E2634</Color>
|
||||||
<Color x:Key="MenuBackgroundColor">#44545C</Color>
|
<Color
|
||||||
|
x:Key="DarkBackgroundColor">#151C25</Color>
|
||||||
<!-- CONVERTERS -->
|
<Color
|
||||||
<converters:InverseBoolConverter x:Key="InverseBoolConverter" />
|
x:Key="MenuBackgroundColor">#44545C</Color><!-- CONVERTERS -->
|
||||||
<converters:ToUpperConverter x:Key="ToUpperConverter" />
|
<converters:InverseBoolConverter
|
||||||
|
x:Key="InverseBoolConverter"/>
|
||||||
|
<converters:ToUpperConverter
|
||||||
|
x:Key="ToUpperConverter"/>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using Aurora.Frontend.Views.Main;
|
using Aurora.Design.Views.Main;
|
||||||
using LibVLCSharp.Shared;
|
using LibVLCSharp.Shared;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Forms.Xaml;
|
using Xamarin.Forms.Xaml;
|
||||||
|
@ -1,52 +1,97 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project
|
||||||
|
Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<ProduceAssemblyReference>true</ProduceAssemblyReference>
|
<ProduceAssemblyReference>true</ProduceAssemblyReference>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup
|
||||||
|
Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Xamarin.Forms" Version="3.6.0.264807" />
|
<PackageReference
|
||||||
<PackageReference Include="Xamarin.Essentials" Version="1.0.1" />
|
Include="Xamarin.Forms"
|
||||||
<PackageReference Include="Xamarin.Forms.DataGrid" Version="3.1.0" />
|
Version="3.6.0.264807"/>
|
||||||
<PackageReference Include="taglib-sharp-netstandard2.0" Version="2.1.0" />
|
<PackageReference
|
||||||
<PackageReference Include="LibVLCSharp.Forms" Version="3.0.0" />
|
Include="Xamarin.Essentials"
|
||||||
<PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.1.3" />
|
Version="1.0.1"/>
|
||||||
<PackageReference Include="Grpc" Version="1.21.0" />
|
<PackageReference
|
||||||
<PackageReference Include="Grpc.Tools" Version="1.21.0" PrivateAssests="All" />
|
Include="Xamarin.Forms.DataGrid"
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.8.0" />
|
Version="3.1.0"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="taglib-sharp-netstandard2.0"
|
||||||
|
Version="2.1.0"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="LibVLCSharp.Forms"
|
||||||
|
Version="3.0.0"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="VideoLAN.LibVLC.Mac"
|
||||||
|
Version="3.1.3"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="Grpc"
|
||||||
|
Version="1.21.0"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="Grpc.Tools"
|
||||||
|
Version="1.21.0"
|
||||||
|
PrivateAssests="All"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="Google.Protobuf"
|
||||||
|
Version="3.8.0"/>
|
||||||
|
<PackageReference
|
||||||
|
Include="Xam.Plugins.Settings"
|
||||||
|
Version="3.1.1"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Frontend\" />
|
<Folder
|
||||||
<Folder Include="Backend\" />
|
Include="Design\"/>
|
||||||
<Folder Include="Frontend\Components\" />
|
<Folder
|
||||||
<Folder Include="Frontend\Views\" />
|
Include="Design\Components\"/>
|
||||||
<Folder Include="Frontend\Views\Songs\" />
|
<Folder
|
||||||
<Folder Include="Frontend\Views\MainView\" />
|
Include="Design\Views\"/>
|
||||||
<Folder Include="Frontend\Behaviors\" />
|
<Folder
|
||||||
<Folder Include="Frontend\Components\NavigationMenu\" />
|
Include="Design\Views\Songs\"/>
|
||||||
<Folder Include="Frontend\Views\Albums\" />
|
<Folder
|
||||||
<Folder Include="Frontend\Views\Artists\" />
|
Include="Design\Views\MainView\"/>
|
||||||
<Folder Include="Frontend\Views\Stations\" />
|
<Folder
|
||||||
<Folder Include="Backend\Utils\" />
|
Include="Design\Behaviors\"/>
|
||||||
<Folder Include="Backend\Models\" />
|
<Folder
|
||||||
<Folder Include="Backend\Services\" />
|
Include="Design\Components\NavigationMenu\"/>
|
||||||
<Folder Include="Frontend\Views\Party\" />
|
<Folder
|
||||||
<Folder Include="Frontend\Components\HostSelector\" />
|
Include="Design\Views\Albums\"/>
|
||||||
<Folder Include="Frontend\Components\MemberList\" />
|
<Folder
|
||||||
<Folder Include="Frontend\Components\Queue\" />
|
Include="Design\Views\Artists\"/>
|
||||||
<Folder Include="Frontend\Views\Profile\" />
|
<Folder
|
||||||
|
Include="Design\Views\Stations\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Utils\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Models\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Services\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Design\Views\Party\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Design\Components\HostSelector\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Design\Components\MemberList\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Design\Components\Queue\"/>
|
||||||
|
<Folder
|
||||||
|
Include="Design\Views\Profile\"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="Frontend\Components\MusicPlayer\Player.xaml.cs">
|
<Compile
|
||||||
|
Update="Design\Components\MusicPlayer\Player.xaml.cs">
|
||||||
<DependentUpon>Player.xaml</DependentUpon>
|
<DependentUpon>Player.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Protobuf Include="Backend\Proto\general.proto" />
|
<Protobuf
|
||||||
<Protobuf Include="Backend\Proto\party.proto" />
|
Include="Proto\general.proto"/>
|
||||||
<Protobuf Include="Backend\Proto\playback.proto" />
|
<Protobuf
|
||||||
|
Include="Proto\party.proto"/>
|
||||||
|
<Protobuf
|
||||||
|
Include="Proto\playback.proto"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,36 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
|
|
||||||
namespace Aurora.Backend.Services
|
|
||||||
{
|
|
||||||
public class SettingsService : BaseService<SettingsService>
|
|
||||||
{
|
|
||||||
private string _usernameKey = "Username";
|
|
||||||
|
|
||||||
public SettingsService()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Username
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!Application.Current.Properties.ContainsKey(_usernameKey))
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
Application.Current.Properties.TryGetValue(_usernameKey, out object val);
|
|
||||||
return val as string;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (Application.Current.Properties.ContainsKey(_usernameKey))
|
|
||||||
{
|
|
||||||
Application.Current.Properties.Remove(_usernameKey);
|
|
||||||
}
|
|
||||||
Application.Current.Properties.Add(_usernameKey, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Behaviors
|
namespace Aurora.Design.Behaviors
|
||||||
{
|
{
|
||||||
public class BehaviorBase<T> : Behavior<T> where T : BindableObject
|
public class BehaviorBase<T> : Behavior<T> where T : BindableObject
|
||||||
{
|
{
|
@ -3,7 +3,7 @@ using System.Reflection;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Behaviors
|
namespace Aurora.Design.Behaviors
|
||||||
{
|
{
|
||||||
public class EventToCommandBehavior : BehaviorBase<View>
|
public class EventToCommandBehavior : BehaviorBase<View>
|
||||||
{
|
{
|
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.HorizontalList
|
namespace Aurora.Design.Components.HorizontalList
|
||||||
{
|
{
|
||||||
public class HorizontalList : Grid
|
public class HorizontalList : Grid
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="Aurora.Frontend.Components.HostSelector.HostSelector">
|
x:Class="Aurora.Design.Components.HostSelector.HostSelector">
|
||||||
<ContentView.Content>
|
<ContentView.Content>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.HostSelector
|
namespace Aurora.Design.Components.HostSelector
|
||||||
{
|
{
|
||||||
public enum ConnectionType
|
public enum ConnectionType
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="Aurora.Frontend.Components.MediaPlayer.Player">
|
x:Class="Aurora.Design.Components.MediaPlayer.Player">
|
||||||
<ContentView.Content>
|
<ContentView.Content>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.MediaPlayer
|
namespace Aurora.Design.Components.MediaPlayer
|
||||||
{
|
{
|
||||||
public partial class Player : ContentView
|
public partial class Player : ContentView
|
||||||
{
|
{
|
@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Aurora.Frontend.Views;
|
using Aurora.Design.Views;
|
||||||
using Aurora.Backend.Services.PlayerService;
|
using Aurora.Services.PlayerService;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.MediaPlayer
|
namespace Aurora.Design.Components.MediaPlayer
|
||||||
{
|
{
|
||||||
public class PlayerViewModel : BaseViewModel
|
public class PlayerViewModel : BaseViewModel
|
||||||
{
|
{
|
@ -2,8 +2,8 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:hl="clr-namespace:Aurora.Frontend.Components.HorizontalList"
|
xmlns:hl="clr-namespace:Aurora.Design.Components.HorizontalList"
|
||||||
x:Class="Aurora.Frontend.Components.MemberList.MemberList">
|
x:Class="Aurora.Design.Components.MemberList.MemberList">
|
||||||
<ContentView.Content>
|
<ContentView.Content>
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<hl:HorizontalList
|
<hl:HorizontalList
|
@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Aurora.Frontend.Components.HorizontalList;
|
using Aurora.Design.Components.HorizontalList;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.MemberList
|
namespace Aurora.Design.Components.MemberList
|
||||||
{
|
{
|
||||||
public partial class MemberList : ContentView
|
public partial class MemberList : ContentView
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.NavigationMenu
|
namespace Aurora.Design.Components.NavigationMenu
|
||||||
{
|
{
|
||||||
public class NavigationGroupItem : List<NavigationItem>
|
public class NavigationGroupItem : List<NavigationItem>
|
||||||
{
|
{
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Aurora.Frontend.Views.Main;
|
using Aurora.Design.Views.Main;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.NavigationMenu
|
namespace Aurora.Design.Components.NavigationMenu
|
||||||
{
|
{
|
||||||
public class NavigationItem
|
public class NavigationItem
|
||||||
{
|
{
|
74
Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml
Normal file
74
Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ContentPage
|
||||||
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Aurora.Design.Components.NavigationMenu.NavigationMenu"
|
||||||
|
Title="Navigation">
|
||||||
|
<ContentView.Content>
|
||||||
|
<StackLayout>
|
||||||
|
<ListView
|
||||||
|
x:Name="MenuItemsListView"
|
||||||
|
SeparatorVisibility="None"
|
||||||
|
HasUnevenRows="true"
|
||||||
|
BackgroundColor="{StaticResource MenuBackgroundColor}"
|
||||||
|
IsGroupingEnabled="true"
|
||||||
|
CachingStrategy="RecycleElement">
|
||||||
|
<ListView.Header>
|
||||||
|
<Grid
|
||||||
|
BackgroundColor="#03A9F4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition
|
||||||
|
Width="10"/>
|
||||||
|
<ColumnDefinition
|
||||||
|
Width="*"/>
|
||||||
|
<ColumnDefinition
|
||||||
|
Width="10"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition
|
||||||
|
Height="30"/>
|
||||||
|
<RowDefinition
|
||||||
|
Height="80"/>
|
||||||
|
<RowDefinition
|
||||||
|
Height="Auto"/>
|
||||||
|
<RowDefinition
|
||||||
|
Height="10"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="Aurora"
|
||||||
|
Style="{DynamicResource SubtitleStyle}"/>
|
||||||
|
</Grid>
|
||||||
|
</ListView.Header>
|
||||||
|
<ListView.GroupHeaderTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<ViewCell>
|
||||||
|
<Label
|
||||||
|
VerticalOptions="FillAndExpand"
|
||||||
|
VerticalTextAlignment="Start"
|
||||||
|
Text="{Binding GroupHeading}"
|
||||||
|
FontSize="18"
|
||||||
|
TextColor="White"/>
|
||||||
|
</ViewCell>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.GroupHeaderTemplate>
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<ViewCell>
|
||||||
|
<StackLayout
|
||||||
|
Padding="15,10"
|
||||||
|
HorizontalOptions="FillAndExpand">
|
||||||
|
<Label
|
||||||
|
VerticalOptions="FillAndExpand"
|
||||||
|
VerticalTextAlignment="Center"
|
||||||
|
Text="{Binding Title}"
|
||||||
|
FontSize="24"/>
|
||||||
|
</StackLayout>
|
||||||
|
</ViewCell>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
</StackLayout>
|
||||||
|
</ContentView.Content>
|
||||||
|
</ContentPage>
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.NavigationMenu
|
namespace Aurora.Design.Components.NavigationMenu
|
||||||
{
|
{
|
||||||
public partial class NavigationMenu : ContentPage
|
public partial class NavigationMenu : ContentPage
|
||||||
{
|
{
|
@ -3,7 +3,7 @@
|
|||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
||||||
x:Class="Aurora.Frontend.Components.Queue.Queue">
|
x:Class="Aurora.Design.Components.Queue.Queue">
|
||||||
<ContentView.Content>
|
<ContentView.Content>
|
||||||
<dg:DataGrid
|
<dg:DataGrid
|
||||||
x:Name="QueueDataGrid"
|
x:Name="QueueDataGrid"
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Forms.DataGrid;
|
using Xamarin.Forms.DataGrid;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Components.Queue
|
namespace Aurora.Design.Components.Queue
|
||||||
{
|
{
|
||||||
public partial class Queue : ContentView
|
public partial class Queue : ContentView
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Converters
|
namespace Aurora.Design.Converters
|
||||||
{
|
{
|
||||||
public class InverseBoolConverter : IValueConverter
|
public class InverseBoolConverter : IValueConverter
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Converters
|
namespace Aurora.Design.Converters
|
||||||
{
|
{
|
||||||
public class ToUpperConverter : IValueConverter
|
public class ToUpperConverter : IValueConverter
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="Aurora.Frontend.Views.Albums.AlbumsView">
|
x:Class="Aurora.Design.Views.Albums.AlbumsView">
|
||||||
<ContentPage.Content>
|
<ContentPage.Content>
|
||||||
<Grid></Grid>
|
<Grid></Grid>
|
||||||
</ContentPage.Content>
|
</ContentPage.Content>
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Albums
|
namespace Aurora.Design.Views.Albums
|
||||||
{
|
{
|
||||||
public partial class AlbumsView : ContentView
|
public partial class AlbumsView : ContentView
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace Aurora.Frontend.Views.Albums
|
namespace Aurora.Design.Views.Albums
|
||||||
{
|
{
|
||||||
public class AlbumsViewModel
|
public class AlbumsViewModel
|
||||||
{
|
{
|
7
Aurora/Design/Views/Artists/ArtistsView.xaml
Normal file
7
Aurora/Design/Views/Artists/ArtistsView.xaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ContentView
|
||||||
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Aurora.Design.Views.Artists.ArtistsView">
|
||||||
|
<ContentPage.Content></ContentPage.Content>
|
||||||
|
</ContentView>
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Artists
|
namespace Aurora.Design.Views.Artists
|
||||||
{
|
{
|
||||||
public partial class ArtistsView : ContentView
|
public partial class ArtistsView : ContentView
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace Aurora.Frontend.Views.Artists
|
namespace Aurora.Design.Views.Artists
|
||||||
{
|
{
|
||||||
public class ArtistsViewModel
|
public class ArtistsViewModel
|
||||||
{
|
{
|
@ -2,7 +2,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views
|
namespace Aurora.Design.Views
|
||||||
{
|
{
|
||||||
public class BaseViewModel : INotifyPropertyChanged
|
public class BaseViewModel : INotifyPropertyChanged
|
||||||
{
|
{
|
22
Aurora/Design/Views/MainView/MainView.xaml
Normal file
22
Aurora/Design/Views/MainView/MainView.xaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<MasterDetailPage
|
||||||
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:views="clr-namespace:Aurora.Design.Views.MainView"
|
||||||
|
xmlns:navigation="clr-namespace:Aurora.Design.Components.NavigationMenu"
|
||||||
|
x:Class="Aurora.Design.Views.Main.MainView"
|
||||||
|
MasterBehavior="Split">
|
||||||
|
<MasterDetailPage.Master>
|
||||||
|
<navigation:NavigationMenu
|
||||||
|
x:Name="MasterPage"
|
||||||
|
Items="{Binding Pages}"/>
|
||||||
|
</MasterDetailPage.Master>
|
||||||
|
<MasterDetailPage.Detail>
|
||||||
|
<NavigationPage>
|
||||||
|
<x:Arguments>
|
||||||
|
<views:PageContainer
|
||||||
|
x:Name="ContentPage"/>
|
||||||
|
</x:Arguments>
|
||||||
|
</NavigationPage>
|
||||||
|
</MasterDetailPage.Detail>
|
||||||
|
</MasterDetailPage>
|
@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Aurora.Frontend.Components.NavigationMenu;
|
using Aurora.Design.Components.NavigationMenu;
|
||||||
using Aurora.Frontend.Views.MainView;
|
using Aurora.Design.Views.MainView;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Forms.Xaml;
|
using Xamarin.Forms.Xaml;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Main
|
namespace Aurora.Design.Views.Main
|
||||||
{
|
{
|
||||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||||
public partial class MainView : MasterDetailPage
|
public partial class MainView : MasterDetailPage
|
@ -2,15 +2,15 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using Aurora.Frontend.Components.NavigationMenu;
|
using Aurora.Design.Components.NavigationMenu;
|
||||||
using Aurora.Frontend.Views.Albums;
|
using Aurora.Design.Views.Albums;
|
||||||
using Aurora.Frontend.Views.Artists;
|
using Aurora.Design.Views.Artists;
|
||||||
using Aurora.Frontend.Views.Songs;
|
using Aurora.Design.Views.Songs;
|
||||||
using Aurora.Frontend.Views.Stations;
|
using Aurora.Design.Views.Stations;
|
||||||
using Aurora.Frontend.Views.Party;
|
using Aurora.Design.Views.Party;
|
||||||
using Aurora.Frontend.Views.Profile;
|
using Aurora.Design.Views.Profile;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.MainView
|
namespace Aurora.Design.Views.MainView
|
||||||
{
|
{
|
||||||
public class MainViewModel : BaseViewModel
|
public class MainViewModel : BaseViewModel
|
||||||
{
|
{
|
@ -2,9 +2,9 @@
|
|||||||
<ContentPage
|
<ContentPage
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:components="clr-namespace:Aurora.Frontend.Components"
|
xmlns:components="clr-namespace:Aurora.Design.Components"
|
||||||
xmlns:mp="clr-namespace:Aurora.Frontend.Components.MediaPlayer"
|
xmlns:mp="clr-namespace:Aurora.Design.Components.MediaPlayer"
|
||||||
x:Class="Aurora.Frontend.Views.MainView.PageContainer">
|
x:Class="Aurora.Design.Views.MainView.PageContainer">
|
||||||
<ContentPage.Content>
|
<ContentPage.Content>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.MainView
|
namespace Aurora.Design.Views.MainView
|
||||||
{
|
{
|
||||||
public partial class PageContainer : ContentPage
|
public partial class PageContainer : ContentPage
|
||||||
{
|
{
|
@ -2,14 +2,15 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:hs="clr-namespace:Aurora.Frontend.Components.HostSelector"
|
xmlns:hs="clr-namespace:Aurora.Design.Components.HostSelector"
|
||||||
xmlns:ml="clr-namespace:Aurora.Frontend.Components.MemberList"
|
xmlns:ml="clr-namespace:Aurora.Design.Components.MemberList"
|
||||||
xmlns:qu="clr-namespace:Aurora.Frontend.Components.Queue"
|
xmlns:qu="clr-namespace:Aurora.Design.Components.Queue"
|
||||||
x:Class="Aurora.Frontend.Views.Party.PartyView">
|
x:Class="Aurora.Design.Views.Party.PartyView">
|
||||||
<ContentView.Content>
|
<ContentView.Content>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition
|
||||||
|
Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackLayout
|
<StackLayout
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
@ -20,7 +21,7 @@
|
|||||||
VerticalOptions="FillAndExpand"
|
VerticalOptions="FillAndExpand"
|
||||||
Members="{Binding Members}"/>
|
Members="{Binding Members}"/>
|
||||||
<Label
|
<Label
|
||||||
Text="Queue"/>
|
Text="Queue"/>
|
||||||
<qu:Queue/>
|
<qu:Queue/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
<hs:HostSelector
|
<hs:HostSelector
|
||||||
@ -30,7 +31,6 @@
|
|||||||
HostCommand="{Binding HostCommand}"
|
HostCommand="{Binding HostCommand}"
|
||||||
JoinCommand="{Binding JoinCommand}"
|
JoinCommand="{Binding JoinCommand}"
|
||||||
IsVisible="{Binding IsSelectingHost}"/>
|
IsVisible="{Binding IsSelectingHost}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</ContentView.Content>
|
</ContentView.Content>
|
||||||
</ContentView>
|
</ContentView>
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Party
|
namespace Aurora.Design.Views.Party
|
||||||
{
|
{
|
||||||
public partial class PartyView : ContentView
|
public partial class PartyView : ContentView
|
||||||
{
|
{
|
@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Aurora.Backend.Executors;
|
using Aurora.Executors;
|
||||||
using Aurora.Frontend.Components.HostSelector;
|
using Aurora.Design.Components.HostSelector;
|
||||||
using Aurora.Backend.Services;
|
using Aurora.Services;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Party
|
namespace Aurora.Design.Views.Party
|
||||||
{
|
{
|
||||||
enum PartyState
|
enum PartyState
|
||||||
{
|
{
|
18
Aurora/Design/Views/Profile/ProfileView.xaml
Normal file
18
Aurora/Design/Views/Profile/ProfileView.xaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ContentView
|
||||||
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Aurora.Design.Views.Profile.ProfileView">
|
||||||
|
<ContentView.Content>
|
||||||
|
<StackLayout
|
||||||
|
Orientation="Vertical">
|
||||||
|
<StackLayout
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<Label
|
||||||
|
Text="Username"/>
|
||||||
|
<Entry
|
||||||
|
Text="{Binding Username}"/>
|
||||||
|
</StackLayout>
|
||||||
|
</StackLayout>
|
||||||
|
</ContentView.Content>
|
||||||
|
</ContentView>
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Profile
|
namespace Aurora.Design.Views.Profile
|
||||||
{
|
{
|
||||||
public partial class ProfileView : ContentView
|
public partial class ProfileView : ContentView
|
||||||
{
|
{
|
23
Aurora/Design/Views/Profile/ProfileViewModel.cs
Normal file
23
Aurora/Design/Views/Profile/ProfileViewModel.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using Aurora.Services;
|
||||||
|
|
||||||
|
namespace Aurora.Design.Views.Profile
|
||||||
|
{
|
||||||
|
public class ProfileViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public ProfileViewModel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Username
|
||||||
|
{
|
||||||
|
get { return SettingsService.Instance.Username; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SettingsService.Instance.Username = value;
|
||||||
|
OnPropertyChanged("Username");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,9 +2,9 @@
|
|||||||
<ContentView
|
<ContentView
|
||||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:songs="clr-namespace:Aurora.Frontend.Views.Songs"
|
xmlns:songs="clr-namespace:Aurora.Design.Views.Songs"
|
||||||
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
||||||
x:Class="Aurora.Frontend.Views.Songs.SongsView">
|
x:Class="Aurora.Design.Views.Songs.SongsView">
|
||||||
<ContentPage.BindingContext>
|
<ContentPage.BindingContext>
|
||||||
<songs:SongsViewModel
|
<songs:SongsViewModel
|
||||||
x:Name="songsViewModel"/>
|
x:Name="songsViewModel"/>
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Songs
|
namespace Aurora.Design.Views.Songs
|
||||||
{
|
{
|
||||||
public partial class SongsView : ContentView
|
public partial class SongsView : ContentView
|
||||||
{
|
{
|
@ -1,10 +1,10 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
using Aurora.Backend.Services;
|
using Aurora.Services;
|
||||||
using Aurora.Backend.Services.PlayerService;
|
using Aurora.Services.PlayerService;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Songs
|
namespace Aurora.Design.Views.Songs
|
||||||
{
|
{
|
||||||
public class SongsViewModel : BaseViewModel
|
public class SongsViewModel : BaseViewModel
|
||||||
{
|
{
|
7
Aurora/Design/Views/Stations/StationsViewModel.xaml
Normal file
7
Aurora/Design/Views/Stations/StationsViewModel.xaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ContentView
|
||||||
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Aurora.Design.Views.Stations.StationsView">
|
||||||
|
<ContentPage.Content></ContentPage.Content>
|
||||||
|
</ContentView>
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Aurora.Frontend.Views.Stations
|
namespace Aurora.Design.Views.Stations
|
||||||
{
|
{
|
||||||
public partial class StationsView : ContentView
|
public partial class StationsView : ContentView
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace Aurora.Frontend.Views.Stations
|
namespace Aurora.Design.Views.Stations
|
||||||
{
|
{
|
||||||
public class StationsViewModel
|
public class StationsViewModel
|
||||||
{
|
{
|
@ -2,7 +2,7 @@ using System;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Aurora.Backend.Executors
|
namespace Aurora.Executors
|
||||||
{
|
{
|
||||||
public abstract class BaseExecutor
|
public abstract class BaseExecutor
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Aurora.Backend.Executors;
|
using Aurora.Executors;
|
||||||
|
|
||||||
namespace Aurora.Backend.Executors
|
namespace Aurora.Executors
|
||||||
{
|
{
|
||||||
public class ClientExecutor : BaseExecutor
|
public class ClientExecutor : BaseExecutor
|
||||||
{
|
{
|
@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Aurora.Backend.Executors;
|
using Aurora.Executors;
|
||||||
using Aurora.Backend.Services;
|
using Aurora.Services;
|
||||||
using Aurora.Backend.Proto;
|
using Aurora.Proto;
|
||||||
using Aurora.Backend.RemoteImpl;
|
using Aurora.RemoteImpl;
|
||||||
|
|
||||||
namespace Aurora.Backend.Executors
|
namespace Aurora.Executors
|
||||||
{
|
{
|
||||||
public class HostExecutor : BaseExecutor
|
public class HostExecutor : BaseExecutor
|
||||||
{
|
{
|
||||||
@ -14,7 +14,7 @@ namespace Aurora.Backend.Executors
|
|||||||
public HostExecutor()
|
public HostExecutor()
|
||||||
{
|
{
|
||||||
_remoteServiceImpl = new RemotePartyServiceImpl();
|
_remoteServiceImpl = new RemotePartyServiceImpl();
|
||||||
|
_remotePlaybackImpl = new RemotePlaybackServiceImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="Aurora.Frontend.Components.NavigationMenu.NavigationMenu"
|
|
||||||
Title="Navigation">
|
|
||||||
<ContentView.Content>
|
|
||||||
<StackLayout>
|
|
||||||
<ListView x:Name="MenuItemsListView"
|
|
||||||
SeparatorVisibility="None"
|
|
||||||
HasUnevenRows="true"
|
|
||||||
BackgroundColor="{StaticResource MenuBackgroundColor}"
|
|
||||||
IsGroupingEnabled="true"
|
|
||||||
CachingStrategy="RecycleElement">
|
|
||||||
<ListView.Header>
|
|
||||||
<Grid BackgroundColor="#03A9F4">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="10" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="10" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="30" />
|
|
||||||
<RowDefinition Height="80" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="10" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Label Grid.Column="1" Grid.Row="2" Text="Aurora" Style="{DynamicResource SubtitleStyle}" />
|
|
||||||
</Grid>
|
|
||||||
</ListView.Header>
|
|
||||||
|
|
||||||
<ListView.GroupHeaderTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<Label VerticalOptions="FillAndExpand" VerticalTextAlignment="Start" Text="{Binding GroupHeading}" FontSize="18" TextColor="White"/>
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.GroupHeaderTemplate>
|
|
||||||
|
|
||||||
<ListView.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<ViewCell>
|
|
||||||
<StackLayout Padding="15,10" HorizontalOptions="FillAndExpand">
|
|
||||||
<Label VerticalOptions="FillAndExpand" VerticalTextAlignment="Center" Text="{Binding Title}" FontSize="24" />
|
|
||||||
</StackLayout>
|
|
||||||
</ViewCell>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListView.ItemTemplate>
|
|
||||||
</ListView>
|
|
||||||
</StackLayout>
|
|
||||||
</ContentView.Content>
|
|
||||||
</ContentPage>
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Aurora.Frontend.Views.Artists.ArtistsView">
|
|
||||||
<ContentPage.Content>
|
|
||||||
</ContentPage.Content>
|
|
||||||
</ContentView>
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
xmlns:views="clr-namespace:Aurora.Frontend.Views.MainView"
|
|
||||||
xmlns:navigation="clr-namespace:Aurora.Frontend.Components.NavigationMenu"
|
|
||||||
x:Class="Aurora.Frontend.Views.Main.MainView"
|
|
||||||
MasterBehavior="Split">
|
|
||||||
|
|
||||||
<MasterDetailPage.Master>
|
|
||||||
<navigation:NavigationMenu x:Name="MasterPage" Items="{Binding Pages}"/>
|
|
||||||
</MasterDetailPage.Master>
|
|
||||||
|
|
||||||
<MasterDetailPage.Detail>
|
|
||||||
<NavigationPage>
|
|
||||||
<x:Arguments>
|
|
||||||
<views:PageContainer x:Name="ContentPage" />
|
|
||||||
</x:Arguments>
|
|
||||||
</NavigationPage>
|
|
||||||
</MasterDetailPage.Detail>
|
|
||||||
|
|
||||||
</MasterDetailPage>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Aurora.Frontend.Views.Profile.ProfileView">
|
|
||||||
<ContentView.Content>
|
|
||||||
<Label Text="This is a profile"/>
|
|
||||||
</ContentView.Content>
|
|
||||||
</ContentView>
|
|
@ -1,10 +0,0 @@
|
|||||||
using System;
|
|
||||||
namespace Aurora.Frontend.Views.Profile
|
|
||||||
{
|
|
||||||
public class ProfileViewModel
|
|
||||||
{
|
|
||||||
public ProfileViewModel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Aurora.Frontend.Views.Stations.StationsView">
|
|
||||||
<ContentPage.Content>
|
|
||||||
</ContentPage.Content>
|
|
||||||
</ContentView>
|
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Aurora.Backend.Models.Media
|
namespace Aurora.Models.Media
|
||||||
{
|
{
|
||||||
public class AudioMetadata : BaseMetadata
|
public class AudioMetadata : BaseMetadata
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace Aurora.Backend.Models.Media
|
namespace Aurora.Models.Media
|
||||||
{
|
{
|
||||||
public abstract class BaseMedia
|
public abstract class BaseMedia
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace Aurora.Backend.Models.Media
|
namespace Aurora.Models.Media
|
||||||
{
|
{
|
||||||
public class BaseMetadata
|
public class BaseMetadata
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace Aurora.Backend.Models.Media
|
namespace Aurora.Models.Media
|
||||||
{
|
{
|
||||||
public class LocalAudio : BaseMedia
|
public class LocalAudio : BaseMedia
|
||||||
{
|
{
|
@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace Aurora.Backend.Models.Media
|
namespace Aurora.Models.Media
|
||||||
{
|
{
|
||||||
public enum MediaTypeEnum
|
public enum MediaTypeEnum
|
||||||
{
|
{
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Aurora.Backend.Models
|
namespace Aurora.Models
|
||||||
{
|
{
|
||||||
public class PartyMember
|
public class PartyMember
|
||||||
{
|
{
|
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package Aurora.Backend.Proto;
|
package Aurora.Proto;
|
||||||
|
|
||||||
message Chunk {
|
message Chunk {
|
||||||
bytes Content = 1;
|
bytes Content = 1;
|
@ -1,8 +1,8 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package Aurora.Backend.Proto;
|
package Aurora.Proto;
|
||||||
|
|
||||||
import "Backend/Proto/general.proto";
|
import "Proto/general.proto";
|
||||||
|
|
||||||
service RemotePartyService {
|
service RemotePartyService {
|
||||||
//Party Service
|
//Party Service
|
@ -1,8 +1,8 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package Aurora.Backend.Proto;
|
package Aurora.Proto;
|
||||||
|
|
||||||
import "Backend/Proto/general.proto";
|
import "Proto/general.proto";
|
||||||
|
|
||||||
service RemotePlaybackService {
|
service RemotePlaybackService {
|
||||||
//Playback Service
|
//Playback Service
|
@ -1,10 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Aurora.Backend.Proto;
|
using Aurora.Proto;
|
||||||
using Aurora.Backend.Models;
|
using Aurora.Models;
|
||||||
|
using Aurora.Services;
|
||||||
|
|
||||||
namespace Aurora.Backend.RemoteImpl
|
namespace Aurora.RemoteImpl
|
||||||
{
|
{
|
||||||
public class RemotePartyServiceImpl : RemotePartyService.RemotePartyServiceBase
|
public class RemotePartyServiceImpl : RemotePartyService.RemotePartyServiceBase
|
||||||
{
|
{
|
||||||
@ -16,6 +17,15 @@ namespace Aurora.Backend.RemoteImpl
|
|||||||
public RemotePartyServiceImpl()
|
public RemotePartyServiceImpl()
|
||||||
{
|
{
|
||||||
_partyMembers = new Dictionary<string, PartyMember>();
|
_partyMembers = new Dictionary<string, PartyMember>();
|
||||||
|
|
||||||
|
//Add self to members list
|
||||||
|
_partyMembers.Add(SettingsService.Instance.Username, new PartyMember
|
||||||
|
{
|
||||||
|
Username = SettingsService.Instance.Username,
|
||||||
|
Id = "asdf",
|
||||||
|
IpAddress = ServerService.Instance.Hostname,
|
||||||
|
Port = ServerService.Instance.Port.ToString()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, PartyMember> PartyMembers
|
public Dictionary<string, PartyMember> PartyMembers
|
@ -1,13 +1,19 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Aurora.Backend.Proto;
|
using Aurora.Proto;
|
||||||
using Aurora.Backend.Models;
|
using Aurora.Models;
|
||||||
|
|
||||||
namespace Aurora.Backend.RemoteImpl
|
namespace Aurora.RemoteImpl
|
||||||
{
|
{
|
||||||
public class RemotePlaybackServiceImpl : RemotePlaybackService.RemotePlaybackServiceBase
|
public class RemotePlaybackServiceImpl : RemotePlaybackService.RemotePlaybackServiceBase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public RemotePlaybackServiceImpl()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public override async Task GetPartyStream(Empty empty,
|
public override async Task GetPartyStream(Empty empty,
|
||||||
Grpc.Core.IServerStreamWriter<Chunk> responseStream,
|
Grpc.Core.IServerStreamWriter<Chunk> responseStream,
|
||||||
Grpc.Core.ServerCallContext context)
|
Grpc.Core.ServerCallContext context)
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Aurora.Backend.Services
|
namespace Aurora.Services
|
||||||
{
|
{
|
||||||
public abstract class BaseService<T> where T : class
|
public abstract class BaseService<T> where T : class
|
||||||
{
|
{
|
@ -2,10 +2,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
using Aurora.Backend.Utils;
|
using Aurora.Utils;
|
||||||
|
|
||||||
namespace Aurora.Backend.Services
|
namespace Aurora.Services
|
||||||
{
|
{
|
||||||
public class LibraryService : BaseService<LibraryService>
|
public class LibraryService : BaseService<LibraryService>
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
|
|
||||||
namespace Aurora.Backend.Services.PlayerService
|
namespace Aurora.Services.PlayerService
|
||||||
{
|
{
|
||||||
public delegate void MediaChangedEventHandler(object source, MediaChangedEventArgs e);
|
public delegate void MediaChangedEventHandler(object source, MediaChangedEventArgs e);
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
|
|
||||||
namespace Aurora.Backend.Services.PlayerService
|
namespace Aurora.Services.PlayerService
|
||||||
{
|
{
|
||||||
public delegate void PlaybackStateChangedEventHandler(object source, PlaybackStateChangedEventArgs e);
|
public delegate void PlaybackStateChangedEventHandler(object source, PlaybackStateChangedEventArgs e);
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using Aurora.Backend.Models.Media;
|
using Aurora.Models.Media;
|
||||||
using LibVLCSharp.Shared;
|
using LibVLCSharp.Shared;
|
||||||
|
|
||||||
namespace Aurora.Backend.Services.PlayerService
|
namespace Aurora.Services.PlayerService
|
||||||
{
|
{
|
||||||
public class PlayerService : BaseService<PlayerService>
|
public class PlayerService : BaseService<PlayerService>
|
||||||
{
|
{
|
@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Grpc.Core;
|
using Grpc.Core;
|
||||||
using Aurora.Backend.Proto;
|
using Aurora.Proto;
|
||||||
|
|
||||||
namespace Aurora.Backend.Services
|
namespace Aurora.Services
|
||||||
{
|
{
|
||||||
public class ServerService : BaseService<ServerService>
|
public class ServerService : BaseService<ServerService>
|
||||||
{
|
{
|
||||||
@ -18,6 +18,16 @@ namespace Aurora.Backend.Services
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Port
|
||||||
|
{
|
||||||
|
get { return _port; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Hostname
|
||||||
|
{
|
||||||
|
get { return _hostname; }
|
||||||
|
}
|
||||||
|
|
||||||
public void Initialize(string hostname, int port)
|
public void Initialize(string hostname, int port)
|
||||||
{
|
{
|
||||||
this._port = port;
|
this._port = port;
|
44
Aurora/Services/SettingsService.cs
Normal file
44
Aurora/Services/SettingsService.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
using Plugin.Settings;
|
||||||
|
using Plugin.Settings.Abstractions;
|
||||||
|
|
||||||
|
namespace Aurora.Services
|
||||||
|
{
|
||||||
|
public class SettingsService : BaseService<SettingsService>
|
||||||
|
{
|
||||||
|
private Lazy<ISettings> _appSettings;
|
||||||
|
|
||||||
|
public SettingsService()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ISettings AppSettings
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_appSettings == null)
|
||||||
|
{
|
||||||
|
_appSettings = new Lazy<ISettings>(() => CrossSettings.Current, LazyThreadSafetyMode.PublicationOnly);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _appSettings.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_appSettings = new Lazy<ISettings>(() => value, LazyThreadSafetyMode.PublicationOnly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string _usernameKey = "username";
|
||||||
|
|
||||||
|
public string Username
|
||||||
|
{
|
||||||
|
get { return AppSettings.GetValueOrDefault(_usernameKey, ""); }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
AppSettings.AddOrUpdateValue(_usernameKey, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Aurora.Backend.Utils
|
namespace Aurora.Utils
|
||||||
{
|
{
|
||||||
public class FileSystemUtils
|
public class FileSystemUtils
|
||||||
{
|
{
|
Loading…
Reference in New Issue
Block a user