diff --git a/Droid/packages.config b/Droid/packages.config
index de5313d..99a6af7 100644
--- a/Droid/packages.config
+++ b/Droid/packages.config
@@ -9,7 +9,7 @@
-
+
diff --git a/Droid/qController.Droid.csproj b/Droid/qController.Droid.csproj
index 5895cd6..c80bf90 100644
--- a/Droid/qController.Droid.csproj
+++ b/Droid/qController.Droid.csproj
@@ -79,7 +79,7 @@
..\packages\Acr.Settings.9.0.1\lib\monoandroid80\Acr.Settings.dll
- ..\packages\Splat.8.0.1\lib\monoandroid81\Splat.dll
+ ..\packages\Splat.8.0.5\lib\monoandroid81\Splat.dll
..\packages\System.Reactive.4.1.5\lib\netstandard2.0\System.Reactive.dll
diff --git a/qController.Standard/.DS_Store b/qController.Standard/.DS_Store
deleted file mode 100644
index d5749d9..0000000
Binary files a/qController.Standard/.DS_Store and /dev/null differ
diff --git a/qController.Standard/Classes/Cell/QButton.cs b/qController.Standard/Classes/Cell/QButton.cs
index 3bc08b3..fe194eb 100644
--- a/qController.Standard/Classes/Cell/QButton.cs
+++ b/qController.Standard/Classes/Cell/QButton.cs
@@ -1,5 +1,4 @@
-using System;
-using Xamarin.Forms;
+using Xamarin.Forms;
namespace qController
{
@@ -11,7 +10,8 @@ namespace qController
set;
}
- public QButton(QCommand command){
+ public QButton(QCommand command)
+ {
qCommand = command;
Text = qCommand.text;
TextColor = Color.Black;
diff --git a/qController.Standard/Classes/Cell/QControlsBlock.cs b/qController.Standard/Classes/Cell/QControlsBlock.cs
index c76f7d9..e5ce5b9 100644
--- a/qController.Standard/Classes/Cell/QControlsBlock.cs
+++ b/qController.Standard/Classes/Cell/QControlsBlock.cs
@@ -4,22 +4,20 @@ using Xamarin.Forms;
namespace qController
{
- public class QControlsBlock: Frame
+ public class QControlsBlock : Frame
{
Grid mainG;
QController qController;
-
+
public QControlsBlock(QController controller)
{
qController = controller;
-
-
Margin = new Thickness(10);
Padding = new Thickness(0);
IsVisible = true;
-
+
BackgroundColor = Color.Transparent;
//highlight Button Grid
@@ -34,10 +32,11 @@ namespace qController
commands.Add(QCommands.RESUME);
//setCustomButtons(commands);
setDefaultButtons();
-
+
}
- void setDefaultButtons(){
+ void setDefaultButtons()
+ {
List buttons = new List();
buttons.Add(new QButton(QCommands.PREVIOUS));
@@ -65,7 +64,7 @@ namespace qController
int row = 0;
int column = 0;
- for(int i = 0; i < buttons.Count; i++)
+ for (int i = 0; i < buttons.Count; i++)
{
QButton b = buttons[i];
b.Clicked += sendOSC;
@@ -85,7 +84,8 @@ namespace qController
Content = mainG;
}
- public void setCustomButtons(List commands){
+ public void setCustomButtons(List commands)
+ {
mainG = new Grid
{
Padding = new Thickness(0),
@@ -104,7 +104,7 @@ namespace qController
int row = 0;
int column = 0;
- for(int i = 0; i < commands.Count; i++)
+ for (int i = 0; i < commands.Count; i++)
{
QButton b = new QButton(commands[i]);
b.Clicked += sendOSC;
@@ -126,10 +126,11 @@ namespace qController
void sendOSC(object sender, EventArgs e)
{
- if(((QButton)sender).qCommand.type == "WORKSPACE"){
+ if (((QButton)sender).qCommand.type == "WORKSPACE")
+ {
string workspace_prefix = "/workspace/" + qController.qWorkspace.workspace_id;
string command = workspace_prefix + ((QButton)sender).qCommand.osc;
- qController.qClient.sendStringUDP(command);
+ qController.qClient.sendStringUDP(command);
}
}
}
diff --git a/qController.Standard/Classes/Cell/QInstance.cs b/qController.Standard/Classes/Cell/QInstance.cs
index 566a957..6c8b519 100644
--- a/qController.Standard/Classes/Cell/QInstance.cs
+++ b/qController.Standard/Classes/Cell/QInstance.cs
@@ -1,21 +1,14 @@
-using System;
-using System.Net;
-using System.Net.NetworkInformation;
-using Xamarin.Forms;
-using SharpOSC;
-using System.Threading;
+using Xamarin.Forms;
namespace qController
{
-
-
public class QInstance : ViewCell
{
public string name { get; set; }
public string address { get; set; }
public QInstance()
{
-
+
}
public QInstance(string tName, string tAddress)
{
@@ -38,5 +31,4 @@ namespace qController
return true;
}
}
-
}
\ No newline at end of file
diff --git a/qController.Standard/Classes/Cell/QLevelsCell.cs b/qController.Standard/Classes/Cell/QLevelsCell.cs
index 07da1a2..344484e 100644
--- a/qController.Standard/Classes/Cell/QLevelsCell.cs
+++ b/qController.Standard/Classes/Cell/QLevelsCell.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using Xamarin.Forms;
namespace qController
diff --git a/qController.Standard/Classes/Cell/ShadowButton.cs b/qController.Standard/Classes/Cell/ShadowButton.cs
index b3ab224..08a0a52 100644
--- a/qController.Standard/Classes/Cell/ShadowButton.cs
+++ b/qController.Standard/Classes/Cell/ShadowButton.cs
@@ -1,5 +1,4 @@
-using System;
-using Xamarin.Forms;
+using Xamarin.Forms;
namespace qController
{
diff --git a/qController.Standard/Classes/Communication/IPHelper.cs b/qController.Standard/Classes/Communication/IPHelper.cs
index 78b071b..7b84960 100644
--- a/qController.Standard/Classes/Communication/IPHelper.cs
+++ b/qController.Standard/Classes/Communication/IPHelper.cs
@@ -1,6 +1,5 @@
//IP Address verification
//IMPLEMENT A ISREACHABLE METHOD TO BE ABLE TO DISPLAY ONLINE QINSTANCES
-using System;
using System.Net;
namespace qController
diff --git a/qController.Standard/Classes/Communication/QClient.cs b/qController.Standard/Classes/Communication/QClient.cs
index 346fee9..4706d76 100644
--- a/qController.Standard/Classes/Communication/QClient.cs
+++ b/qController.Standard/Classes/Communication/QClient.cs
@@ -1,12 +1,9 @@
//Class used to facilitate communication with a QInstance
//Listens for incoming messages via qReceiver (UDP) and tcpSender (TCP)
//WEIRD MESSAGE PARSING RULES NEED FIXED
-
using System;
-using System.Linq;
-using System.Threading;
using SharpOSC;
-using Newtonsoft.Json;
+
namespace qController
{
public class QClient
diff --git a/qController.Standard/Classes/Communication/QController.cs b/qController.Standard/Classes/Communication/QController.cs
index 86da786..9b647dd 100644
--- a/qController.Standard/Classes/Communication/QController.cs
+++ b/qController.Standard/Classes/Communication/QController.cs
@@ -3,10 +3,7 @@
//Also contains the local QWorkspace object which stores all the information that is used in displaying
//STILL NEED TO WORK ON PASSWORD PROTECTED WORKSPACES
using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Diagnostics;
-using Xamarin.Forms;
namespace qController
{
@@ -15,7 +12,7 @@ namespace qController
public QUpdater qUpdater;
public QClient qClient;
- public QWorkSpace qWorkspace;
+ public QWorkspace qWorkspace;
public string playbackPosition;
public Stopwatch sw;
public QController(string address, int port)
@@ -23,19 +20,15 @@ namespace qController
qClient = new QClient(address, port);
qUpdater = new QUpdater(this);
- //Connect();
- //Connect();
- //KickOff();
-
}
public void Connect(string workspace_id)
{
Console.WriteLine("QCONTROLLER CONNECT CALLED: " + workspace_id);
- qWorkspace = new QWorkSpace();
+ qWorkspace = new QWorkspace();
qWorkspace.workspace_id = workspace_id;
qUpdater.Start();
- qClient.sendStringUDP("/connect");
+ qClient.sendArgsUDP("/workspace/"+workspace_id+"/connect");
qClient.sendArgsUDP("/workspace/"+workspace_id+"/updates", 1);
qClient.sendAndReceiveString("/workspace/"+workspace_id+"/cueLists");
}
@@ -47,17 +40,19 @@ namespace qController
public void Disconnect()
{
- qClient.sendStringUDP("/disconnect");
+ qClient.sendStringUDP("/workspace/"+qWorkspace.workspace_id+"/disconnect");
}
public void ConnectWithPass(string pass)
{
- qClient.sendArgsUDP("/connect", pass);
+ qClient.sendArgsUDP("/workspace/" + qWorkspace.workspace_id + "/connect", pass);
}
public void Kill(){
- qUpdater.Kill();
- qClient.Close();
+ if (qUpdater != null)
+ qUpdater.Kill();
+ if (qClient != null)
+ qClient.Close();
}
}
}
diff --git a/qController.Standard/Classes/Communication/QFinder.cs b/qController.Standard/Classes/Communication/QFinder.cs
index ee86c8f..f5fb04a 100644
--- a/qController.Standard/Classes/Communication/QFinder.cs
+++ b/qController.Standard/Classes/Communication/QFinder.cs
@@ -1,11 +1,9 @@
//Currently unused would like to reimplement eventually
//Currently being done in qConnectionPage.xaml.cs Scan() method
-
using System;
using System.Collections.Generic;
using Zeroconf;
-
namespace qController
{
public class QFinder
diff --git a/qController.Standard/Classes/Communication/QParser.cs b/qController.Standard/Classes/Communication/QParser.cs
index 967a29c..e272e8e 100644
--- a/qController.Standard/Classes/Communication/QParser.cs
+++ b/qController.Standard/Classes/Communication/QParser.cs
@@ -1,5 +1,4 @@
-
-using System;
+using System;
using SharpOSC;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
@@ -18,7 +17,7 @@ namespace qController
public class WorkspaceEventArgs : EventArgs
{
- public QWorkSpace UpdatedWorkspace
+ public QWorkspace UpdatedWorkspace
{
get;
set;
@@ -45,7 +44,7 @@ namespace qController
public class WorkspaceInfoArgs : EventArgs
{
- public List WorkspaceInfo
+ public List WorkspaceInfo
{
get;
set;
@@ -155,7 +154,7 @@ namespace qController
public void ParseQInfo(OscMessage msg)
{
JToken qInfo = OSC2JSON(msg);
- List qWorkspaceInfo = JsonConvert.DeserializeObject>(qInfo.ToString());
+ List qWorkspaceInfo = JsonConvert.DeserializeObject>(qInfo.ToString());
OnWorkspaceInfoReceived(qWorkspaceInfo);
}
@@ -163,7 +162,7 @@ namespace qController
{
if (msg.Arguments.Count > 0)
{
- QWorkSpace workspace = JsonConvert.DeserializeObject(msg.Arguments[0].ToString());
+ QWorkspace workspace = JsonConvert.DeserializeObject(msg.Arguments[0].ToString());
OnWorkspaceUpdated(workspace);
}
}
@@ -184,7 +183,7 @@ namespace qController
return json.GetValue("data");
}
- protected virtual void OnWorkspaceUpdated(QWorkSpace workspace)
+ protected virtual void OnWorkspaceUpdated(QWorkspace workspace)
{
if (WorkspaceUpdated != null)
WorkspaceUpdated(this, new WorkspaceEventArgs() { UpdatedWorkspace = workspace });
@@ -221,7 +220,7 @@ namespace qController
if (WorkspaceDisconnect != null)
WorkspaceDisconnect(this, new EventArgs());
}
- protected virtual void OnWorkspaceInfoReceived(List workspaces)
+ protected virtual void OnWorkspaceInfoReceived(List workspaces)
{
if (WorkspaceInfoReceived != null)
WorkspaceInfoReceived(this, new WorkspaceInfoArgs() { WorkspaceInfo = workspaces });
diff --git a/qController.Standard/Classes/Communication/QReceiver.cs b/qController.Standard/Classes/Communication/QReceiver.cs
index 834bed9..82ddfb1 100644
--- a/qController.Standard/Classes/Communication/QReceiver.cs
+++ b/qController.Standard/Classes/Communication/QReceiver.cs
@@ -1,8 +1,5 @@
//Class used for receiving workspace update messages
-
-using System;
using SharpOSC;
-using System.Net;
using System.Threading;
namespace qController
diff --git a/qController.Standard/Classes/Communication/QUpdater.cs b/qController.Standard/Classes/Communication/QUpdater.cs
index 726eaf0..ea7bf3f 100644
--- a/qController.Standard/Classes/Communication/QUpdater.cs
+++ b/qController.Standard/Classes/Communication/QUpdater.cs
@@ -1,9 +1,8 @@
//Class used for updating local "copy" of workspace info, cue-lists, cues, etc.
-
using System;
using System.Threading;
using Xamarin.Forms;
-using SharpOSC;
+
namespace qController
{
public class QUpdater
@@ -43,7 +42,7 @@ namespace qController
if (args.Cue.type == "Group")
{
//Console.WriteLine("QUpdater/Updated cue was group cue, sending children request");
- qController.qClient.sendStringUDP("/cue_id/" + args.Cue.uniqueID + "/children");
+ qController.qClient.sendStringUDP("/workspace/"+qController.qWorkspace.workspace_id+"/cue_id/" + args.Cue.uniqueID + "/children");
}
}
diff --git a/qController.Standard/Classes/Cues/QCue.cs b/qController.Standard/Classes/Cues/QCue.cs
index 945ea8c..a5e202f 100644
--- a/qController.Standard/Classes/Cues/QCue.cs
+++ b/qController.Standard/Classes/Cues/QCue.cs
@@ -1,6 +1,5 @@
-using System;
-using System.Collections.Generic;
-using Newtonsoft.Json.Linq;
+using System.Collections.Generic;
+
namespace qController
{
public class QCue
diff --git a/qController.Standard/Classes/Cues/QCueList.cs b/qController.Standard/Classes/Cues/QCueList.cs
index 9d7883c..fe78db6 100644
--- a/qController.Standard/Classes/Cues/QCueList.cs
+++ b/qController.Standard/Classes/Cues/QCueList.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace qController
{
diff --git a/qController.Standard/Classes/Cues/QWorkSpace.cs b/qController.Standard/Classes/Cues/QWorkSpace.cs
index 0d6ea4c..cfbad43 100644
--- a/qController.Standard/Classes/Cues/QWorkSpace.cs
+++ b/qController.Standard/Classes/Cues/QWorkSpace.cs
@@ -5,13 +5,14 @@ using System.Collections.Generic;
namespace qController
{
- public class QWorkSpace
+ public class QWorkspace
{
public string status { get; set; }
public List data { get; set; }
public string workspace_id { get; set; }
public string address { get; set; }
public bool IsPopulated { get; set; }
+
public QCue GetCue(string cue_id)
{
foreach (var cueList in data)
@@ -61,23 +62,6 @@ namespace qController
}
}
- public QCue GetEmptyGroup()
- {
- foreach (var cueList in data)
- {
- foreach (var cue in cueList.cues)
- {
- if (cue.type == "Group" && cue.cues == null)
- {
- Console.WriteLine("Next Group Cue Found");
- return cue;
- }
- }
- }
- IsPopulated = true;
- return null;
- }
-
public bool CheckPopulated()
{
for (int i = 0; i < data.Count; i++)
diff --git a/qController.Standard/Classes/Cues/QInfo.cs b/qController.Standard/Classes/Cues/QWorkspaceInfo.cs
similarity index 87%
rename from qController.Standard/Classes/Cues/QInfo.cs
rename to qController.Standard/Classes/Cues/QWorkspaceInfo.cs
index 22241c4..54c97c2 100644
--- a/qController.Standard/Classes/Cues/QInfo.cs
+++ b/qController.Standard/Classes/Cues/QWorkspaceInfo.cs
@@ -1,8 +1,7 @@
//General information about a QLab Workspace
-using System;
namespace qController
{
- public class QInfo
+ public class QWorkspaceInfo
{
public string version { get; set; }
public string displayName { get; set; }
diff --git a/qController.Standard/Classes/Settings/MenuPageitem.cs b/qController.Standard/Classes/Settings/MenuPageitem.cs
index 15246a5..e9caf98 100644
--- a/qController.Standard/Classes/Settings/MenuPageitem.cs
+++ b/qController.Standard/Classes/Settings/MenuPageitem.cs
@@ -1,5 +1,4 @@
-using System;
-
+
namespace qController
{
public class MenuPageItem
diff --git a/qController.Standard/Classes/Settings/QCommand.cs b/qController.Standard/Classes/Settings/QCommand.cs
index 42bdc58..d7b9e64 100644
--- a/qController.Standard/Classes/Settings/QCommand.cs
+++ b/qController.Standard/Classes/Settings/QCommand.cs
@@ -1,5 +1,4 @@
-using System;
-namespace qController
+namespace qController
{
public class QCommand
{
diff --git a/qController.Standard/Classes/Settings/QCommands.cs b/qController.Standard/Classes/Settings/QCommands.cs
index cc4aa0b..306e65b 100644
--- a/qController.Standard/Classes/Settings/QCommands.cs
+++ b/qController.Standard/Classes/Settings/QCommands.cs
@@ -1,5 +1,4 @@
-using System;
-namespace qController
+namespace qController
{
public static class QCommands
{
diff --git a/qController.Standard/Classes/Settings/QIcon.cs b/qController.Standard/Classes/Settings/QIcon.cs
index 3d82604..a69c06a 100644
--- a/qController.Standard/Classes/Settings/QIcon.cs
+++ b/qController.Standard/Classes/Settings/QIcon.cs
@@ -1,5 +1,4 @@
-using System;
-namespace qController
+namespace qController
{
public static class QIcon
{
diff --git a/qController.Standard/Classes/Settings/QStorage.cs b/qController.Standard/Classes/Settings/QStorage.cs
index c3f55ba..c941683 100644
--- a/qController.Standard/Classes/Settings/QStorage.cs
+++ b/qController.Standard/Classes/Settings/QStorage.cs
@@ -1,7 +1,7 @@
using System;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
using Acr.Settings;
+
namespace qController
{
public class QStorage
diff --git a/qController.Standard/Pages/App.xaml.cs b/qController.Standard/Pages/App.xaml.cs
index 241d526..e1e90c4 100644
--- a/qController.Standard/Pages/App.xaml.cs
+++ b/qController.Standard/Pages/App.xaml.cs
@@ -1,6 +1,7 @@
using Acr.UserDialogs;
using Xamarin.Forms;
using Xamarin.Essentials;
+
namespace qController
{
public partial class App : Application
@@ -14,6 +15,7 @@ namespace qController
public static double Width;
public static double HeightUnit;
public static double WidthUnit;
+
public static bool MenuIsPresented
{
get
diff --git a/qController.Standard/Pages/MenuPage.xaml.cs b/qController.Standard/Pages/MenuPage.xaml.cs
index 335b5d7..ce94641 100644
--- a/qController.Standard/Pages/MenuPage.xaml.cs
+++ b/qController.Standard/Pages/MenuPage.xaml.cs
@@ -1,7 +1,5 @@
using System;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Threading;
using Xamarin.Forms;
namespace qController
@@ -76,7 +74,7 @@ namespace qController
});
}
- public void ChangeToWorkspace(QWorkSpace workspace)
+ public void ChangeToWorkspace(QWorkspace workspace)
{
for(int i = 0; i < workspace.data.Count; i++)
{
diff --git a/qController.Standard/Pages/RootPage.xaml.cs b/qController.Standard/Pages/RootPage.xaml.cs
index b716a08..2a4eea5 100644
--- a/qController.Standard/Pages/RootPage.xaml.cs
+++ b/qController.Standard/Pages/RootPage.xaml.cs
@@ -1,11 +1,5 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
using Xamarin.Forms;
-using Xamarin.Forms.Xaml;
namespace qController
{
diff --git a/qController.Standard/Pages/qConnectionPage.xaml b/qController.Standard/Pages/qConnectionPage.xaml
index 136f985..edc6e80 100644
--- a/qController.Standard/Pages/qConnectionPage.xaml
+++ b/qController.Standard/Pages/qConnectionPage.xaml
@@ -12,7 +12,7 @@
-
+
\ No newline at end of file
diff --git a/qController.Standard/Pages/qConnectionPage.xaml.cs b/qController.Standard/Pages/qConnectionPage.xaml.cs
index 1623b39..9c10791 100644
--- a/qController.Standard/Pages/qConnectionPage.xaml.cs
+++ b/qController.Standard/Pages/qConnectionPage.xaml.cs
@@ -1,11 +1,8 @@
using Xamarin.Forms;
-using System.Net;
using System;
using Acr.UserDialogs;
-using Acr.Settings;
using Zeroconf;
using System.Collections.Generic;
-using System.Collections.Specialized;
namespace qController
{
@@ -52,10 +49,10 @@ namespace qController
private void InitGUI()
{
NavigationPage.SetHasNavigationBar(this, false);
- listView.ItemsSource = QStorage.qInstances;
+ //ListView Setup
+ listView.ItemsSource = QStorage.qInstances;
listView.ItemTemplate = new DataTemplate(typeof(QInstanceCell));
- listView.SeparatorVisibility = SeparatorVisibility.None;
listView.ItemTapped += (object sender, ItemTappedEventArgs e) =>
{
// don't do anything if we just de-selected the row
@@ -64,12 +61,11 @@ namespace qController
((ListView)sender).SelectedItem = null; // de-select the row
};
- menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
-
+ //Platform Specific Setup
switch (Device.RuntimePlatform)
{
case Device.iOS:
- topBar.HeightRequest = Math.Max(App.Height * .09, 65);
+ topBar.HeightRequest = App.Height * .09;
menuButton.FontSize = App.Height * .04;
break;
case Device.Android:
@@ -78,10 +74,13 @@ namespace qController
break;
}
- BackgroundColor = Color.FromHex("4A4A4A");
+ BackgroundColor = Color.FromHex("4A4A4A");
+
+ //MenuButton Setup
var menuButtonGesture = new TapGestureRecognizer();
menuButtonGesture.Tapped += showMenu;
menuButton.GestureRecognizers.Add(menuButtonGesture);
+ menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
}
diff --git a/qController.Standard/qController.csproj b/qController.Standard/qController.csproj
index d5037a7..739fa10 100644
--- a/qController.Standard/qController.csproj
+++ b/qController.Standard/qController.csproj
@@ -58,7 +58,6 @@
-