initial working maui migration with android only

This commit is contained in:
2025-01-26 17:45:09 -06:00
parent e851c815fc
commit e0c300e60d
189 changed files with 57617 additions and 45110 deletions
@@ -0,0 +1,11 @@
namespace qController
{
public class MenuPageItem
{
public string Title { get; set; }
public string Icon { get; set; }
public string Command { get; set; }
}
}
@@ -0,0 +1,15 @@
using qController.QItems;
namespace qController
{
public class NoQCueSelected : QCue
{
public NoQCueSelected()
{
listName = "No Cue Selected";
type = "";
notes = "Workspace has loaded but no cue is selected";
number = "!";
}
}
}
@@ -0,0 +1,11 @@
namespace qController
{
public class OSCListItem
{
public string Text { get; set; }
public string Icon { get; set; }
public string Command { get; set; }
}
}
@@ -0,0 +1,17 @@
namespace qController
{
public class QCommand
{
public string osc;
public string text;
public string type;
public QCommand(string display, string cmd, string command_type)
{
text = display;
osc = cmd;
type = command_type;
}
}
}
@@ -0,0 +1,17 @@
namespace qController
{
public static class QCommands
{
public static QCommand GO = new QCommand("GO", "/go","WORKSPACE");
public static QCommand PANIC = new QCommand("Panic", "/panic","WORKSPACE");
public static QCommand PAUSE = new QCommand("Pause", "/pause","WORKSPACE");
public static QCommand PREVIEW = new QCommand("Preview", "/preview","WORKSPACE");
public static QCommand RESUME = new QCommand("Resume", "/resume","WORKSPACE");
public static QCommand PREVIOUS = new QCommand("Previous","/select/previous","WORKSPACE");
public static QCommand NEXT = new QCommand("Next", "/select/next","WORKSPACE");
public static QCommand RESET = new QCommand("Reset","/reset","WORKSPACE");
public static QCommand STOP = new QCommand("Stop","/stop","WORKSPACE");
public static QCommand HARDSTOP = new QCommand("Hard Stop", "/hardStop","WORKSPACE");
}
}
+118
View File
@@ -0,0 +1,118 @@
//Get appropriately letter or unicode character for Icon font
namespace qController
{
public static class QIcon
{
public const string SEARCH = "\uE800";
public const string PLUS = "\uE801";
public const string TRASH_EMPTY = "\uE802";
public const string CANCEL = "\uE803";
public const string MUSIC = "\uE804";
public const string VIDEO = "\uE805";
public const string VIDEOCAM = "\uE806";
public const string VOLUME_UP = "\uE807";
public const string CLOCK = "\uE808";
public const string PLAY = "\uE809";
public const string STOP = "\uE80A";
public const string PAUSE = "\uE80B";
public const string CW = "\uE80C";
public const string TARGET = "\uE80D";
public const string CHART_PIE = "\uE80E";
public const string UNDO = "\uE80F";
public const string POWER = "\uE810";
public const string QRCODE = "\uE811";
public const string MAIL = "\uE812";
public const string LEFT_DIR = "\uE813";
public const string LIST = "\uE814";
public const string SPIN3 = "\uE832";
public const string MENU = "\uF0C9";
public const string LIGHTBULB = "\uF0EB";
public const string MIC = "\uF130";
public const string MINUS_SQUARED = "\uF146";
public const string DOLLAR = "\uF155";
public const string RIGHT = "\uF178";
public const string DOT_CIRCLED = "\uF192";
public const string SLIDERS = "\uF1DE";
public const string WIFI = "\uF1EB";
public const string OBJECT_UNGROUP = "\uF248";
public const string HOURGLASS_O = "\uF250";
public const string COMMENTING_O = "\uF27B";
public static string GetIconFromType(string type)
{
switch (type)
{
case "Group":
return "g";
case "Audio":
return "a";
case "Mic":
return "m";
case "Video":
return "v";
case "Camera":
return "c";
case "Text":
return "t";
case "Light":
return LIGHTBULB;
case "Fade":
return "f";
case "Network":
return "o";
case "MIDI":
return "M";
case "MIDI File":
return "F";
case "Timecode":
return "T";
case "Start":
return "s";
case "Stop":
return "S";
case "Pause":
return "p";
case "Load":
return "l";
case "Reset":
return "r";
case "Devamp":
return "d";
case "GoTo":
return "G";
case "Target":
return "R";
case "Arm":
return "A";
case "Disarm":
return "D";
case "Wait":
return "W";
case "Memo":
return "e";
case "Script":
return "C";
default:
return "";
}
}
}
}
@@ -0,0 +1,70 @@
using Serilog;
using System.Collections.ObjectModel;
using Acr.Settings;
using qController.QItems;
namespace qController
{
public class QStorage
{
public static ObservableCollection<QInstance> qInstances;
static QStorage(){
qInstances = (ObservableCollection<QInstance>)CrossSettings.Current.GetValue(new ObservableCollection<QInstance>().GetType(), "qInstances", null);
if (qInstances == null)
{
Log.Debug("QSTORAGE - No qInstance exists creating one");
qInstances = new ObservableCollection<QInstance>();
updateStorage();
}
}
public static bool AddInstance(string name, string address){
return AddInstance(new QInstance(name, address));
}
public static bool AddInstance(QInstance q){
if(!Contains(q.name, q.address)){
qInstances.Add(q);
updateStorage();
return true;
}else{
return false;
}
}
public static void RemoveInstance(string name, string address){
foreach (var item in qInstances)
{
if(item.address == address && item.name == name){
RemoveInstance(item);
return;
}
}
}
public static void RemoveInstance(QInstance q){
qInstances.Remove(q);
updateStorage();
}
private static void updateStorage(){
CrossSettings.Current.SetValue("qInstances", qInstances);
}
public static bool Contains(string name, string address){
foreach (var item in qInstances)
{
Log.Information("Item name: " + item.name + " Found Name: " + name);
if (item.address == address)
{
return true;
}
}
return false;
}
public bool IsEmpty(){
return qInstances.Count == 0;
}
}
}