mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-20 22:49:24 +00:00
QLab 5 connection changes
This commit is contained in:
@@ -21,8 +21,14 @@ namespace qController.Communication
|
|||||||
private void OnConnectionStatusChanged(object source, ConnectEventArgs args)
|
private void OnConnectionStatusChanged(object source, ConnectEventArgs args)
|
||||||
{
|
{
|
||||||
Log.Debug("QUPDATER - Connection Status Changed: " + args.Status);
|
Log.Debug("QUPDATER - Connection Status Changed: " + args.Status);
|
||||||
if (args.Status == "ok")
|
|
||||||
|
if (args.Status.Contains("ok"))
|
||||||
{
|
{
|
||||||
|
//new sort of connect format for QLab 5 ok:view|control|edit is connection good
|
||||||
|
if(args.Status.Contains(":") && !args.Status.Contains("view"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
qController.qClient.sendTCP("/workspace/" + qController.qWorkspace.workspace_id + "/updates", 1);
|
qController.qClient.sendTCP("/workspace/" + qController.qWorkspace.workspace_id + "/updates", 1);
|
||||||
qController.qClient.sendTCP("/workspace/" + qController.qWorkspace.workspace_id + "/cueLists");
|
qController.qClient.sendTCP("/workspace/" + qController.qWorkspace.workspace_id + "/cueLists");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,12 @@ namespace qController.QItems
|
|||||||
|
|
||||||
public bool CheckPopulated()
|
public bool CheckPopulated()
|
||||||
{
|
{
|
||||||
|
if(data == null)
|
||||||
|
{
|
||||||
|
IsPopulated = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < data.Count; i++)
|
for (int i = 0; i < data.Count; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < data[i].cues.Count; j++)
|
for (int j = 0; j < data[i].cues.Count; j++)
|
||||||
|
|||||||
@@ -67,13 +67,18 @@ namespace qController
|
|||||||
private void OnConnectionStatusChanged(object source, ConnectEventArgs args)
|
private void OnConnectionStatusChanged(object source, ConnectEventArgs args)
|
||||||
{
|
{
|
||||||
Log.Debug($"CONTROLPAGE - Connection Status Changed: {args.WorkspaceId} : {args.Status}");
|
Log.Debug($"CONTROLPAGE - Connection Status Changed: {args.WorkspaceId} : {args.Status}");
|
||||||
if (args.Status.Equals("ok"))
|
if (args.Status.Contains("ok"))
|
||||||
{
|
{
|
||||||
|
if(args.Status.Contains(":") && !args.Status.Contains("view"))
|
||||||
|
{
|
||||||
|
workspacePrompt.promptWorkspacePasscode(args.WorkspaceId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
Device.BeginInvokeOnMainThread(() => {
|
Device.BeginInvokeOnMainThread(() => {
|
||||||
FinishUI();
|
FinishUI();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (args.Status.Equals("badpass"))
|
else if (args.Status.Contains("badpass"))
|
||||||
{
|
{
|
||||||
workspacePrompt.promptWorkspacePasscode(args.WorkspaceId);
|
workspacePrompt.promptWorkspacePasscode(args.WorkspaceId);
|
||||||
}
|
}
|
||||||
@@ -252,6 +257,11 @@ namespace qController
|
|||||||
|
|
||||||
public void WorkspaceUpdated(object sender, WorkspaceEventArgs e)
|
public void WorkspaceUpdated(object sender, WorkspaceEventArgs e)
|
||||||
{
|
{
|
||||||
|
if(e.UpdatedWorkspace.data == null)
|
||||||
|
{
|
||||||
|
Log.Debug("[ControlPage] Workspace Update contains null data.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(e.UpdatedWorkspace.data.Count > 0)
|
if(e.UpdatedWorkspace.data.Count > 0)
|
||||||
{
|
{
|
||||||
qController.qWorkspace = e.UpdatedWorkspace;
|
qController.qWorkspace = e.UpdatedWorkspace;
|
||||||
@@ -313,10 +323,11 @@ namespace qController
|
|||||||
Device.BeginInvokeOnMainThread(() =>
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
Log.Debug("CONTROLPAGE - Refreshing Currently Displayed Cue");
|
Log.Debug("CONTROLPAGE - Refreshing Currently Displayed Cue");
|
||||||
if (args.Cue.levels != null)
|
if (args.Cue.levels != null) {
|
||||||
|
Log.Debug("before show levels button and cue.levels isnt null");
|
||||||
showLevelsButton.IsVisible = true;
|
showLevelsButton.IsVisible = true;
|
||||||
else
|
Log.Debug("after show levels button and cue.levels isnt null");
|
||||||
{
|
} else {
|
||||||
showLevelsButton.IsVisible = false;
|
showLevelsButton.IsVisible = false;
|
||||||
qLevelsCell.IsVisible = false;
|
qLevelsCell.IsVisible = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user