mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-14 20:03:58 +00:00
Clean up legacy control classes and code
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController.UI.Buttons
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Xamarin.Forms;
|
||||
namespace qController.UI.Buttons
|
||||
{
|
||||
public class QLevelsButton : ShadowButton
|
||||
{
|
||||
public Button button;
|
||||
public QLevelsButton()
|
||||
{
|
||||
button = new Button
|
||||
{
|
||||
Text = QIcon.SLIDERS,
|
||||
TextColor = Color.Black,
|
||||
FontFamily = (OnPlatform<string>)Application.Current.Resources["QFontFamily"],
|
||||
FontSize = App.HeightUnit * 4,
|
||||
VerticalOptions = LayoutOptions.FillAndExpand,
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||
HeightRequest = App.HeightUnit * 8,
|
||||
WidthRequest = App.HeightUnit * 8,
|
||||
CornerRadius = (int)(App.HeightUnit * 4),
|
||||
BackgroundColor = Color.LightBlue
|
||||
};
|
||||
|
||||
HeightRequest = button.Height;
|
||||
WidthRequest = button.Width;
|
||||
CornerRadius = button.CornerRadius;
|
||||
Content = button;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user