mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-07-26 10:38:54 +00:00
* QServerInfo.cs: Add barebones ServerInfo class
* QClient.cs: remove logging * QWorkspace.cs: Add methods to build WorkspaceInfo and ServerInfo * CueListPage.xaml.cs: List Multiple Cue Lists in Demo app
This commit is contained in:
@@ -196,7 +196,7 @@ namespace QControlKit
|
||||
|
||||
protected virtual void OnWorkspaceUpdated()
|
||||
{
|
||||
Log.Debug($"[client] Workspace Updated");
|
||||
//Log.Debug($"[client] Workspace Updated");
|
||||
WorkspaceUpdated?.Invoke(this, new QWorkspaceUpdatedArgs());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace QControlKit
|
||||
{
|
||||
public class QServerInfo
|
||||
{
|
||||
public string host { get; set; }
|
||||
public int port { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -98,6 +98,26 @@ namespace QControlKit
|
||||
return didUpdate;
|
||||
}
|
||||
|
||||
public QWorkspaceInfo getWorkspaceInfo()
|
||||
{
|
||||
return new QWorkspaceInfo
|
||||
{
|
||||
displayName = name,
|
||||
hasPasscode = hasPasscode,
|
||||
version = version,
|
||||
uniqueID = uniqueID,
|
||||
};
|
||||
}
|
||||
|
||||
public QServerInfo GetServerInfo()
|
||||
{
|
||||
return new QServerInfo
|
||||
{
|
||||
host = server.host,
|
||||
port = server.port
|
||||
};
|
||||
}
|
||||
|
||||
public string description { get { return $"{name} : {uniqueID}"; } }
|
||||
|
||||
public bool isOlderThanVersion(string version)
|
||||
|
||||
@@ -64,24 +64,20 @@ namespace QControlKitXamDemo
|
||||
|
||||
void Workspace_WorkspaceUpdated(object source, QWorkspaceUpdatedArgs args)
|
||||
{
|
||||
foreach (var cue in connectedWorkspace.cueLists)
|
||||
if(connectedWorkspace.cueLists.Count > 0)
|
||||
{
|
||||
if(cue.cues.Count > 0)
|
||||
List<Task> cueAddTasks = new List<Task>();
|
||||
foreach(var aCue in connectedWorkspace.cueLists)
|
||||
{
|
||||
List<Task> cueAddTasks = new List<Task>();
|
||||
foreach(var aCue in cue.cues)
|
||||
Grid cueGrid = cueToGrid(aCue);
|
||||
cueGridDict.Add(aCue.uid, cueGrid);
|
||||
MainThread.InvokeOnMainThreadAsync(() =>
|
||||
{
|
||||
Grid cueGrid = cueToGrid(aCue);
|
||||
cueGridDict.Add(aCue.uid, cueGrid);
|
||||
MainThread.InvokeOnMainThreadAsync(() =>
|
||||
{
|
||||
cueListsGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
cueListsGrid.Children.Add(cueGrid, 0, aCue.sortIndex);
|
||||
}).Wait();
|
||||
}
|
||||
connectedWorkspace.valueForKey(cue, QOSCKey.PlaybackPositionId); //fetch playback position for cueList once all cue loading is done.
|
||||
break; //only load first cue list with cues.
|
||||
cueListsGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
cueListsGrid.Children.Add(cueGrid, 0, aCue.sortIndex);
|
||||
}).Wait();
|
||||
}
|
||||
connectedWorkspace.valueForKey(connectedWorkspace.firstCueList, QOSCKey.PlaybackPositionId); //fetch playback position for cueList once all cue loading is done.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user