mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-18 13:44:21 +00:00
Cleanup
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
@@ -11,7 +10,8 @@ namespace qController
|
||||
set;
|
||||
}
|
||||
|
||||
public QButton(QCommand command){
|
||||
public QButton(QCommand command)
|
||||
{
|
||||
qCommand = command;
|
||||
Text = qCommand.text;
|
||||
TextColor = Color.Black;
|
||||
|
||||
@@ -4,22 +4,20 @@ using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
public class QControlsBlock: Frame
|
||||
public class QControlsBlock : Frame
|
||||
{
|
||||
Grid mainG;
|
||||
QController qController;
|
||||
|
||||
|
||||
|
||||
public QControlsBlock(QController controller)
|
||||
{
|
||||
qController = controller;
|
||||
|
||||
|
||||
|
||||
Margin = new Thickness(10);
|
||||
Padding = new Thickness(0);
|
||||
IsVisible = true;
|
||||
|
||||
|
||||
|
||||
BackgroundColor = Color.Transparent;
|
||||
//highlight Button Grid
|
||||
@@ -34,10 +32,11 @@ namespace qController
|
||||
commands.Add(QCommands.RESUME);
|
||||
//setCustomButtons(commands);
|
||||
setDefaultButtons();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void setDefaultButtons(){
|
||||
void setDefaultButtons()
|
||||
{
|
||||
List<QButton> buttons = new List<QButton>();
|
||||
|
||||
buttons.Add(new QButton(QCommands.PREVIOUS));
|
||||
@@ -65,7 +64,7 @@ namespace qController
|
||||
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for(int i = 0; i < buttons.Count; i++)
|
||||
for (int i = 0; i < buttons.Count; i++)
|
||||
{
|
||||
QButton b = buttons[i];
|
||||
b.Clicked += sendOSC;
|
||||
@@ -85,7 +84,8 @@ namespace qController
|
||||
Content = mainG;
|
||||
}
|
||||
|
||||
public void setCustomButtons(List<QCommand> commands){
|
||||
public void setCustomButtons(List<QCommand> commands)
|
||||
{
|
||||
mainG = new Grid
|
||||
{
|
||||
Padding = new Thickness(0),
|
||||
@@ -104,7 +104,7 @@ namespace qController
|
||||
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
for(int i = 0; i < commands.Count; i++)
|
||||
for (int i = 0; i < commands.Count; i++)
|
||||
{
|
||||
QButton b = new QButton(commands[i]);
|
||||
b.Clicked += sendOSC;
|
||||
@@ -126,10 +126,11 @@ namespace qController
|
||||
|
||||
void sendOSC(object sender, EventArgs e)
|
||||
{
|
||||
if(((QButton)sender).qCommand.type == "WORKSPACE"){
|
||||
if (((QButton)sender).qCommand.type == "WORKSPACE")
|
||||
{
|
||||
string workspace_prefix = "/workspace/" + qController.qWorkspace.workspace_id;
|
||||
string command = workspace_prefix + ((QButton)sender).qCommand.osc;
|
||||
qController.qClient.sendStringUDP(command);
|
||||
qController.qClient.sendStringUDP(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using Xamarin.Forms;
|
||||
using SharpOSC;
|
||||
using System.Threading;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
|
||||
|
||||
public class QInstance : ViewCell
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string address { get; set; }
|
||||
public QInstance()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public QInstance(string tName, string tAddress)
|
||||
{
|
||||
@@ -38,5 +31,4 @@ namespace qController
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace qController
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user