mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-05 23:43:49 +00:00
7b414e55a7
* qfont.ttf: Add Dollar and Mail Icon * QButton.cs: Increase Default Font Size * QControlsBlock.cs: * QSelectedCueCell.cs: Cleanup * QInstanceCell.cs: Cleanup Properties * QLevelsCell.cs: Rename QSelectedCueOptionsCell * QIcon.cs: Add Dollar and Mail Icons * ControlPage.xaml: * qConnectionPage.xaml: Move some properties to XAML * ControlPage.xaml.cs: Audio level adjustments in popup "window" * MenuPage.xaml.cs: * qConnectionPage.xaml.cs: Add Support and Feedback menu items
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using System;
|
|
using Xamarin.Forms;
|
|
|
|
namespace qController
|
|
{
|
|
public class QButton : Button
|
|
{
|
|
public QCommand qCommand
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public QButton(QCommand command){
|
|
qCommand = command;
|
|
Text = qCommand.text;
|
|
TextColor = Color.Black;
|
|
FontSize = App.HeightUnit * 2.5;
|
|
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");
|
|
}
|
|
}
|
|
}
|
|
}
|