From 0cb05467411052f3f03d86051d670d9d2e05fbaa Mon Sep 17 00:00:00 2001 From: watsonb8 Date: Tue, 25 Jun 2019 21:17:52 -0400 Subject: [PATCH] Progress --- .../Client/Party/ClientPartyExecutor.cs | 25 ---- Aurora/Backend/Executors/BaseExecutor.cs | 10 +- Aurora/Backend/Executors/BasePartyExecutor.cs | 11 +- .../Backend/Server/Party/HostPartyExecutor.cs | 25 ---- .../Components/HostSelector/HostSelector.xaml | 46 ++++-- .../HostSelector/HostSelector.xaml.cs | 138 ++++++++++++++++++ Aurora/Frontend/Components/Queue/Queue.xaml | 2 +- Aurora/Frontend/Views/Party/PartyView.xaml | 27 ++-- Aurora/Frontend/Views/Party/PartyView.xaml.cs | 1 - Aurora/Frontend/Views/Party/PartyViewModel.cs | 87 +++++++++++ 10 files changed, 283 insertions(+), 89 deletions(-) diff --git a/Aurora/Backend/Client/Party/ClientPartyExecutor.cs b/Aurora/Backend/Client/Party/ClientPartyExecutor.cs index f7c2800..f7c0669 100644 --- a/Aurora/Backend/Client/Party/ClientPartyExecutor.cs +++ b/Aurora/Backend/Client/Party/ClientPartyExecutor.cs @@ -35,26 +35,6 @@ namespace Aurora.Backend.Client.Party throw new NotImplementedException(); } - public override void Next() - { - throw new NotImplementedException(); - } - - public override void Pause() - { - throw new NotImplementedException(); - } - - public override void Play() - { - throw new NotImplementedException(); - } - - public override void Previous() - { - throw new NotImplementedException(); - } - public override void RemoveFromQueue() { throw new NotImplementedException(); @@ -64,10 +44,5 @@ namespace Aurora.Backend.Client.Party { throw new NotImplementedException(); } - - public override void Stop() - { - throw new NotImplementedException(); - } } } \ No newline at end of file diff --git a/Aurora/Backend/Executors/BaseExecutor.cs b/Aurora/Backend/Executors/BaseExecutor.cs index dd09168..30ede3c 100644 --- a/Aurora/Backend/Executors/BaseExecutor.cs +++ b/Aurora/Backend/Executors/BaseExecutor.cs @@ -10,6 +10,8 @@ namespace Aurora.Backend.Executors { } + public ExecutorType ExecutorType { get; protected set; } + public static BaseExecutor CreateExecutor(ExecutorType executorType) where T : BaseExecutor { MethodInfo method = typeof(T).GetMethod("Create"); @@ -19,14 +21,6 @@ namespace Aurora.Backend.Executors } return method.Invoke(null, new object[] { executorType }) as BaseExecutor; - - // var types = typeof(T).Assembly.GetTypes(); - - // foreach (Type type in types) - // { - // MethodInfo genericMethod = method.MakeGenericMethod(type); - // genericMethod.Invoke(null, null); // No target, no arguments - // } } } diff --git a/Aurora/Backend/Executors/BasePartyExecutor.cs b/Aurora/Backend/Executors/BasePartyExecutor.cs index 0889194..1c26b16 100644 --- a/Aurora/Backend/Executors/BasePartyExecutor.cs +++ b/Aurora/Backend/Executors/BasePartyExecutor.cs @@ -19,11 +19,13 @@ namespace Aurora.Backend.Executors case ExecutorType.Client: { executor = new ClientPartyExecutor(); + executor.ExecutorType = type; break; } case ExecutorType.Server: { executor = new HostPartyExecutor(); + executor.ExecutorType = type; break; } } @@ -45,14 +47,5 @@ namespace Aurora.Backend.Executors public abstract void RemoveFromQueue(); - public abstract void Play(); - - public abstract void Pause(); - - public abstract void Stop(); - - public abstract void Next(); - - public abstract void Previous(); } } \ No newline at end of file diff --git a/Aurora/Backend/Server/Party/HostPartyExecutor.cs b/Aurora/Backend/Server/Party/HostPartyExecutor.cs index 5fd6397..4d0eefc 100644 --- a/Aurora/Backend/Server/Party/HostPartyExecutor.cs +++ b/Aurora/Backend/Server/Party/HostPartyExecutor.cs @@ -39,26 +39,6 @@ namespace Aurora.Backend.Server.Party throw new NotImplementedException(); } - public override void Next() - { - throw new NotImplementedException(); - } - - public override void Pause() - { - throw new NotImplementedException(); - } - - public override void Play() - { - throw new NotImplementedException(); - } - - public override void Previous() - { - throw new NotImplementedException(); - } - public override void RemoveFromQueue() { throw new NotImplementedException(); @@ -68,10 +48,5 @@ namespace Aurora.Backend.Server.Party { throw new NotImplementedException(); } - - public override void Stop() - { - throw new NotImplementedException(); - } } } \ No newline at end of file diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml index 6b0144d..d3095ba 100644 --- a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml +++ b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml @@ -1,13 +1,39 @@ - + - -