diff --git a/Aurora.gtk/Helpers/Settings.cs b/Aurora.gtk/Helpers/Settings.cs new file mode 100644 index 0000000..301f469 --- /dev/null +++ b/Aurora.gtk/Helpers/Settings.cs @@ -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 +{ + /// + /// 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. + /// + 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); + } + } + + } +}*/ \ No newline at end of file diff --git a/Aurora/App.xaml b/Aurora/App.xaml index f452747..f995cb5 100644 --- a/Aurora/App.xaml +++ b/Aurora/App.xaml @@ -1,26 +1,29 @@ - + - - - - #FFFFFF - #000000 - - - #F5C210 - #151C25 - #1E2634 - #151C25 - #44545C - - - - - + + #FFFFFF + #000000 + #F5C210 + #151C25 + #1E2634 + #151C25 + #44545C + + \ No newline at end of file diff --git a/Aurora/App.xaml.cs b/Aurora/App.xaml.cs index 2faa215..cc5f24c 100644 --- a/Aurora/App.xaml.cs +++ b/Aurora/App.xaml.cs @@ -1,5 +1,5 @@ using System; -using Aurora.Frontend.Views.Main; +using Aurora.Design.Views.Main; using LibVLCSharp.Shared; using Xamarin.Forms; using Xamarin.Forms.Xaml; diff --git a/Aurora/Aurora.csproj b/Aurora/Aurora.csproj index d81916a..a6be19b 100644 --- a/Aurora/Aurora.csproj +++ b/Aurora/Aurora.csproj @@ -1,52 +1,97 @@ - + netstandard2.0 true - + pdbonly true - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + Player.xaml - - - + + + \ No newline at end of file diff --git a/Aurora/Backend/Services/SettingsService.cs b/Aurora/Backend/Services/SettingsService.cs deleted file mode 100644 index ba2e2bc..0000000 --- a/Aurora/Backend/Services/SettingsService.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Xamarin.Forms; - -namespace Aurora.Backend.Services -{ - public class SettingsService : BaseService - { - 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); - } - } - } -} \ No newline at end of file diff --git a/Aurora/Frontend/Behaviors/BehaviorBase.cs b/Aurora/Design/Behaviors/BehaviorBase.cs similarity index 96% rename from Aurora/Frontend/Behaviors/BehaviorBase.cs rename to Aurora/Design/Behaviors/BehaviorBase.cs index b353a54..70993eb 100644 --- a/Aurora/Frontend/Behaviors/BehaviorBase.cs +++ b/Aurora/Design/Behaviors/BehaviorBase.cs @@ -1,7 +1,7 @@ using System; using Xamarin.Forms; -namespace Aurora.Frontend.Behaviors +namespace Aurora.Design.Behaviors { public class BehaviorBase : Behavior where T : BindableObject { diff --git a/Aurora/Frontend/Behaviors/EventToCommandBehavior.cs b/Aurora/Design/Behaviors/EventToCommandBehavior.cs similarity index 99% rename from Aurora/Frontend/Behaviors/EventToCommandBehavior.cs rename to Aurora/Design/Behaviors/EventToCommandBehavior.cs index 329be79..b8c111a 100644 --- a/Aurora/Frontend/Behaviors/EventToCommandBehavior.cs +++ b/Aurora/Design/Behaviors/EventToCommandBehavior.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Windows.Input; using Xamarin.Forms; -namespace Aurora.Frontend.Behaviors +namespace Aurora.Design.Behaviors { public class EventToCommandBehavior : BehaviorBase { diff --git a/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs b/Aurora/Design/Components/HorizontalList/HorizontalList.cs similarity index 99% rename from Aurora/Frontend/Components/HorizontalList/HorizontalList.cs rename to Aurora/Design/Components/HorizontalList/HorizontalList.cs index 446718f..75e9577 100755 --- a/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs +++ b/Aurora/Design/Components/HorizontalList/HorizontalList.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Windows.Input; using Xamarin.Forms; -namespace Aurora.Frontend.Components.HorizontalList +namespace Aurora.Design.Components.HorizontalList { public class HorizontalList : Grid { diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml b/Aurora/Design/Components/HostSelector/HostSelector.xaml similarity index 94% rename from Aurora/Frontend/Components/HostSelector/HostSelector.xaml rename to Aurora/Design/Components/HostSelector/HostSelector.xaml index d3095ba..b1c70b6 100644 --- a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml +++ b/Aurora/Design/Components/HostSelector/HostSelector.xaml @@ -2,7 +2,7 @@ + x:Class="Aurora.Design.Components.HostSelector.HostSelector"> diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs b/Aurora/Design/Components/HostSelector/HostSelector.xaml.cs similarity index 98% rename from Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs rename to Aurora/Design/Components/HostSelector/HostSelector.xaml.cs index da725b2..3f00af5 100644 --- a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs +++ b/Aurora/Design/Components/HostSelector/HostSelector.xaml.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Components.HostSelector +namespace Aurora.Design.Components.HostSelector { public enum ConnectionType { diff --git a/Aurora/Frontend/Components/MediaPlayer/Player.xaml b/Aurora/Design/Components/MediaPlayer/Player.xaml similarity index 95% rename from Aurora/Frontend/Components/MediaPlayer/Player.xaml rename to Aurora/Design/Components/MediaPlayer/Player.xaml index 1d6a20f..3adaf56 100644 --- a/Aurora/Frontend/Components/MediaPlayer/Player.xaml +++ b/Aurora/Design/Components/MediaPlayer/Player.xaml @@ -2,7 +2,7 @@ + x:Class="Aurora.Design.Components.MediaPlayer.Player"> diff --git a/Aurora/Frontend/Components/MediaPlayer/Player.xaml.cs b/Aurora/Design/Components/MediaPlayer/Player.xaml.cs similarity index 84% rename from Aurora/Frontend/Components/MediaPlayer/Player.xaml.cs rename to Aurora/Design/Components/MediaPlayer/Player.xaml.cs index aa70bdf..66aa244 100644 --- a/Aurora/Frontend/Components/MediaPlayer/Player.xaml.cs +++ b/Aurora/Design/Components/MediaPlayer/Player.xaml.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Components.MediaPlayer +namespace Aurora.Design.Components.MediaPlayer { public partial class Player : ContentView { diff --git a/Aurora/Frontend/Components/MediaPlayer/PlayerViewModel.cs b/Aurora/Design/Components/MediaPlayer/PlayerViewModel.cs similarity index 96% rename from Aurora/Frontend/Components/MediaPlayer/PlayerViewModel.cs rename to Aurora/Design/Components/MediaPlayer/PlayerViewModel.cs index 0e64edb..1232c5e 100644 --- a/Aurora/Frontend/Components/MediaPlayer/PlayerViewModel.cs +++ b/Aurora/Design/Components/MediaPlayer/PlayerViewModel.cs @@ -1,10 +1,10 @@ using System; using Xamarin.Forms; -using Aurora.Frontend.Views; -using Aurora.Backend.Services.PlayerService; -using Aurora.Backend.Models.Media; +using Aurora.Design.Views; +using Aurora.Services.PlayerService; +using Aurora.Models.Media; -namespace Aurora.Frontend.Components.MediaPlayer +namespace Aurora.Design.Components.MediaPlayer { public class PlayerViewModel : BaseViewModel { diff --git a/Aurora/Frontend/Components/MemberList/MemberList.xaml b/Aurora/Design/Components/MemberList/MemberList.xaml similarity index 85% rename from Aurora/Frontend/Components/MemberList/MemberList.xaml rename to Aurora/Design/Components/MemberList/MemberList.xaml index f6fcc1b..07f37f1 100644 --- a/Aurora/Frontend/Components/MemberList/MemberList.xaml +++ b/Aurora/Design/Components/MemberList/MemberList.xaml @@ -2,8 +2,8 @@ + xmlns:hl="clr-namespace:Aurora.Design.Components.HorizontalList" + x:Class="Aurora.Design.Components.MemberList.MemberList"> { diff --git a/Aurora/Frontend/Components/NavigationMenu/NavigationItem.cs b/Aurora/Design/Components/NavigationMenu/NavigationItem.cs similarity index 81% rename from Aurora/Frontend/Components/NavigationMenu/NavigationItem.cs rename to Aurora/Design/Components/NavigationMenu/NavigationItem.cs index c7107ed..f2101c1 100644 --- a/Aurora/Frontend/Components/NavigationMenu/NavigationItem.cs +++ b/Aurora/Design/Components/NavigationMenu/NavigationItem.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; 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 { diff --git a/Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml b/Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml new file mode 100644 index 0000000..99798d5 --- /dev/null +++ b/Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs b/Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml.cs similarity index 98% rename from Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs rename to Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml.cs index 150d282..eb950a0 100644 --- a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs +++ b/Aurora/Design/Components/NavigationMenu/NavigationMenu.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using Xamarin.Forms; -namespace Aurora.Frontend.Components.NavigationMenu +namespace Aurora.Design.Components.NavigationMenu { public partial class NavigationMenu : ContentPage { diff --git a/Aurora/Frontend/Components/Queue/Queue.xaml b/Aurora/Design/Components/Queue/Queue.xaml similarity index 97% rename from Aurora/Frontend/Components/Queue/Queue.xaml rename to Aurora/Design/Components/Queue/Queue.xaml index 54aefdb..0849ed7 100644 --- a/Aurora/Frontend/Components/Queue/Queue.xaml +++ b/Aurora/Design/Components/Queue/Queue.xaml @@ -3,7 +3,7 @@ xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 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"> + x:Class="Aurora.Design.Views.Albums.AlbumsView"> diff --git a/Aurora/Frontend/Views/Albums/AlbumsView.xaml.cs b/Aurora/Design/Views/Albums/AlbumsView.xaml.cs similarity index 85% rename from Aurora/Frontend/Views/Albums/AlbumsView.xaml.cs rename to Aurora/Design/Views/Albums/AlbumsView.xaml.cs index c94ed87..5463a48 100644 --- a/Aurora/Frontend/Views/Albums/AlbumsView.xaml.cs +++ b/Aurora/Design/Views/Albums/AlbumsView.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Albums +namespace Aurora.Design.Views.Albums { public partial class AlbumsView : ContentView { diff --git a/Aurora/Frontend/Views/Albums/AlbumsViewModel.cs b/Aurora/Design/Views/Albums/AlbumsViewModel.cs similarity index 75% rename from Aurora/Frontend/Views/Albums/AlbumsViewModel.cs rename to Aurora/Design/Views/Albums/AlbumsViewModel.cs index b301c62..9c50673 100644 --- a/Aurora/Frontend/Views/Albums/AlbumsViewModel.cs +++ b/Aurora/Design/Views/Albums/AlbumsViewModel.cs @@ -1,5 +1,5 @@ using System; -namespace Aurora.Frontend.Views.Albums +namespace Aurora.Design.Views.Albums { public class AlbumsViewModel { diff --git a/Aurora/Design/Views/Artists/ArtistsView.xaml b/Aurora/Design/Views/Artists/ArtistsView.xaml new file mode 100644 index 0000000..4ab6661 --- /dev/null +++ b/Aurora/Design/Views/Artists/ArtistsView.xaml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/Aurora/Frontend/Views/Artists/ArtistsView.xaml.cs b/Aurora/Design/Views/Artists/ArtistsView.xaml.cs similarity index 84% rename from Aurora/Frontend/Views/Artists/ArtistsView.xaml.cs rename to Aurora/Design/Views/Artists/ArtistsView.xaml.cs index 93d2bc3..d6ee899 100644 --- a/Aurora/Frontend/Views/Artists/ArtistsView.xaml.cs +++ b/Aurora/Design/Views/Artists/ArtistsView.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Artists +namespace Aurora.Design.Views.Artists { public partial class ArtistsView : ContentView { diff --git a/Aurora/Frontend/Views/Artists/ArtistsViewModel.cs b/Aurora/Design/Views/Artists/ArtistsViewModel.cs similarity index 75% rename from Aurora/Frontend/Views/Artists/ArtistsViewModel.cs rename to Aurora/Design/Views/Artists/ArtistsViewModel.cs index c8455e0..e01cdd6 100644 --- a/Aurora/Frontend/Views/Artists/ArtistsViewModel.cs +++ b/Aurora/Design/Views/Artists/ArtistsViewModel.cs @@ -1,5 +1,5 @@ using System; -namespace Aurora.Frontend.Views.Artists +namespace Aurora.Design.Views.Artists { public class ArtistsViewModel { diff --git a/Aurora/Frontend/Views/BaseViewModel.cs b/Aurora/Design/Views/BaseViewModel.cs similarity index 96% rename from Aurora/Frontend/Views/BaseViewModel.cs rename to Aurora/Design/Views/BaseViewModel.cs index f30f12d..8de444d 100644 --- a/Aurora/Frontend/Views/BaseViewModel.cs +++ b/Aurora/Design/Views/BaseViewModel.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; -namespace Aurora.Frontend.Views +namespace Aurora.Design.Views { public class BaseViewModel : INotifyPropertyChanged { diff --git a/Aurora/Design/Views/MainView/MainView.xaml b/Aurora/Design/Views/MainView/MainView.xaml new file mode 100644 index 0000000..3e88e21 --- /dev/null +++ b/Aurora/Design/Views/MainView/MainView.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Aurora/Frontend/Views/MainView/MainView.xaml.cs b/Aurora/Design/Views/MainView/MainView.xaml.cs similarity index 93% rename from Aurora/Frontend/Views/MainView/MainView.xaml.cs rename to Aurora/Design/Views/MainView/MainView.xaml.cs index e476054..d05174d 100644 --- a/Aurora/Frontend/Views/MainView/MainView.xaml.cs +++ b/Aurora/Design/Views/MainView/MainView.xaml.cs @@ -1,12 +1,12 @@ using System; using System.Collections.ObjectModel; using System.Linq; -using Aurora.Frontend.Components.NavigationMenu; -using Aurora.Frontend.Views.MainView; +using Aurora.Design.Components.NavigationMenu; +using Aurora.Design.Views.MainView; using Xamarin.Forms; using Xamarin.Forms.Xaml; -namespace Aurora.Frontend.Views.Main +namespace Aurora.Design.Views.Main { [XamlCompilation(XamlCompilationOptions.Compile)] public partial class MainView : MasterDetailPage diff --git a/Aurora/Frontend/Views/MainView/MainViewModel.cs b/Aurora/Design/Views/MainView/MainViewModel.cs similarity index 81% rename from Aurora/Frontend/Views/MainView/MainViewModel.cs rename to Aurora/Design/Views/MainView/MainViewModel.cs index 04dafec..ab57e18 100644 --- a/Aurora/Frontend/Views/MainView/MainViewModel.cs +++ b/Aurora/Design/Views/MainView/MainViewModel.cs @@ -2,15 +2,15 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Runtime.CompilerServices; -using Aurora.Frontend.Components.NavigationMenu; -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; -using Aurora.Frontend.Views.Profile; +using Aurora.Design.Components.NavigationMenu; +using Aurora.Design.Views.Albums; +using Aurora.Design.Views.Artists; +using Aurora.Design.Views.Songs; +using Aurora.Design.Views.Stations; +using Aurora.Design.Views.Party; +using Aurora.Design.Views.Profile; -namespace Aurora.Frontend.Views.MainView +namespace Aurora.Design.Views.MainView { public class MainViewModel : BaseViewModel { diff --git a/Aurora/Frontend/Views/MainView/PageContainer.xaml b/Aurora/Design/Views/MainView/PageContainer.xaml similarity index 79% rename from Aurora/Frontend/Views/MainView/PageContainer.xaml rename to Aurora/Design/Views/MainView/PageContainer.xaml index 79ad17e..7b17e87 100644 --- a/Aurora/Frontend/Views/MainView/PageContainer.xaml +++ b/Aurora/Design/Views/MainView/PageContainer.xaml @@ -2,9 +2,9 @@ + xmlns:components="clr-namespace:Aurora.Design.Components" + xmlns:mp="clr-namespace:Aurora.Design.Components.MediaPlayer" + x:Class="Aurora.Design.Views.MainView.PageContainer"> diff --git a/Aurora/Frontend/Views/MainView/PageContainer.xaml.cs b/Aurora/Design/Views/MainView/PageContainer.xaml.cs similarity index 84% rename from Aurora/Frontend/Views/MainView/PageContainer.xaml.cs rename to Aurora/Design/Views/MainView/PageContainer.xaml.cs index 735a905..f810e60 100644 --- a/Aurora/Frontend/Views/MainView/PageContainer.xaml.cs +++ b/Aurora/Design/Views/MainView/PageContainer.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Views.MainView +namespace Aurora.Design.Views.MainView { public partial class PageContainer : ContentPage { diff --git a/Aurora/Frontend/Views/Party/PartyView.xaml b/Aurora/Design/Views/Party/PartyView.xaml similarity index 73% rename from Aurora/Frontend/Views/Party/PartyView.xaml rename to Aurora/Design/Views/Party/PartyView.xaml index 3e45bb0..18fb33f 100644 --- a/Aurora/Frontend/Views/Party/PartyView.xaml +++ b/Aurora/Design/Views/Party/PartyView.xaml @@ -2,14 +2,15 @@ + xmlns:hs="clr-namespace:Aurora.Design.Components.HostSelector" + xmlns:ml="clr-namespace:Aurora.Design.Components.MemberList" + xmlns:qu="clr-namespace:Aurora.Design.Components.Queue" + x:Class="Aurora.Design.Views.Party.PartyView"> - + - \ No newline at end of file diff --git a/Aurora/Frontend/Views/Party/PartyView.xaml.cs b/Aurora/Design/Views/Party/PartyView.xaml.cs similarity index 86% rename from Aurora/Frontend/Views/Party/PartyView.xaml.cs rename to Aurora/Design/Views/Party/PartyView.xaml.cs index e70e103..4e044fe 100644 --- a/Aurora/Frontend/Views/Party/PartyView.xaml.cs +++ b/Aurora/Design/Views/Party/PartyView.xaml.cs @@ -1,7 +1,7 @@ using System; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Party +namespace Aurora.Design.Views.Party { public partial class PartyView : ContentView { diff --git a/Aurora/Frontend/Views/Party/PartyViewModel.cs b/Aurora/Design/Views/Party/PartyViewModel.cs similarity index 95% rename from Aurora/Frontend/Views/Party/PartyViewModel.cs rename to Aurora/Design/Views/Party/PartyViewModel.cs index fe823dc..d7a8617 100644 --- a/Aurora/Frontend/Views/Party/PartyViewModel.cs +++ b/Aurora/Design/Views/Party/PartyViewModel.cs @@ -1,11 +1,11 @@ using System; using System.Collections.ObjectModel; -using Aurora.Backend.Executors; -using Aurora.Frontend.Components.HostSelector; -using Aurora.Backend.Services; +using Aurora.Executors; +using Aurora.Design.Components.HostSelector; +using Aurora.Services; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Party +namespace Aurora.Design.Views.Party { enum PartyState { diff --git a/Aurora/Design/Views/Profile/ProfileView.xaml b/Aurora/Design/Views/Profile/ProfileView.xaml new file mode 100644 index 0000000..0225551 --- /dev/null +++ b/Aurora/Design/Views/Profile/ProfileView.xaml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/Aurora/Frontend/Views/Profile/ProfileView.xaml.cs b/Aurora/Design/Views/Profile/ProfileView.xaml.cs similarity index 87% rename from Aurora/Frontend/Views/Profile/ProfileView.xaml.cs rename to Aurora/Design/Views/Profile/ProfileView.xaml.cs index 925c1fa..b4d8ba2 100644 --- a/Aurora/Frontend/Views/Profile/ProfileView.xaml.cs +++ b/Aurora/Design/Views/Profile/ProfileView.xaml.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Profile +namespace Aurora.Design.Views.Profile { public partial class ProfileView : ContentView { diff --git a/Aurora/Design/Views/Profile/ProfileViewModel.cs b/Aurora/Design/Views/Profile/ProfileViewModel.cs new file mode 100644 index 0000000..14387a7 --- /dev/null +++ b/Aurora/Design/Views/Profile/ProfileViewModel.cs @@ -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"); + } + } + } +} diff --git a/Aurora/Frontend/Views/Songs/SongsView.xaml b/Aurora/Design/Views/Songs/SongsView.xaml similarity index 95% rename from Aurora/Frontend/Views/Songs/SongsView.xaml rename to Aurora/Design/Views/Songs/SongsView.xaml index 8b827a5..7f3a9a3 100644 --- a/Aurora/Frontend/Views/Songs/SongsView.xaml +++ b/Aurora/Design/Views/Songs/SongsView.xaml @@ -2,9 +2,9 @@ + x:Class="Aurora.Design.Views.Songs.SongsView"> diff --git a/Aurora/Frontend/Views/Songs/SongsView.xaml.cs b/Aurora/Design/Views/Songs/SongsView.xaml.cs similarity index 85% rename from Aurora/Frontend/Views/Songs/SongsView.xaml.cs rename to Aurora/Design/Views/Songs/SongsView.xaml.cs index 973fe5a..5982e5b 100644 --- a/Aurora/Frontend/Views/Songs/SongsView.xaml.cs +++ b/Aurora/Design/Views/Songs/SongsView.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Songs +namespace Aurora.Design.Views.Songs { public partial class SongsView : ContentView { diff --git a/Aurora/Frontend/Views/Songs/SongsViewModel.cs b/Aurora/Design/Views/Songs/SongsViewModel.cs similarity index 89% rename from Aurora/Frontend/Views/Songs/SongsViewModel.cs rename to Aurora/Design/Views/Songs/SongsViewModel.cs index f7b4028..0d5e4dc 100644 --- a/Aurora/Frontend/Views/Songs/SongsViewModel.cs +++ b/Aurora/Design/Views/Songs/SongsViewModel.cs @@ -1,10 +1,10 @@ using System.Collections.ObjectModel; -using Aurora.Backend.Models.Media; -using Aurora.Backend.Services; -using Aurora.Backend.Services.PlayerService; +using Aurora.Models.Media; +using Aurora.Services; +using Aurora.Services.PlayerService; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Songs +namespace Aurora.Design.Views.Songs { public class SongsViewModel : BaseViewModel { diff --git a/Aurora/Design/Views/Stations/StationsViewModel.xaml b/Aurora/Design/Views/Stations/StationsViewModel.xaml new file mode 100644 index 0000000..24c901f --- /dev/null +++ b/Aurora/Design/Views/Stations/StationsViewModel.xaml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/Aurora/Frontend/Views/Stations/StationsViewModel.xaml.cs b/Aurora/Design/Views/Stations/StationsViewModel.xaml.cs similarity index 84% rename from Aurora/Frontend/Views/Stations/StationsViewModel.xaml.cs rename to Aurora/Design/Views/Stations/StationsViewModel.xaml.cs index 8827397..c4accc1 100644 --- a/Aurora/Frontend/Views/Stations/StationsViewModel.xaml.cs +++ b/Aurora/Design/Views/Stations/StationsViewModel.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Xamarin.Forms; -namespace Aurora.Frontend.Views.Stations +namespace Aurora.Design.Views.Stations { public partial class StationsView : ContentView { diff --git a/Aurora/Frontend/Views/Stations/StatiosnViewModel.cs b/Aurora/Design/Views/Stations/StatiosnViewModel.cs similarity index 75% rename from Aurora/Frontend/Views/Stations/StatiosnViewModel.cs rename to Aurora/Design/Views/Stations/StatiosnViewModel.cs index 18b7392..27dd73b 100644 --- a/Aurora/Frontend/Views/Stations/StatiosnViewModel.cs +++ b/Aurora/Design/Views/Stations/StatiosnViewModel.cs @@ -1,5 +1,5 @@ using System; -namespace Aurora.Frontend.Views.Stations +namespace Aurora.Design.Views.Stations { public class StationsViewModel { diff --git a/Aurora/Backend/Executors/BaseExecutor.cs b/Aurora/Executors/BaseExecutor.cs similarity index 97% rename from Aurora/Backend/Executors/BaseExecutor.cs rename to Aurora/Executors/BaseExecutor.cs index 05fa4d4..78f4340 100644 --- a/Aurora/Backend/Executors/BaseExecutor.cs +++ b/Aurora/Executors/BaseExecutor.cs @@ -2,7 +2,7 @@ using System; using System.Reflection; using System.Linq; -namespace Aurora.Backend.Executors +namespace Aurora.Executors { public abstract class BaseExecutor { diff --git a/Aurora/Backend/Executors/ClientExecutor.cs b/Aurora/Executors/ClientExecutor.cs similarity index 93% rename from Aurora/Backend/Executors/ClientExecutor.cs rename to Aurora/Executors/ClientExecutor.cs index 1583c65..8797e21 100644 --- a/Aurora/Backend/Executors/ClientExecutor.cs +++ b/Aurora/Executors/ClientExecutor.cs @@ -1,7 +1,7 @@ using System; -using Aurora.Backend.Executors; +using Aurora.Executors; -namespace Aurora.Backend.Executors +namespace Aurora.Executors { public class ClientExecutor : BaseExecutor { diff --git a/Aurora/Backend/Executors/HostExecutor.cs b/Aurora/Executors/HostExecutor.cs similarity index 87% rename from Aurora/Backend/Executors/HostExecutor.cs rename to Aurora/Executors/HostExecutor.cs index c55ba56..d3b3cd1 100644 --- a/Aurora/Backend/Executors/HostExecutor.cs +++ b/Aurora/Executors/HostExecutor.cs @@ -1,11 +1,11 @@ using System; using System.Threading.Tasks; -using Aurora.Backend.Executors; -using Aurora.Backend.Services; -using Aurora.Backend.Proto; -using Aurora.Backend.RemoteImpl; +using Aurora.Executors; +using Aurora.Services; +using Aurora.Proto; +using Aurora.RemoteImpl; -namespace Aurora.Backend.Executors +namespace Aurora.Executors { public class HostExecutor : BaseExecutor { @@ -14,7 +14,7 @@ namespace Aurora.Backend.Executors public HostExecutor() { _remoteServiceImpl = new RemotePartyServiceImpl(); - + _remotePlaybackImpl = new RemotePlaybackServiceImpl(); } public override void Initialize() diff --git a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml b/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml deleted file mode 100644 index f247cfa..0000000 --- a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Aurora/Frontend/Views/Artists/ArtistsView.xaml b/Aurora/Frontend/Views/Artists/ArtistsView.xaml deleted file mode 100644 index ec87834..0000000 --- a/Aurora/Frontend/Views/Artists/ArtistsView.xaml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/Aurora/Frontend/Views/MainView/MainView.xaml b/Aurora/Frontend/Views/MainView/MainView.xaml deleted file mode 100644 index a91b75e..0000000 --- a/Aurora/Frontend/Views/MainView/MainView.xaml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Aurora/Frontend/Views/Profile/ProfileView.xaml b/Aurora/Frontend/Views/Profile/ProfileView.xaml deleted file mode 100644 index 7a1a6be..0000000 --- a/Aurora/Frontend/Views/Profile/ProfileView.xaml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/Aurora/Frontend/Views/Profile/ProfileViewModel.cs b/Aurora/Frontend/Views/Profile/ProfileViewModel.cs deleted file mode 100644 index 3db90d9..0000000 --- a/Aurora/Frontend/Views/Profile/ProfileViewModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -namespace Aurora.Frontend.Views.Profile -{ - public class ProfileViewModel - { - public ProfileViewModel() - { - } - } -} diff --git a/Aurora/Frontend/Views/Stations/StationsViewModel.xaml b/Aurora/Frontend/Views/Stations/StationsViewModel.xaml deleted file mode 100644 index 8909877..0000000 --- a/Aurora/Frontend/Views/Stations/StationsViewModel.xaml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Aurora/Backend/Models/Media/AudioMetadata.cs b/Aurora/Models/Media/AudioMetadata.cs similarity index 95% rename from Aurora/Backend/Models/Media/AudioMetadata.cs rename to Aurora/Models/Media/AudioMetadata.cs index 6410c0c..0a415b0 100644 --- a/Aurora/Backend/Models/Media/AudioMetadata.cs +++ b/Aurora/Models/Media/AudioMetadata.cs @@ -1,6 +1,6 @@ using System; -namespace Aurora.Backend.Models.Media +namespace Aurora.Models.Media { public class AudioMetadata : BaseMetadata { diff --git a/Aurora/Backend/Models/Media/BaseMedia.cs b/Aurora/Models/Media/BaseMedia.cs similarity index 96% rename from Aurora/Backend/Models/Media/BaseMedia.cs rename to Aurora/Models/Media/BaseMedia.cs index a33b26c..4527a79 100644 --- a/Aurora/Backend/Models/Media/BaseMedia.cs +++ b/Aurora/Models/Media/BaseMedia.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Aurora.Backend.Models.Media +namespace Aurora.Models.Media { public abstract class BaseMedia { diff --git a/Aurora/Backend/Models/Media/BaseMetadata.cs b/Aurora/Models/Media/BaseMetadata.cs similarity index 87% rename from Aurora/Backend/Models/Media/BaseMetadata.cs rename to Aurora/Models/Media/BaseMetadata.cs index 328cb9b..be38fba 100644 --- a/Aurora/Backend/Models/Media/BaseMetadata.cs +++ b/Aurora/Models/Media/BaseMetadata.cs @@ -1,5 +1,5 @@ using System; -namespace Aurora.Backend.Models.Media +namespace Aurora.Models.Media { public class BaseMetadata { diff --git a/Aurora/Backend/Models/Media/LocalAudio.cs b/Aurora/Models/Media/LocalAudio.cs similarity index 97% rename from Aurora/Backend/Models/Media/LocalAudio.cs rename to Aurora/Models/Media/LocalAudio.cs index ed23b31..c96d8d4 100644 --- a/Aurora/Backend/Models/Media/LocalAudio.cs +++ b/Aurora/Models/Media/LocalAudio.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Aurora.Backend.Models.Media +namespace Aurora.Models.Media { public class LocalAudio : BaseMedia { diff --git a/Aurora/Backend/Models/Media/MediaTypeEnum.cs b/Aurora/Models/Media/MediaTypeEnum.cs similarity index 70% rename from Aurora/Backend/Models/Media/MediaTypeEnum.cs rename to Aurora/Models/Media/MediaTypeEnum.cs index 10cfc65..0083ec8 100644 --- a/Aurora/Backend/Models/Media/MediaTypeEnum.cs +++ b/Aurora/Models/Media/MediaTypeEnum.cs @@ -1,5 +1,5 @@ using System; -namespace Aurora.Backend.Models.Media +namespace Aurora.Models.Media { public enum MediaTypeEnum { diff --git a/Aurora/Backend/Models/PartyMember.cs b/Aurora/Models/PartyMember.cs similarity index 89% rename from Aurora/Backend/Models/PartyMember.cs rename to Aurora/Models/PartyMember.cs index 7769b5d..65e9556 100644 --- a/Aurora/Backend/Models/PartyMember.cs +++ b/Aurora/Models/PartyMember.cs @@ -1,6 +1,6 @@ using System; -namespace Aurora.Backend.Models +namespace Aurora.Models { public class PartyMember { diff --git a/Aurora/Backend/Proto/general.proto b/Aurora/Proto/general.proto similarity index 72% rename from Aurora/Backend/Proto/general.proto rename to Aurora/Proto/general.proto index 4ad5e7a..77b62ed 100644 --- a/Aurora/Backend/Proto/general.proto +++ b/Aurora/Proto/general.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package Aurora.Backend.Proto; +package Aurora.Proto; message Chunk { bytes Content = 1; diff --git a/Aurora/Backend/Proto/party.proto b/Aurora/Proto/party.proto similarity index 89% rename from Aurora/Backend/Proto/party.proto rename to Aurora/Proto/party.proto index 5017088..b3c32a8 100644 --- a/Aurora/Backend/Proto/party.proto +++ b/Aurora/Proto/party.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package Aurora.Backend.Proto; +package Aurora.Proto; -import "Backend/Proto/general.proto"; +import "Proto/general.proto"; service RemotePartyService { //Party Service diff --git a/Aurora/Backend/Proto/playback.proto b/Aurora/Proto/playback.proto similarity index 81% rename from Aurora/Backend/Proto/playback.proto rename to Aurora/Proto/playback.proto index d9741e7..22b741f 100644 --- a/Aurora/Backend/Proto/playback.proto +++ b/Aurora/Proto/playback.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package Aurora.Backend.Proto; +package Aurora.Proto; -import "Backend/Proto/general.proto"; +import "Proto/general.proto"; service RemotePlaybackService { //Playback Service diff --git a/Aurora/Backend/RemoteImpl/RemotePartyImpl.cs b/Aurora/RemoteImpl/RemotePartyImpl.cs similarity index 77% rename from Aurora/Backend/RemoteImpl/RemotePartyImpl.cs rename to Aurora/RemoteImpl/RemotePartyImpl.cs index 84fa5cf..5c98b7a 100644 --- a/Aurora/Backend/RemoteImpl/RemotePartyImpl.cs +++ b/Aurora/RemoteImpl/RemotePartyImpl.cs @@ -1,10 +1,11 @@ using System; using System.Threading.Tasks; using System.Collections.Generic; -using Aurora.Backend.Proto; -using Aurora.Backend.Models; +using Aurora.Proto; +using Aurora.Models; +using Aurora.Services; -namespace Aurora.Backend.RemoteImpl +namespace Aurora.RemoteImpl { public class RemotePartyServiceImpl : RemotePartyService.RemotePartyServiceBase { @@ -16,6 +17,15 @@ namespace Aurora.Backend.RemoteImpl public RemotePartyServiceImpl() { _partyMembers = new Dictionary(); + + //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 PartyMembers diff --git a/Aurora/Backend/RemoteImpl/RemotePlaybackImpl.cs b/Aurora/RemoteImpl/RemotePlaybackImpl.cs similarity index 90% rename from Aurora/Backend/RemoteImpl/RemotePlaybackImpl.cs rename to Aurora/RemoteImpl/RemotePlaybackImpl.cs index b91efe2..8470eb1 100644 --- a/Aurora/Backend/RemoteImpl/RemotePlaybackImpl.cs +++ b/Aurora/RemoteImpl/RemotePlaybackImpl.cs @@ -1,13 +1,19 @@ using System; using System.Threading.Tasks; using System.IO; -using Aurora.Backend.Proto; -using Aurora.Backend.Models; +using Aurora.Proto; +using Aurora.Models; -namespace Aurora.Backend.RemoteImpl +namespace Aurora.RemoteImpl { public class RemotePlaybackServiceImpl : RemotePlaybackService.RemotePlaybackServiceBase { + + public RemotePlaybackServiceImpl() + { + + } + public override async Task GetPartyStream(Empty empty, Grpc.Core.IServerStreamWriter responseStream, Grpc.Core.ServerCallContext context) diff --git a/Aurora/Backend/Services/BaseService.cs b/Aurora/Services/BaseService.cs similarity index 92% rename from Aurora/Backend/Services/BaseService.cs rename to Aurora/Services/BaseService.cs index c7523d8..db02456 100644 --- a/Aurora/Backend/Services/BaseService.cs +++ b/Aurora/Services/BaseService.cs @@ -1,6 +1,6 @@ using System; -namespace Aurora.Backend.Services +namespace Aurora.Services { public abstract class BaseService where T : class { diff --git a/Aurora/Backend/Services/LibraryService.cs b/Aurora/Services/LibraryService.cs similarity index 94% rename from Aurora/Backend/Services/LibraryService.cs rename to Aurora/Services/LibraryService.cs index 30a03eb..1771c82 100644 --- a/Aurora/Backend/Services/LibraryService.cs +++ b/Aurora/Services/LibraryService.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; -using Aurora.Backend.Models.Media; -using Aurora.Backend.Utils; +using Aurora.Models.Media; +using Aurora.Utils; -namespace Aurora.Backend.Services +namespace Aurora.Services { public class LibraryService : BaseService { diff --git a/Aurora/Backend/Services/PlayerService/MediaChangedEvent.cs b/Aurora/Services/PlayerService/MediaChangedEvent.cs similarity index 80% rename from Aurora/Backend/Services/PlayerService/MediaChangedEvent.cs rename to Aurora/Services/PlayerService/MediaChangedEvent.cs index d8dd542..868edf3 100644 --- a/Aurora/Backend/Services/PlayerService/MediaChangedEvent.cs +++ b/Aurora/Services/PlayerService/MediaChangedEvent.cs @@ -1,7 +1,7 @@ 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); diff --git a/Aurora/Backend/Services/PlayerService/PlaybackState.cs b/Aurora/Services/PlayerService/PlaybackState.cs similarity index 100% rename from Aurora/Backend/Services/PlayerService/PlaybackState.cs rename to Aurora/Services/PlayerService/PlaybackState.cs diff --git a/Aurora/Backend/Services/PlayerService/PlaybackStateChangedEvent.cs b/Aurora/Services/PlayerService/PlaybackStateChangedEvent.cs similarity index 85% rename from Aurora/Backend/Services/PlayerService/PlaybackStateChangedEvent.cs rename to Aurora/Services/PlayerService/PlaybackStateChangedEvent.cs index a498df6..2decee4 100644 --- a/Aurora/Backend/Services/PlayerService/PlaybackStateChangedEvent.cs +++ b/Aurora/Services/PlayerService/PlaybackStateChangedEvent.cs @@ -1,7 +1,7 @@ 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); diff --git a/Aurora/Backend/Services/PlayerService/PlayerService.cs b/Aurora/Services/PlayerService/PlayerService.cs similarity index 97% rename from Aurora/Backend/Services/PlayerService/PlayerService.cs rename to Aurora/Services/PlayerService/PlayerService.cs index d163871..61501dc 100644 --- a/Aurora/Backend/Services/PlayerService/PlayerService.cs +++ b/Aurora/Services/PlayerService/PlayerService.cs @@ -1,8 +1,8 @@ using System; -using Aurora.Backend.Models.Media; +using Aurora.Models.Media; using LibVLCSharp.Shared; -namespace Aurora.Backend.Services.PlayerService +namespace Aurora.Services.PlayerService { public class PlayerService : BaseService { diff --git a/Aurora/Backend/Services/ServerService.cs b/Aurora/Services/ServerService.cs similarity index 89% rename from Aurora/Backend/Services/ServerService.cs rename to Aurora/Services/ServerService.cs index 9d5a02c..9eb27c4 100644 --- a/Aurora/Backend/Services/ServerService.cs +++ b/Aurora/Services/ServerService.cs @@ -1,9 +1,9 @@ using System; using System.Threading.Tasks; using Grpc.Core; -using Aurora.Backend.Proto; +using Aurora.Proto; -namespace Aurora.Backend.Services +namespace Aurora.Services { public class ServerService : BaseService { @@ -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) { this._port = port; diff --git a/Aurora/Services/SettingsService.cs b/Aurora/Services/SettingsService.cs new file mode 100644 index 0000000..6efe793 --- /dev/null +++ b/Aurora/Services/SettingsService.cs @@ -0,0 +1,44 @@ +using System; +using System.Threading; +using Plugin.Settings; +using Plugin.Settings.Abstractions; + +namespace Aurora.Services +{ + public class SettingsService : BaseService + { + private Lazy _appSettings; + + public SettingsService() + { + } + + public ISettings AppSettings + { + get + { + if (_appSettings == null) + { + _appSettings = new Lazy(() => CrossSettings.Current, LazyThreadSafetyMode.PublicationOnly); + } + + return _appSettings.Value; + } + set + { + _appSettings = new Lazy(() => value, LazyThreadSafetyMode.PublicationOnly); + } + } + + private string _usernameKey = "username"; + + public string Username + { + get { return AppSettings.GetValueOrDefault(_usernameKey, ""); } + set + { + AppSettings.AddOrUpdateValue(_usernameKey, value); + } + } + } +} \ No newline at end of file diff --git a/Aurora/Backend/Utils/FileSystemUtils.cs b/Aurora/Utils/FileSystemUtils.cs similarity index 98% rename from Aurora/Backend/Utils/FileSystemUtils.cs rename to Aurora/Utils/FileSystemUtils.cs index 6049256..3828f90 100644 --- a/Aurora/Backend/Utils/FileSystemUtils.cs +++ b/Aurora/Utils/FileSystemUtils.cs @@ -5,7 +5,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -namespace Aurora.Backend.Utils +namespace Aurora.Utils { public class FileSystemUtils {