Begin Custom Controls and Editable Cue Info

This commit is contained in:
2019-07-15 07:01:35 -05:00
parent 2f29172f2d
commit e4aadf835a
7 changed files with 253 additions and 87 deletions
+30 -6
View File
@@ -5,16 +5,40 @@ namespace qController
{
public class QButton : Button
{
public string OSCCommand
public QCommand qCommand
{
get;
set;
}
public QButton(string text, string cmd)
{
Text = text;
OSCCommand = cmd;
}
public QButton(QCommand command){
qCommand = command;
Text = qCommand.text;
TextColor = Color.Black;
if (qCommand.osc.Contains("go"))
{
BackgroundColor = Color.SeaGreen;
switch (Device.RuntimePlatform)
{
case Device.iOS:
FontSize = App.HeightUnit * 4;
FontAttributes = FontAttributes.Bold;
break;
case Device.Android:
FontSize = App.HeightUnit * 4;
FontAttributes = FontAttributes.Bold;
break;
}
}
else if (qCommand.osc.Contains("panic"))
{
BackgroundColor = Color.IndianRed;
}
else
{
BackgroundColor = Color.FromHex("D8D8D8");
}
}
}
}