mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-21 15:09:18 +00:00
Cleanup
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid81" />
|
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid81" />
|
||||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="monoandroid81" />
|
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="monoandroid81" />
|
||||||
<package id="Splat" version="8.0.1" targetFramework="monoandroid81" />
|
<package id="Splat" version="8.0.5" targetFramework="monoandroid81" />
|
||||||
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid71" />
|
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid71" />
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<HintPath>..\packages\Acr.Settings.9.0.1\lib\monoandroid80\Acr.Settings.dll</HintPath>
|
<HintPath>..\packages\Acr.Settings.9.0.1\lib\monoandroid80\Acr.Settings.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Splat">
|
<Reference Include="Splat">
|
||||||
<HintPath>..\packages\Splat.8.0.1\lib\monoandroid81\Splat.dll</HintPath>
|
<HintPath>..\packages\Splat.8.0.5\lib\monoandroid81\Splat.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Reactive">
|
<Reference Include="System.Reactive">
|
||||||
<HintPath>..\packages\System.Reactive.4.1.5\lib\netstandard2.0\System.Reactive.dll</HintPath>
|
<HintPath>..\packages\System.Reactive.4.1.5\lib\netstandard2.0\System.Reactive.dll</HintPath>
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Forms;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
@@ -11,7 +10,8 @@ namespace qController
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public QButton(QCommand command){
|
public QButton(QCommand command)
|
||||||
|
{
|
||||||
qCommand = command;
|
qCommand = command;
|
||||||
Text = qCommand.text;
|
Text = qCommand.text;
|
||||||
TextColor = Color.Black;
|
TextColor = Color.Black;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using Xamarin.Forms;
|
|||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QControlsBlock: Frame
|
public class QControlsBlock : Frame
|
||||||
{
|
{
|
||||||
Grid mainG;
|
Grid mainG;
|
||||||
QController qController;
|
QController qController;
|
||||||
@@ -14,8 +14,6 @@ namespace qController
|
|||||||
{
|
{
|
||||||
qController = controller;
|
qController = controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Margin = new Thickness(10);
|
Margin = new Thickness(10);
|
||||||
Padding = new Thickness(0);
|
Padding = new Thickness(0);
|
||||||
IsVisible = true;
|
IsVisible = true;
|
||||||
@@ -37,7 +35,8 @@ namespace qController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDefaultButtons(){
|
void setDefaultButtons()
|
||||||
|
{
|
||||||
List<QButton> buttons = new List<QButton>();
|
List<QButton> buttons = new List<QButton>();
|
||||||
|
|
||||||
buttons.Add(new QButton(QCommands.PREVIOUS));
|
buttons.Add(new QButton(QCommands.PREVIOUS));
|
||||||
@@ -65,7 +64,7 @@ namespace qController
|
|||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
int column = 0;
|
int column = 0;
|
||||||
for(int i = 0; i < buttons.Count; i++)
|
for (int i = 0; i < buttons.Count; i++)
|
||||||
{
|
{
|
||||||
QButton b = buttons[i];
|
QButton b = buttons[i];
|
||||||
b.Clicked += sendOSC;
|
b.Clicked += sendOSC;
|
||||||
@@ -85,7 +84,8 @@ namespace qController
|
|||||||
Content = mainG;
|
Content = mainG;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomButtons(List<QCommand> commands){
|
public void setCustomButtons(List<QCommand> commands)
|
||||||
|
{
|
||||||
mainG = new Grid
|
mainG = new Grid
|
||||||
{
|
{
|
||||||
Padding = new Thickness(0),
|
Padding = new Thickness(0),
|
||||||
@@ -104,7 +104,7 @@ namespace qController
|
|||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
int column = 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]);
|
QButton b = new QButton(commands[i]);
|
||||||
b.Clicked += sendOSC;
|
b.Clicked += sendOSC;
|
||||||
@@ -126,7 +126,8 @@ namespace qController
|
|||||||
|
|
||||||
void sendOSC(object sender, EventArgs e)
|
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 workspace_prefix = "/workspace/" + qController.qWorkspace.workspace_id;
|
||||||
string command = workspace_prefix + ((QButton)sender).qCommand.osc;
|
string command = workspace_prefix + ((QButton)sender).qCommand.osc;
|
||||||
qController.qClient.sendStringUDP(command);
|
qController.qClient.sendStringUDP(command);
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
using System;
|
using Xamarin.Forms;
|
||||||
using System.Net;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
using SharpOSC;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public class QInstance : ViewCell
|
public class QInstance : ViewCell
|
||||||
{
|
{
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
@@ -38,5 +31,4 @@ namespace qController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Forms;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
//IP Address verification
|
//IP Address verification
|
||||||
//IMPLEMENT A ISREACHABLE METHOD TO BE ABLE TO DISPLAY ONLINE QINSTANCES
|
//IMPLEMENT A ISREACHABLE METHOD TO BE ABLE TO DISPLAY ONLINE QINSTANCES
|
||||||
using System;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
//Class used to facilitate communication with a QInstance
|
//Class used to facilitate communication with a QInstance
|
||||||
//Listens for incoming messages via qReceiver (UDP) and tcpSender (TCP)
|
//Listens for incoming messages via qReceiver (UDP) and tcpSender (TCP)
|
||||||
//WEIRD MESSAGE PARSING RULES NEED FIXED
|
//WEIRD MESSAGE PARSING RULES NEED FIXED
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using SharpOSC;
|
using SharpOSC;
|
||||||
using Newtonsoft.Json;
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QClient
|
public class QClient
|
||||||
|
|||||||
@@ -3,10 +3,7 @@
|
|||||||
//Also contains the local QWorkspace object which stores all the information that is used in displaying
|
//Also contains the local QWorkspace object which stores all the information that is used in displaying
|
||||||
//STILL NEED TO WORK ON PASSWORD PROTECTED WORKSPACES
|
//STILL NEED TO WORK ON PASSWORD PROTECTED WORKSPACES
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Xamarin.Forms;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
@@ -15,7 +12,7 @@ namespace qController
|
|||||||
|
|
||||||
public QUpdater qUpdater;
|
public QUpdater qUpdater;
|
||||||
public QClient qClient;
|
public QClient qClient;
|
||||||
public QWorkSpace qWorkspace;
|
public QWorkspace qWorkspace;
|
||||||
public string playbackPosition;
|
public string playbackPosition;
|
||||||
public Stopwatch sw;
|
public Stopwatch sw;
|
||||||
public QController(string address, int port)
|
public QController(string address, int port)
|
||||||
@@ -23,19 +20,15 @@ namespace qController
|
|||||||
qClient = new QClient(address, port);
|
qClient = new QClient(address, port);
|
||||||
qUpdater = new QUpdater(this);
|
qUpdater = new QUpdater(this);
|
||||||
|
|
||||||
//Connect();
|
|
||||||
//Connect();
|
|
||||||
//KickOff();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Connect(string workspace_id)
|
public void Connect(string workspace_id)
|
||||||
{
|
{
|
||||||
Console.WriteLine("QCONTROLLER CONNECT CALLED: " + workspace_id);
|
Console.WriteLine("QCONTROLLER CONNECT CALLED: " + workspace_id);
|
||||||
qWorkspace = new QWorkSpace();
|
qWorkspace = new QWorkspace();
|
||||||
qWorkspace.workspace_id = workspace_id;
|
qWorkspace.workspace_id = workspace_id;
|
||||||
qUpdater.Start();
|
qUpdater.Start();
|
||||||
qClient.sendStringUDP("/connect");
|
qClient.sendArgsUDP("/workspace/"+workspace_id+"/connect");
|
||||||
qClient.sendArgsUDP("/workspace/"+workspace_id+"/updates", 1);
|
qClient.sendArgsUDP("/workspace/"+workspace_id+"/updates", 1);
|
||||||
qClient.sendAndReceiveString("/workspace/"+workspace_id+"/cueLists");
|
qClient.sendAndReceiveString("/workspace/"+workspace_id+"/cueLists");
|
||||||
}
|
}
|
||||||
@@ -47,17 +40,19 @@ namespace qController
|
|||||||
|
|
||||||
public void Disconnect()
|
public void Disconnect()
|
||||||
{
|
{
|
||||||
qClient.sendStringUDP("/disconnect");
|
qClient.sendStringUDP("/workspace/"+qWorkspace.workspace_id+"/disconnect");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ConnectWithPass(string pass)
|
public void ConnectWithPass(string pass)
|
||||||
{
|
{
|
||||||
qClient.sendArgsUDP("/connect", pass);
|
qClient.sendArgsUDP("/workspace/" + qWorkspace.workspace_id + "/connect", pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Kill(){
|
public void Kill(){
|
||||||
qUpdater.Kill();
|
if (qUpdater != null)
|
||||||
qClient.Close();
|
qUpdater.Kill();
|
||||||
|
if (qClient != null)
|
||||||
|
qClient.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
//Currently unused would like to reimplement eventually
|
//Currently unused would like to reimplement eventually
|
||||||
//Currently being done in qConnectionPage.xaml.cs Scan() method
|
//Currently being done in qConnectionPage.xaml.cs Scan() method
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Zeroconf;
|
using Zeroconf;
|
||||||
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QFinder
|
public class QFinder
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System;
|
|
||||||
using SharpOSC;
|
using SharpOSC;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@@ -18,7 +17,7 @@ namespace qController
|
|||||||
|
|
||||||
public class WorkspaceEventArgs : EventArgs
|
public class WorkspaceEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public QWorkSpace UpdatedWorkspace
|
public QWorkspace UpdatedWorkspace
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
@@ -45,7 +44,7 @@ namespace qController
|
|||||||
|
|
||||||
public class WorkspaceInfoArgs : EventArgs
|
public class WorkspaceInfoArgs : EventArgs
|
||||||
{
|
{
|
||||||
public List<QInfo> WorkspaceInfo
|
public List<QWorkspaceInfo> WorkspaceInfo
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
@@ -155,7 +154,7 @@ namespace qController
|
|||||||
public void ParseQInfo(OscMessage msg)
|
public void ParseQInfo(OscMessage msg)
|
||||||
{
|
{
|
||||||
JToken qInfo = OSC2JSON(msg);
|
JToken qInfo = OSC2JSON(msg);
|
||||||
List<QInfo> qWorkspaceInfo = JsonConvert.DeserializeObject<List<QInfo>>(qInfo.ToString());
|
List<QWorkspaceInfo> qWorkspaceInfo = JsonConvert.DeserializeObject<List<QWorkspaceInfo>>(qInfo.ToString());
|
||||||
OnWorkspaceInfoReceived(qWorkspaceInfo);
|
OnWorkspaceInfoReceived(qWorkspaceInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +162,7 @@ namespace qController
|
|||||||
{
|
{
|
||||||
if (msg.Arguments.Count > 0)
|
if (msg.Arguments.Count > 0)
|
||||||
{
|
{
|
||||||
QWorkSpace workspace = JsonConvert.DeserializeObject<QWorkSpace>(msg.Arguments[0].ToString());
|
QWorkspace workspace = JsonConvert.DeserializeObject<QWorkspace>(msg.Arguments[0].ToString());
|
||||||
OnWorkspaceUpdated(workspace);
|
OnWorkspaceUpdated(workspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +183,7 @@ namespace qController
|
|||||||
return json.GetValue("data");
|
return json.GetValue("data");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnWorkspaceUpdated(QWorkSpace workspace)
|
protected virtual void OnWorkspaceUpdated(QWorkspace workspace)
|
||||||
{
|
{
|
||||||
if (WorkspaceUpdated != null)
|
if (WorkspaceUpdated != null)
|
||||||
WorkspaceUpdated(this, new WorkspaceEventArgs() { UpdatedWorkspace = workspace });
|
WorkspaceUpdated(this, new WorkspaceEventArgs() { UpdatedWorkspace = workspace });
|
||||||
@@ -221,7 +220,7 @@ namespace qController
|
|||||||
if (WorkspaceDisconnect != null)
|
if (WorkspaceDisconnect != null)
|
||||||
WorkspaceDisconnect(this, new EventArgs());
|
WorkspaceDisconnect(this, new EventArgs());
|
||||||
}
|
}
|
||||||
protected virtual void OnWorkspaceInfoReceived(List<QInfo> workspaces)
|
protected virtual void OnWorkspaceInfoReceived(List<QWorkspaceInfo> workspaces)
|
||||||
{
|
{
|
||||||
if (WorkspaceInfoReceived != null)
|
if (WorkspaceInfoReceived != null)
|
||||||
WorkspaceInfoReceived(this, new WorkspaceInfoArgs() { WorkspaceInfo = workspaces });
|
WorkspaceInfoReceived(this, new WorkspaceInfoArgs() { WorkspaceInfo = workspaces });
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
//Class used for receiving workspace update messages
|
//Class used for receiving workspace update messages
|
||||||
|
|
||||||
using System;
|
|
||||||
using SharpOSC;
|
using SharpOSC;
|
||||||
using System.Net;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
//Class used for updating local "copy" of workspace info, cue-lists, cues, etc.
|
//Class used for updating local "copy" of workspace info, cue-lists, cues, etc.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using SharpOSC;
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QUpdater
|
public class QUpdater
|
||||||
@@ -43,7 +42,7 @@ namespace qController
|
|||||||
if (args.Cue.type == "Group")
|
if (args.Cue.type == "Group")
|
||||||
{
|
{
|
||||||
//Console.WriteLine("QUpdater/Updated cue was group cue, sending children request");
|
//Console.WriteLine("QUpdater/Updated cue was group cue, sending children request");
|
||||||
qController.qClient.sendStringUDP("/cue_id/" + args.Cue.uniqueID + "/children");
|
qController.qClient.sendStringUDP("/workspace/"+qController.qWorkspace.workspace_id+"/cue_id/" + args.Cue.uniqueID + "/children");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QCue
|
public class QCue
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QWorkSpace
|
public class QWorkspace
|
||||||
{
|
{
|
||||||
public string status { get; set; }
|
public string status { get; set; }
|
||||||
public List<QCueList> data { get; set; }
|
public List<QCueList> data { get; set; }
|
||||||
public string workspace_id { get; set; }
|
public string workspace_id { get; set; }
|
||||||
public string address { get; set; }
|
public string address { get; set; }
|
||||||
public bool IsPopulated { get; set; }
|
public bool IsPopulated { get; set; }
|
||||||
|
|
||||||
public QCue GetCue(string cue_id)
|
public QCue GetCue(string cue_id)
|
||||||
{
|
{
|
||||||
foreach (var cueList in data)
|
foreach (var cueList in data)
|
||||||
@@ -61,23 +62,6 @@ namespace qController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public QCue GetEmptyGroup()
|
|
||||||
{
|
|
||||||
foreach (var cueList in data)
|
|
||||||
{
|
|
||||||
foreach (var cue in cueList.cues)
|
|
||||||
{
|
|
||||||
if (cue.type == "Group" && cue.cues == null)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Next Group Cue Found");
|
|
||||||
return cue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
IsPopulated = true;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CheckPopulated()
|
public bool CheckPopulated()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < data.Count; i++)
|
for (int i = 0; i < data.Count; i++)
|
||||||
|
|||||||
+1
-2
@@ -1,8 +1,7 @@
|
|||||||
//General information about a QLab Workspace
|
//General information about a QLab Workspace
|
||||||
using System;
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QInfo
|
public class QWorkspaceInfo
|
||||||
{
|
{
|
||||||
public string version { get; set; }
|
public string version { get; set; }
|
||||||
public string displayName { get; set; }
|
public string displayName { get; set; }
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class MenuPageItem
|
public class MenuPageItem
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
namespace qController
|
||||||
namespace qController
|
|
||||||
{
|
{
|
||||||
public class QCommand
|
public class QCommand
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
namespace qController
|
||||||
namespace qController
|
|
||||||
{
|
{
|
||||||
public static class QCommands
|
public static class QCommands
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
namespace qController
|
||||||
namespace qController
|
|
||||||
{
|
{
|
||||||
public static class QIcon
|
public static class QIcon
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using Acr.Settings;
|
using Acr.Settings;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public class QStorage
|
public class QStorage
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Acr.UserDialogs;
|
using Acr.UserDialogs;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Essentials;
|
using Xamarin.Essentials;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
@@ -14,6 +15,7 @@ namespace qController
|
|||||||
public static double Width;
|
public static double Width;
|
||||||
public static double HeightUnit;
|
public static double HeightUnit;
|
||||||
public static double WidthUnit;
|
public static double WidthUnit;
|
||||||
|
|
||||||
public static bool MenuIsPresented
|
public static bool MenuIsPresented
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Threading;
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
@@ -76,7 +74,7 @@ namespace qController
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
public void ChangeToWorkspace(QWorkSpace workspace)
|
public void ChangeToWorkspace(QWorkspace workspace)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < workspace.data.Count; i++)
|
for(int i = 0; i < workspace.data.Count; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using Xamarin.Forms.Xaml;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" Text=""/>
|
<Label x:Name = "menuButton" FontFamily = "{StaticResource qfont}" HorizontalOptions = "Start" VerticalOptions="End" Margin="20,10,20,10" Grid.Row="0" Grid.Column="0" Text=""/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ListView x:Name="listView" HasUnevenRows="true" BackgroundColor="#4A4A4A"></ListView>
|
<ListView x:Name="listView" HasUnevenRows="true" BackgroundColor="#4A4A4A" SeparatorVisibility="None"></ListView>
|
||||||
|
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using System.Net;
|
|
||||||
using System;
|
using System;
|
||||||
using Acr.UserDialogs;
|
using Acr.UserDialogs;
|
||||||
using Acr.Settings;
|
|
||||||
using Zeroconf;
|
using Zeroconf;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
|
||||||
|
|
||||||
namespace qController
|
namespace qController
|
||||||
{
|
{
|
||||||
@@ -52,10 +49,10 @@ namespace qController
|
|||||||
private void InitGUI()
|
private void InitGUI()
|
||||||
{
|
{
|
||||||
NavigationPage.SetHasNavigationBar(this, false);
|
NavigationPage.SetHasNavigationBar(this, false);
|
||||||
listView.ItemsSource = QStorage.qInstances;
|
|
||||||
|
|
||||||
|
//ListView Setup
|
||||||
|
listView.ItemsSource = QStorage.qInstances;
|
||||||
listView.ItemTemplate = new DataTemplate(typeof(QInstanceCell));
|
listView.ItemTemplate = new DataTemplate(typeof(QInstanceCell));
|
||||||
listView.SeparatorVisibility = SeparatorVisibility.None;
|
|
||||||
listView.ItemTapped += (object sender, ItemTappedEventArgs e) =>
|
listView.ItemTapped += (object sender, ItemTappedEventArgs e) =>
|
||||||
{
|
{
|
||||||
// don't do anything if we just de-selected the row
|
// don't do anything if we just de-selected the row
|
||||||
@@ -64,12 +61,11 @@ namespace qController
|
|||||||
((ListView)sender).SelectedItem = null; // de-select the row
|
((ListView)sender).SelectedItem = null; // de-select the row
|
||||||
};
|
};
|
||||||
|
|
||||||
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
//Platform Specific Setup
|
||||||
|
|
||||||
switch (Device.RuntimePlatform)
|
switch (Device.RuntimePlatform)
|
||||||
{
|
{
|
||||||
case Device.iOS:
|
case Device.iOS:
|
||||||
topBar.HeightRequest = Math.Max(App.Height * .09, 65);
|
topBar.HeightRequest = App.Height * .09;
|
||||||
menuButton.FontSize = App.Height * .04;
|
menuButton.FontSize = App.Height * .04;
|
||||||
break;
|
break;
|
||||||
case Device.Android:
|
case Device.Android:
|
||||||
@@ -79,9 +75,12 @@ namespace qController
|
|||||||
}
|
}
|
||||||
|
|
||||||
BackgroundColor = Color.FromHex("4A4A4A");
|
BackgroundColor = Color.FromHex("4A4A4A");
|
||||||
|
|
||||||
|
//MenuButton Setup
|
||||||
var menuButtonGesture = new TapGestureRecognizer();
|
var menuButtonGesture = new TapGestureRecognizer();
|
||||||
menuButtonGesture.Tapped += showMenu;
|
menuButtonGesture.Tapped += showMenu;
|
||||||
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
menuButton.GestureRecognizers.Add(menuButtonGesture);
|
||||||
|
menuButton.Margin = new Thickness(App.WidthUnit * 2, 0, 0, App.WidthUnit * 2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,6 @@
|
|||||||
<PackageReference Include="Xamarin.Forms" Version="4.1.0.581479" />
|
<PackageReference Include="Xamarin.Forms" Version="4.1.0.581479" />
|
||||||
<PackageReference Include="Acr.Settings" Version="9.0.1" />
|
<PackageReference Include="Acr.Settings" Version="9.0.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||||
<PackageReference Include="Rssdp" Version="4.0.2" />
|
|
||||||
<PackageReference Include="Xamarin.Essentials" Version="1.2.0" />
|
<PackageReference Include="Xamarin.Essentials" Version="1.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user