Begin work on QBrowserPage

This commit is contained in:
Joel Wetzell
2020-06-21 09:02:00 -05:00
parent 7d9f725029
commit 2afec2bc7e
16 changed files with 5504 additions and 46 deletions
@@ -16,7 +16,7 @@ namespace qController.Communication
public class WorkspaceEventArgs : EventArgs
{
public QWorkspace UpdatedWorkspace
public QOldWorkspace UpdatedWorkspace
{
get;
set;
@@ -12,7 +12,7 @@ namespace qController.Communication
public QUpdater qUpdater;
public QClient qClient;
public QWorkspace qWorkspace;
public QOldWorkspace qWorkspace;
public string playbackPosition;
private string ipAddress;
private int port;
@@ -29,19 +29,19 @@ namespace qController.Communication
public void Connect(string workspace_id)
{
Log.Debug($"QCONTROLLER - Connect Called: {workspace_id}");
qWorkspace = new QWorkspace(workspace_id);
qWorkspace = new QOldWorkspace(workspace_id);
qClient.sendTCP("/workspace/"+workspace_id+"/connect");
}
public void Connect(string workspace_id, string passcode)
{
Log.Debug($"QCONTROLLER - Connect with Passcode Called: {workspace_id}:{passcode}");
qWorkspace = new QWorkspace(workspace_id);
qWorkspace = new QOldWorkspace(workspace_id);
qClient.sendTCP("/workspace/" + workspace_id + "/connect", passcode);
}
public void Connect(QWorkspace workspace)
public void Connect(QOldWorkspace workspace)
{
if(workspace.passcode != null)
Connect(workspace.workspace_id, workspace.passcode);
@@ -109,7 +109,7 @@ namespace qController.Communication
{
try
{
QWorkspace workspace = JsonConvert.DeserializeObject<QWorkspace>(msg.Arguments[0].ToString());
QOldWorkspace workspace = JsonConvert.DeserializeObject<QOldWorkspace>(msg.Arguments[0].ToString());
OnWorkspaceUpdated(workspace);
}
catch (Exception ex)
@@ -141,7 +141,7 @@ namespace qController.Communication
return json.GetValue("data");
}
protected virtual void OnWorkspaceUpdated(QWorkspace workspace)
protected virtual void OnWorkspaceUpdated(QOldWorkspace workspace)
{
WorkspaceUpdated?.Invoke(this, new WorkspaceEventArgs() { UpdatedWorkspace = workspace });
}
@@ -177,7 +177,7 @@ namespace qController.Communication
}
protected virtual void OnWorkspaceLoadError(string id)
{
WorkspaceLoadError?.Invoke(this, new WorkspaceEventArgs { UpdatedWorkspace = new QWorkspace(id) });
WorkspaceLoadError?.Invoke(this, new WorkspaceEventArgs { UpdatedWorkspace = new QOldWorkspace(id) });
}
}
@@ -8,7 +8,7 @@ namespace qController.Dialogs
{
public class WorkspacePromptArgs : EventArgs
{
public QWorkspace SelectedWorkspace
public QOldWorkspace SelectedWorkspace
{
get;
set;
@@ -38,7 +38,7 @@ namespace qController.Dialogs
if (!workspace.hasPasscode)
{
OnWorkspaceSelected(new QWorkspace(workspace.uniqueID));
OnWorkspaceSelected(new QOldWorkspace(workspace.uniqueID));
}
else
{
@@ -64,7 +64,7 @@ namespace qController.Dialogs
{
if (resp.Ok)
{
OnWorkspaceSelected(new QWorkspace(workspace_id,resp.Value));
OnWorkspaceSelected(new QOldWorkspace(workspace_id,resp.Value));
}
else
{
@@ -75,7 +75,7 @@ namespace qController.Dialogs
});
}
protected virtual void OnWorkspaceSelected(QWorkspace workspace)
protected virtual void OnWorkspaceSelected(QOldWorkspace workspace)
{
if (WorkspaceSelected != null)
WorkspaceSelected(this, new WorkspacePromptArgs() { SelectedWorkspace = workspace });
@@ -4,7 +4,7 @@ using Serilog;
namespace qController.QItems
{
public class QWorkspace
public class QOldWorkspace
{
public string status { get; set; }
public List<QCueList> data { get; set; }
@@ -15,18 +15,18 @@ namespace qController.QItems
public string passcode { get; set; }
//ONLY FOR PASSING A WORKSPACE LOAD ERROR
public QWorkspace(string id)
public QOldWorkspace(string id)
{
workspace_id = id;
}
public QWorkspace(string id, string passcode)
public QOldWorkspace(string id, string passcode)
{
workspace_id = id;
this.passcode = passcode;
}
public QWorkspace()
public QOldWorkspace()
{
}