* QCue.cs:

* QWorkspace.cs:
* QControlKitXamDemo.csproj:
* QControlKitXamDemo.iOS.csproj:
* QControlKitXamDemo.Android.csproj: Update Dependencies

* QTextCue.cs: Add QTextCue Class
This commit is contained in:
2022-02-03 13:45:19 -06:00
parent 66ae48cf33
commit 6057105f44
6 changed files with 134 additions and 6 deletions
+69
View File
@@ -0,0 +1,69 @@
using System.Collections.Generic;
using QControlKit.Constants;
namespace QControlKit.Cue
{
public class QTextCue : QCue
{
public int fixedWidth
{
get
{
return (int)propertyForKey(QOSCKey.FixedWidth);
}
set
{
if(fixedWidth > 0)
{
setProperty(value, QOSCKey.FixedWidth);
}
}
}
public string text
{
get
{
return propertyForKey(QOSCKey.Text).ToString();
}
set
{
setProperty(value, QOSCKey.Text);
}
}
public string liveText
{
get
{
return propertyForKey(QOSCKey.LiveText).ToString();
}
set
{
setProperty(value, QOSCKey.LiveText);
}
}
//TODO:
/* https://qlab.app/docs/v4/scripting/osc-dictionary-v4/#text-cue-methods
* /cue/{cue_number}/text/format {json_string}
* /cue/{cue_number}/text/format/alignment {alignment}
* /cue/{cue_number}/text/format/fontFamily
* /cue/{cue_number}/text/format/fontStyle
* /cue/{cue_number}/text/format/fontFamilyAndStyle {family} {style}
* /cue/{cue_number}/text/format/fontName {name}
* /cue/{cue_number}/text/format/fontSize {number}
* /cue/{cue_number}/text/format/lineSpacing {number}
* /cue/{cue_number}/text/format/color {red} {green} {blue} {alpha}
* /cue/{cue_number}/text/format/backgroundColor {red} {green} {blue} {alpha}
* /cue/{cue_number}/text/format/strikethroughColor {red} {green} {blue} {alpha}
* /cue/{cue_number}/text/format/underlineColor {red} {green} {blue} {alpha}
* /cue/{cue_number}/text/format/strikethroughStyle {style}
* /cue/{cue_number}/text/format/underlineStyle {style}
* /cue/{cue_number}/text/outputSize
* /cue/{cue_number}/liveText/outputSize
*/
}
}
+53
View File
@@ -571,6 +571,45 @@ namespace QControlKit
}
}
public QTriggerAction secondTriggerAction
{
get
{
return (QTriggerAction)propertyForKey(QOSCKey.SecondTriggerAction);
}
set
{
setProperty(value, QOSCKey.SecondTriggerAction);
}
}
public bool secondTriggerOnRelease
{
get
{
var val = (int)propertyForKey(QOSCKey.SecondTriggerOnRelease);
if (val == 0)
{
return true;
}
else
{
return false;
}
}
set
{
if (value)
{
setProperty(0, QOSCKey.SecondTriggerOnRelease);
}
else
{
setProperty(1, QOSCKey.SecondTriggerOnRelease);
}
}
}
//TODO add quaternion property and setter
public Size surfaceSize() { throw new NotImplementedException(); }
public Size cueSize() { throw new NotImplementedException(); }
@@ -936,6 +975,20 @@ namespace QControlKit
public void togglePause() { workspace.togglePauseCue(this); }
public void preview() { workspace.previewCue(this); }
public void panic() { workspace.panicCue(this); }
public void playheadNext()
{
if (this.type == QCueType.CueList)
{
workspace.sendMessageForCue(this, "playhead/next");
}
}
public void playheadPrevious()
{
if (this.type == QCueType.CueList)
{
workspace.sendMessageForCue(this, "playhead/previous");
}
}
#endregion
+6
View File
@@ -252,6 +252,7 @@ namespace QControlKit
public void fetchCueLists() { client.sendMessage($"{workspacePrefix}/cueLists"); }
public void fetchPlaybackPositionForCue(QCue cue) { client.sendMessage(addressForCue(cue, QOSCKey.PlaybackPositionId)); } //EventHandler for this? can I use the CueListPlaybackPosition one?
public void go() { client.sendMessage($"{workspacePrefix}/go"); }
public void go(string cueNumber) { client.sendMessage($"{workspacePrefix}/go/{cueNumber}"); }
public void save() { client.sendMessage($"{workspacePrefix}/save"); }
public void undo() { client.sendMessage($"{workspacePrefix}/undo"); }
public void redo() { client.sendMessage($"{workspacePrefix}/redo"); }
@@ -358,6 +359,11 @@ namespace QControlKit
client.sendMessage(address, args);
}
public void sendMessageForCue(QCue cue, string action)
{
client.sendMessage(addressForCue(cue, action));
}
private string addressForCue(QCue cue, string action)
{
return $"{workspacePrefix}/cue_id/{cue.propertyForKey(QOSCKey.UID)}/{action}";
@@ -57,8 +57,8 @@
<PackageReference Include="Serilog.Sinks.Xamarin">
<Version>0.2.0.64</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2291" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
@@ -131,8 +131,8 @@
<PackageReference Include="Serilog.Sinks.Xamarin">
<Version>0.2.0.64</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2291" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
@@ -12,8 +12,8 @@
<ItemGroup>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2291" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>
<ItemGroup>