mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-11 10:23:59 +00:00
40 lines
940 B
C#
40 lines
940 B
C#
using System;
|
|
using Xamarin.Forms;
|
|
using SharpOSC;
|
|
namespace qController
|
|
{
|
|
public class QUpdater
|
|
{
|
|
private bool active = true;
|
|
private QController qController;
|
|
public QUpdater(QController controller)
|
|
{
|
|
qController = controller;
|
|
}
|
|
|
|
public void Start(){
|
|
active = true;
|
|
Device.StartTimer(TimeSpan.FromSeconds(0.01), () => {
|
|
//qController.sendCommandUDP("/selectedCues");
|
|
UpdateSelected();
|
|
UpdateLevels();
|
|
return active;
|
|
});
|
|
|
|
}
|
|
|
|
public void UpdateSelected()
|
|
{
|
|
qController.qClient.sendAndReceiveString("/selectedCues");
|
|
}
|
|
public void UpdateLevels()
|
|
{
|
|
qController.qClient.sendAndReceiveString("/cue/selected/levels");
|
|
}
|
|
|
|
public void Kill(){
|
|
active = false;
|
|
}
|
|
}
|
|
}
|