diff --git a/QControlKit/Constants/QDefines.cs b/QControlKit/Constants/QDefines.cs index 76ed591..3820ab7 100644 --- a/QControlKit/Constants/QDefines.cs +++ b/QControlKit/Constants/QDefines.cs @@ -11,6 +11,7 @@ public const string Cue = "Cue"; public const string CueList = "Cue List"; public const string Cart = "Cart"; + public const string CueCart = "Cue Cart"; public const string Group = "Group"; public const string Audio = ""; public const string Mic = "Mic"; @@ -52,7 +53,6 @@ public const string AutoLoad = "autoLoad"; //implement on QCue public const string CartPosition = "cartPosition"; - public const string Children = "children"; public const string ColorName = "colorName"; public const string Cues = "cues"; public const string CueTargetNumber = "cueTargetNumber"; @@ -130,7 +130,10 @@ //Group Cue Keys public const string CartColumns = "cartColumns"; public const string CartRows = "cartRows"; - public const string GroupMode = "mode"; + public const string Children = "children"; + public const string Go = "go"; + public const string Mode = "mode"; + public const string MoveCartCue = "moveCartCue"; public const string PlaybackPositionId = "playbackPositionId"; public const string PlaybackPosition = "playbackPosition"; //Implement on Group Cue public const string PlayheadId = "playheadId"; //Implement on Group Cue @@ -269,10 +272,6 @@ public const string Duration = "duration"; public const string FullScreen = "fullScreen"; //Implement on Video Cue - - - - } public static class QIdentifiers diff --git a/QControlKit/Cue/QGroupCue.cs b/QControlKit/Cue/QGroupCue.cs new file mode 100644 index 0000000..c024a2d --- /dev/null +++ b/QControlKit/Cue/QGroupCue.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using QControlKit.Constants; + +namespace QControlKit.Cue +{ + public class QGroupCue : QCue + { + public int cartColumns + { + get + { + return (int)propertyForKey(QOSCKey.CartColumns); + } + set + { + setProperty(value, QOSCKey.CartColumns); + } + } + + public int cartRows + { + get + { + return (int)propertyForKey(QOSCKey.CartRows); + } + set + { + setProperty(value, QOSCKey.CartRows); + } + } + + public List children + { + get + { + return cues; + } + } + + public void go() + { + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.Go}"); + } + + public int mode + { + get + { + return (int)propertyForKey(QOSCKey.Mode); + } + set + { + if(value > 0 && value < 5) + { + setProperty(value, QOSCKey.Mode); + } + } + } + + public void moveCartCue(QCue cart, int row, int column) + { + if(cart.type.Equals(QCueType.CueCart) || cart.type.Equals(QCueType.Cart)) + { + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.MoveCartCue}/{cart.uid}", row, column); + } + } + + public string playhead + { + get + { + return propertyForKey(QOSCKey.Playhead).ToString(); + } + set + { + setProperty(value, QOSCKey.Playhead); + } + } + + public string playheadId + { + get + { + return propertyForKey(QOSCKey.PlayheadId).ToString(); + } + set + { + setProperty(value, QOSCKey.PlayheadId); + } + } + + public string playbackPosition + { + get + { + return propertyForKey(QOSCKey.PlaybackPosition).ToString(); + } + set + { + setProperty(value, QOSCKey.PlaybackPosition); + } + } + + public string playbackPositionId + { + get + { + return propertyForKey(QOSCKey.PlaybackPositionId).ToString(); + } + set + { + setProperty(value, QOSCKey.PlaybackPositionId); + } + } + } +} diff --git a/QControlKit/Cue/QLightCue.cs b/QControlKit/Cue/QLightCue.cs index 0be0d53..c803957 100644 --- a/QControlKit/Cue/QLightCue.cs +++ b/QControlKit/Cue/QLightCue.cs @@ -30,60 +30,60 @@ namespace QControlKit.Cue public void collateAndStart() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.CollateAndStart}"); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.CollateAndStart}"); } public void prune() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.Prune}"); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.Prune}"); } public void pruneCommands() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.PruneCommands}"); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.PruneCommands}"); } public void removeLightCommandsMatching(string match) { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.RemoveLightCommandsMatching}", match); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.RemoveLightCommandsMatching}", match); } public void replaceLightCommand(string oldCommand, string newCommand) { if(this.workspace.versionParts[0] == "4" && int.Parse(this.workspace.versionParts[1]) >= 4) { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand); } else { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand); } } public void safeSort() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SafeSort}"); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SafeSort}"); } public void safeSortCommands() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SafeSortCommands}"); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SafeSortCommands}"); } public void setLight(string light, object setting) { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.SetLight}", light, setting); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.SetLight}", light, setting); } public void updateLightCommand(string oldCommand, string newCommand) { if (int.Parse(this.workspace.versionParts[0]) >= 4 && int.Parse(this.workspace.versionParts[1]) >= 4) { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.ReplaceLightCommand}", oldCommand, newCommand); } else { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand); + workspace.sendMessage($"/cue_id/{this.uid}/{QOSCKey.UpdateLightCommand}", oldCommand, newCommand); } } diff --git a/QControlKit/Cue/QMicCue.cs b/QControlKit/Cue/QMicCue.cs index a5d4504..bb2850f 100644 --- a/QControlKit/Cue/QMicCue.cs +++ b/QControlKit/Cue/QMicCue.cs @@ -18,20 +18,20 @@ namespace QControlKit.Cue { return (int)propertyForKey(QOSCKey.Channels); } - set - { - setProperty(value, QOSCKey.Channels); - } + set + { + setProperty(value, QOSCKey.Channels); + } } - public void setDefaultLevels() + public void setDefaultLevels() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/setDefaultLevels"); + workspace.sendMessage($"/cue_id/{this.uid}/setDefaultLevels"); } public void setSilientLevels() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/setSilentLevels"); + workspace.sendMessage($"/cue_id/{this.uid}/setSilentLevels"); } } } diff --git a/QControlKit/Cue/QScriptCue.cs b/QControlKit/Cue/QScriptCue.cs index 2a38673..8be36cd 100644 --- a/QControlKit/Cue/QScriptCue.cs +++ b/QControlKit/Cue/QScriptCue.cs @@ -14,7 +14,7 @@ namespace QControlKit.Cue public void compileSource() { - workspace.sendMessage($"/cue_id/{this.propertyForKey(QOSCKey.UID)}/compileSource"); + workspace.sendMessage($"/cue_id/{this.uid}/compileSource"); } } }