mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-08-08 17:03:50 +00:00
Implement Cue Properties Updating
This commit is contained in:
@@ -61,6 +61,11 @@ namespace QSharp
|
||||
public JToken data { get; set; }
|
||||
}
|
||||
|
||||
public class QCuePropertiesUpdatedArgs : EventArgs
|
||||
{
|
||||
public List<string> properties { get; set; }
|
||||
}
|
||||
|
||||
public class QCueListsUpdatedArgs : EventArgs
|
||||
{
|
||||
public JToken data { get; set; }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
namespace QSharp
|
||||
namespace QSharp
|
||||
{
|
||||
public delegate void QServerFoundHandler(object source, QServerFoundArgs args);
|
||||
public delegate void QServerUpdatedHandler(object source, QServerUpdatedArgs args);
|
||||
@@ -16,6 +15,7 @@ namespace QSharp
|
||||
|
||||
|
||||
public delegate void QCueUpdatedHandler(object source, QCueUpdatedArgs args);
|
||||
public delegate void QCuePropertiesUpdatedHandler(object source, QCuePropertiesUpdatedArgs args);
|
||||
public delegate void QCueListsUpdatesHandler(object source, QCueListsUpdatedArgs args);
|
||||
public delegate void QCueNeedsUpdatedHandler(object source, QCueNeedsUpdatedArgs args);
|
||||
public delegate void QCueListChangedPlaybackPositionHandler(object source, QCueListChangedPlaybackPositionArgs args);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Zeroconf;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using Serilog;
|
||||
|
||||
|
||||
+1
-4
@@ -1,12 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SharpOSC;
|
||||
using Serilog;
|
||||
using System.Collections.Concurrent;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace QSharp
|
||||
{
|
||||
|
||||
+1
-7
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
namespace QSharp
|
||||
namespace QSharp
|
||||
{
|
||||
public class QColor
|
||||
{
|
||||
|
||||
+17
-3
@@ -22,6 +22,8 @@ namespace QSharp
|
||||
|
||||
public bool ignoreUpdates;
|
||||
|
||||
public event QCuePropertiesUpdatedHandler CuePropertiesUpdated;
|
||||
|
||||
public QCue()
|
||||
{
|
||||
init();
|
||||
@@ -540,6 +542,7 @@ namespace QSharp
|
||||
|
||||
//TODO
|
||||
JObject dictObj = (JObject)dict;
|
||||
List<string> propertiesUpdated = new List<string>();
|
||||
foreach (var obj in dictObj)
|
||||
{
|
||||
JToken value = obj.Value;
|
||||
@@ -553,16 +556,17 @@ namespace QSharp
|
||||
{
|
||||
bool didSetProptery = setProperty(value, obj.Key, false);
|
||||
if (didSetProptery)
|
||||
{
|
||||
cueUpdated = true;
|
||||
propertiesUpdated.Add(obj.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cueUpdated)
|
||||
return false;
|
||||
|
||||
Log.Debug($"[cue] <{nonEmptyName}> has been updated.");
|
||||
//something about notifying cueUpdated ? OnCueUpdated event handler maybe?
|
||||
|
||||
OnCuePropertiesUpdated(propertiesUpdated);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -820,6 +824,16 @@ namespace QSharp
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Event Handling
|
||||
void OnCuePropertiesUpdated(List<string> properties)
|
||||
{
|
||||
Log.Debug($"[cue] <{nonEmptyName}> properties have been updated.");
|
||||
CuePropertiesUpdated?.Invoke(this, new QCuePropertiesUpdatedArgs { properties = properties });
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Printing
|
||||
public void Print()
|
||||
{
|
||||
|
||||
+1
-5
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace QSharp
|
||||
namespace QSharp
|
||||
{
|
||||
static class QBonjour
|
||||
{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SharpOSC;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user