mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-17 05:13:40 +00:00
General Housekeeping
This commit is contained in:
Binary file not shown.
+1
-1
@@ -36,7 +36,7 @@
|
|||||||
<key>XSAppIconAssets</key>
|
<key>XSAppIconAssets</key>
|
||||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.0.4</string>
|
<string>2.0.5</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
|||||||
Binary file not shown.
@@ -80,13 +80,13 @@ namespace qController
|
|||||||
|
|
||||||
connectLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
|
connectLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
|
||||||
connectLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
|
connectLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
|
||||||
connectLabel.Text = "\uF1EB";
|
connectLabel.Text = QIcon.WIFI;
|
||||||
connectLabel.FontSize = 40;
|
connectLabel.FontSize = 40;
|
||||||
connectLabel.TextColor = Color.LimeGreen;
|
connectLabel.TextColor = Color.LimeGreen;
|
||||||
|
|
||||||
deleteLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
|
deleteLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
|
||||||
deleteLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
|
deleteLabel.VerticalOptions = LayoutOptions.CenterAndExpand;
|
||||||
deleteLabel.Text = "\uE802";
|
deleteLabel.Text = QIcon.TRASH_EMPTY;
|
||||||
deleteLabel.FontSize = 40;
|
deleteLabel.FontSize = 40;
|
||||||
deleteLabel.TextColor = Color.Red;
|
deleteLabel.TextColor = Color.Red;
|
||||||
|
|
||||||
@@ -105,6 +105,7 @@ namespace qController
|
|||||||
|
|
||||||
void Connect(object sender, EventArgs e)
|
void Connect(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
App.rootPage.MenuPage.ChangeToControl();
|
||||||
App.NavigationPage.Navigation.PushAsync(new ControlPage(nameLabel.Text,addressLabel.Text));
|
App.NavigationPage.Navigation.PushAsync(new ControlPage(nameLabel.Text,addressLabel.Text));
|
||||||
|
|
||||||
Console.WriteLine("Connect To " + nameLabel.Text + " Pressed");
|
Console.WriteLine("Connect To " + nameLabel.Text + " Pressed");
|
||||||
|
|||||||
@@ -66,14 +66,14 @@ namespace qController
|
|||||||
};
|
};
|
||||||
|
|
||||||
number = new Label {
|
number = new Label {
|
||||||
Text = "N/A",
|
Text = "",
|
||||||
FontAttributes = FontAttributes.Bold,
|
FontAttributes = FontAttributes.Bold,
|
||||||
FontSize = 30,
|
FontSize = 30,
|
||||||
Margin = new Thickness(5)
|
Margin = new Thickness(5)
|
||||||
};
|
};
|
||||||
|
|
||||||
name = new Label {
|
name = new Label {
|
||||||
Text = "N/A",
|
Text = "Loading Workspace....",
|
||||||
FontAttributes = FontAttributes.Bold,
|
FontAttributes = FontAttributes.Bold,
|
||||||
HorizontalTextAlignment = TextAlignment.Center,
|
HorizontalTextAlignment = TextAlignment.Center,
|
||||||
FontSize = 20,
|
FontSize = 20,
|
||||||
@@ -81,7 +81,7 @@ namespace qController
|
|||||||
};
|
};
|
||||||
|
|
||||||
type = new Label {
|
type = new Label {
|
||||||
Text = "",
|
Text = QIcon.SPIN3,
|
||||||
FontFamily = App.QFont,
|
FontFamily = App.QFont,
|
||||||
VerticalTextAlignment = TextAlignment.Center,
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
HorizontalTextAlignment = TextAlignment.End,
|
HorizontalTextAlignment = TextAlignment.End,
|
||||||
@@ -89,14 +89,14 @@ namespace qController
|
|||||||
FontSize = 27
|
FontSize = 27
|
||||||
};
|
};
|
||||||
|
|
||||||
notes = new Label { Text = "Viewing Notes Currently Unavailable" };
|
notes = new Label { Text = "Loading Cue Lists and Playhead Position" };
|
||||||
notes.HorizontalTextAlignment = TextAlignment.Center;
|
notes.HorizontalTextAlignment = TextAlignment.Center;
|
||||||
notes.Margin = new Thickness(0, 0, 0, 10);
|
notes.Margin = new Thickness(0, 0, 0, 10);
|
||||||
|
|
||||||
topGrid.Children.Add(number, 0, 0);
|
topGrid.Children.Add(number, 0, 0);
|
||||||
topGrid.Children.Add(type, 4, 0);
|
topGrid.Children.Add(type, 4, 0);
|
||||||
Grid.SetColumnSpan(number, 2);
|
Grid.SetColumnSpan(number, 3);
|
||||||
Grid.SetColumnSpan(type, 3);
|
Grid.SetColumnSpan(type, 1);
|
||||||
|
|
||||||
bottomGrid.Children.Add(name, 0, 0);
|
bottomGrid.Children.Add(name, 0, 0);
|
||||||
bottomGrid.Children.Add(notes, 0, 1);
|
bottomGrid.Children.Add(notes, 0, 1);
|
||||||
|
|||||||
@@ -7,22 +7,25 @@ namespace qController
|
|||||||
{
|
{
|
||||||
public class QSelectedCueOptionsCell : Frame
|
public class QSelectedCueOptionsCell : Frame
|
||||||
{
|
{
|
||||||
void AudioLevelsUpdated(object source, AudioLevelArgs args)
|
void OnCueInfoUpdated(object source, CueEventArgs args)
|
||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(() => {
|
Device.BeginInvokeOnMainThread(() => {
|
||||||
activeCue = args.cue_id;
|
activeCue = args.Cue.uniqueID;
|
||||||
levels = args.levels;
|
if(args.Cue.levels != null)
|
||||||
if (mainSlider != null)
|
|
||||||
{
|
{
|
||||||
mainSlider.Value = levels[0];
|
levels = args.Cue.levels[0];
|
||||||
}
|
if (mainSlider != null)
|
||||||
if (leftSlider != null)
|
{
|
||||||
{
|
mainSlider.Value = levels[0];
|
||||||
leftSlider.Value = levels[1];
|
}
|
||||||
}
|
if (leftSlider != null)
|
||||||
if (rightSlider != null)
|
{
|
||||||
{
|
leftSlider.Value = levels[1];
|
||||||
rightSlider.Value = levels[2];
|
}
|
||||||
|
if (rightSlider != null)
|
||||||
|
{
|
||||||
|
rightSlider.Value = levels[2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -34,7 +37,7 @@ namespace qController
|
|||||||
Slider rightSlider;
|
Slider rightSlider;
|
||||||
public QSelectedCueOptionsCell(QController qController)
|
public QSelectedCueOptionsCell(QController qController)
|
||||||
{
|
{
|
||||||
qController.qClient.qParser.AudioLevelsUpdated += AudioLevelsUpdated;
|
qController.qClient.qParser.CueInfoUpdated += OnCueInfoUpdated;
|
||||||
Padding = new Thickness(5);
|
Padding = new Thickness(5);
|
||||||
CornerRadius = 20;
|
CornerRadius = 20;
|
||||||
BackgroundColor = Color.FromHex("D8D8D8");
|
BackgroundColor = Color.FromHex("D8D8D8");
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ namespace qController
|
|||||||
|
|
||||||
string Address;
|
string Address;
|
||||||
int Port;
|
int Port;
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void WorkspaceDisconnectHandler(object source, EventArgs args);
|
||||||
|
public event WorkspaceDisconnectHandler WorkspaceDisconnect;
|
||||||
|
|
||||||
public QClient(string address, int port)
|
public QClient(string address, int port)
|
||||||
{
|
{
|
||||||
Address = address;
|
Address = address;
|
||||||
@@ -26,7 +31,6 @@ namespace qController
|
|||||||
tcpSender.MessageReceived += OnMessageReceived;
|
tcpSender.MessageReceived += OnMessageReceived;
|
||||||
qReceiver.UpdateMessageReceived += OnMessageReceived;
|
qReceiver.UpdateMessageReceived += OnMessageReceived;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMessageReceived(object source, MessageEventArgs args)
|
private void OnMessageReceived(object source, MessageEventArgs args)
|
||||||
@@ -73,7 +77,7 @@ namespace qController
|
|||||||
{
|
{
|
||||||
if (msg.Address.Contains("disconnect"))
|
if (msg.Address.Contains("disconnect"))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Workspace is disonnecting");
|
OnWorkspaceDisconnect();
|
||||||
}
|
}
|
||||||
else if (msg.Address.Contains("cue_id"))
|
else if (msg.Address.Contains("cue_id"))
|
||||||
{
|
{
|
||||||
@@ -87,26 +91,25 @@ namespace qController
|
|||||||
qParser.ParseMessage(msg);
|
qParser.ParseMessage(msg);
|
||||||
UpdateSelectedCue();
|
UpdateSelectedCue();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (msg.Address.Contains("workspace"))
|
else if (msg.Address.Contains("workspace"))
|
||||||
{
|
{
|
||||||
UpdateWorkspace("not yet implemented");
|
UpdateWorkspace("not yet implemented");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSpecificCue(string cue_id)
|
public void UpdateSpecificCue(string cue_id)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Updating specific cue: " + cue_id);
|
|
||||||
string valuesForKeys = "[\"displayName\",\"number\",\"type\",\"isBroken\",\"isLoaded\",\"isPaused\",\"isRunning\",\"preWait\",\"duration\",\"postWait\",\"translationX\",\"translationY\",\"opacity\",\"scaleX\",\"scaleY\",\"uniqueID\",\"flagged\",\"listName\",\"colorName\",\"name\",\"armed\",\"notes\"]";
|
string valuesForKeys = "[\"number\",\"uniqueID\",\"flagged\",\"listName\",\"type\",\"colorName\",\"name\",\"armed\",\"displayName\",\"isBroken\",\"isLoaded\",\"isPaused\",\"isRunning\",\"preWait\",\"duration\",\"postWait\",\"translationX\",\"translationY\",\"opacity\",\"scaleX\",\"scaleY\",\"notes\",\"levels\"]";
|
||||||
|
|
||||||
string address = "/cue_id/" + cue_id + "/valuesForKeys";
|
string address = "/cue_id/" + cue_id + "/valuesForKeys";
|
||||||
sendAndReceiveStringArgs(address, valuesForKeys);
|
sendAndReceiveStringArgs(address, valuesForKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSelectedCue()
|
public void UpdateSelectedCue()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Updating selected cue");
|
string valuesForKeys = "[\"number\",\"uniqueID\",\"flagged\",\"listName\",\"type\",\"colorName\",\"name\",\"armed\",\"displayName\",\"isBroken\",\"isLoaded\",\"isPaused\",\"isRunning\",\"preWait\",\"duration\",\"postWait\",\"translationX\",\"translationY\",\"opacity\",\"scaleX\",\"scaleY\",\"notes\",\"levels\"]";
|
||||||
string valuesForKeys = "[\"displayName\",\"number\",\"type\",\"isBroken\",\"isLoaded\",\"isPaused\",\"isRunning\",\"preWait\",\"duration\",\"postWait\",\"translationX\",\"translationY\",\"opacity\",\"scaleX\",\"scaleY\",\"uniqueID\",\"flagged\",\"listName\",\"colorName\",\"name\",\"armed\",\"notes\"]";
|
|
||||||
sendAndReceiveStringArgs("/cue/selected/valuesForKeys", valuesForKeys);
|
sendAndReceiveStringArgs("/cue/selected/valuesForKeys", valuesForKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,6 +118,12 @@ namespace qController
|
|||||||
Console.WriteLine("Workspace needs to be updated: " + ws_id);
|
Console.WriteLine("Workspace needs to be updated: " + ws_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void OnWorkspaceDisconnect()
|
||||||
|
{
|
||||||
|
if (WorkspaceDisconnect != null)
|
||||||
|
WorkspaceDisconnect(this, new EventArgs());
|
||||||
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
udpSender.Close();
|
udpSender.Close();
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ namespace qController
|
|||||||
{
|
{
|
||||||
|
|
||||||
QUpdater qUpdater;
|
QUpdater qUpdater;
|
||||||
QCue selectedCue;
|
|
||||||
public QClient qClient;
|
public QClient qClient;
|
||||||
public QWorkSpace qWorkspace;
|
public QWorkSpace qWorkspace;
|
||||||
public string playbackPosition;
|
public string playbackPosition;
|
||||||
@@ -20,45 +19,11 @@ namespace qController
|
|||||||
qClient = new QClient(address, port);
|
qClient = new QClient(address, port);
|
||||||
qUpdater = new QUpdater(this);
|
qUpdater = new QUpdater(this);
|
||||||
qUpdater.Start();
|
qUpdater.Start();
|
||||||
qClient.qParser.SelectedCueUpdated += this.OnSelectedCueUpdated;
|
|
||||||
qClient.qParser.WorkspaceUpdated += this.OnWorkspaceUpdated;
|
|
||||||
qClient.qParser.PlaybackPositionUpdated += this.OnPlaybackPositionUpdated;
|
|
||||||
qClient.qParser.CueInfoUpdated += this.OnCueUpdateReceived;
|
|
||||||
qClient.qParser.AudioLevelsUpdated += this.OnAudioLevelsUpdated;
|
|
||||||
qClient.qParser.ChildrenUpdated += this.OnChildrenUpdated;
|
|
||||||
qClient.sendArgsUDP("/updates", 1);
|
|
||||||
qClient.sendArgsUDP("/updates", 1);
|
qClient.sendArgsUDP("/updates", 1);
|
||||||
qClient.sendAndReceiveString("/cueLists");
|
qClient.sendAndReceiveString("/cueLists");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnChildrenUpdated(object source, ChildrenEventArgs args)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Children Updated in QController: " + args.cue_id);
|
|
||||||
qWorkspace.UpdateChildren(args.cue_id, args.children);
|
|
||||||
|
|
||||||
foreach (var cueList in qWorkspace.data)
|
|
||||||
{
|
|
||||||
foreach (var cue in cueList.cues)
|
|
||||||
{
|
|
||||||
if (cue.type == "Group")
|
|
||||||
{
|
|
||||||
if (cue.cues == null)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Next Group Cue Found");
|
|
||||||
qClient.sendStringUDP("/cue_id/" + cue.uniqueID + "/children");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnAudioLevelsUpdated(object source, AudioLevelArgs args)
|
|
||||||
{
|
|
||||||
if(qWorkspace != null)
|
|
||||||
qWorkspace.UpdateLevels(args.cue_id, args.levels);
|
|
||||||
}
|
|
||||||
public void Connect()
|
public void Connect()
|
||||||
{
|
{
|
||||||
qClient.sendStringUDP("/connect");
|
qClient.sendStringUDP("/connect");
|
||||||
@@ -74,64 +39,6 @@ namespace qController
|
|||||||
qClient.sendArgsUDP("/connect", pass);
|
qClient.sendArgsUDP("/connect", pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateCueValue(QCue cue, string property, object newValue){
|
|
||||||
//qClient.sendArgs("/cue_id/"+cue.uniqueID+"/"+property, newValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RefreshGroupCues()
|
|
||||||
{
|
|
||||||
if (qWorkspace.ChildrenPopulated())
|
|
||||||
return;
|
|
||||||
foreach (var cueList in qWorkspace.data)
|
|
||||||
{
|
|
||||||
foreach (var cue in cueList.cues)
|
|
||||||
{
|
|
||||||
if (cue.type == "Group")
|
|
||||||
{
|
|
||||||
Console.WriteLine("First Group Cue Found");
|
|
||||||
qClient.sendStringUDP("/cue_id/" + cue.uniqueID + "/children");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnSelectedCueUpdated(object source, CueEventArgs args)
|
|
||||||
{
|
|
||||||
selectedCue = args.Cue;
|
|
||||||
Console.WriteLine("Selected cue updated: " + selectedCue.uniqueID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnWorkspaceUpdated(object source, WorkspaceEventArgs args)
|
|
||||||
{
|
|
||||||
qWorkspace = args.UpdatedWorkspace;
|
|
||||||
Console.WriteLine("Workspace updated in QController: " + qWorkspace.workspace_id);
|
|
||||||
qWorkspace.PrintStats();
|
|
||||||
playbackPosition = null;
|
|
||||||
qClient.UpdateSelectedCue();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnPlaybackPositionUpdated(object source, PlaybackPositionArgs args)
|
|
||||||
{
|
|
||||||
playbackPosition = args.PlaybackPosition;
|
|
||||||
Console.WriteLine("Playback Position updated in QController: " + playbackPosition);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnCueUpdateReceived(object source, CueEventArgs args)
|
|
||||||
{
|
|
||||||
qWorkspace.UpdateCue(args.Cue);
|
|
||||||
Console.WriteLine("Cue updated in QController: " + args.Cue.uniqueID );
|
|
||||||
if (playbackPosition == null)
|
|
||||||
{
|
|
||||||
playbackPosition = args.Cue.uniqueID;
|
|
||||||
}
|
|
||||||
if(args.Cue.type == "Audio" || args.Cue.type == "Mic" || args.Cue.type == "Video")
|
|
||||||
{
|
|
||||||
Console.WriteLine("Cue has audio levels...sending request");
|
|
||||||
qClient.sendStringUDP("/cue_id/" + args.Cue.uniqueID + "/levels");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Kill(){
|
public void Kill(){
|
||||||
qUpdater.Kill();
|
qUpdater.Kill();
|
||||||
qClient.Close();
|
qClient.Close();
|
||||||
|
|||||||
@@ -15,19 +15,8 @@ namespace qController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AudioLevelArgs : EventArgs
|
|
||||||
{
|
|
||||||
public string cue_id
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
public List<double> levels
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class WorkspaceEventArgs : EventArgs
|
public class WorkspaceEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public QWorkSpace UpdatedWorkspace
|
public QWorkSpace UpdatedWorkspace
|
||||||
@@ -36,6 +25,7 @@ namespace qController
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PlaybackPositionArgs : EventArgs
|
public class PlaybackPositionArgs : EventArgs
|
||||||
{
|
{
|
||||||
public string PlaybackPosition
|
public string PlaybackPosition
|
||||||
@@ -44,6 +34,7 @@ namespace qController
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConnectEventArgs : EventArgs
|
public class ConnectEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public string Status
|
public string Status
|
||||||
@@ -52,6 +43,7 @@ namespace qController
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ChildrenEventArgs : EventArgs
|
public class ChildrenEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
public string cue_id
|
public string cue_id
|
||||||
@@ -73,7 +65,6 @@ namespace qController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public delegate void SelectedCueUpdatedHandler(object source, CueEventArgs args);
|
public delegate void SelectedCueUpdatedHandler(object source, CueEventArgs args);
|
||||||
public delegate void AudioLevelsUpdatedHandler(object source, AudioLevelArgs args);
|
|
||||||
public delegate void WorkspaceUpdatedHandler(object source, WorkspaceEventArgs args);
|
public delegate void WorkspaceUpdatedHandler(object source, WorkspaceEventArgs args);
|
||||||
public delegate void CueInfoUpdatedHandler(object source, CueEventArgs args);
|
public delegate void CueInfoUpdatedHandler(object source, CueEventArgs args);
|
||||||
public delegate void PlaybackPositionUpdatedHandler(object source, PlaybackPositionArgs args);
|
public delegate void PlaybackPositionUpdatedHandler(object source, PlaybackPositionArgs args);
|
||||||
@@ -82,7 +73,6 @@ namespace qController
|
|||||||
public event ChildrenUpdateHandler ChildrenUpdated;
|
public event ChildrenUpdateHandler ChildrenUpdated;
|
||||||
public event ConnectionStatusHandler ConnectionStatusChanged;
|
public event ConnectionStatusHandler ConnectionStatusChanged;
|
||||||
public event SelectedCueUpdatedHandler SelectedCueUpdated;
|
public event SelectedCueUpdatedHandler SelectedCueUpdated;
|
||||||
public event AudioLevelsUpdatedHandler AudioLevelsUpdated;
|
|
||||||
public event WorkspaceUpdatedHandler WorkspaceUpdated;
|
public event WorkspaceUpdatedHandler WorkspaceUpdated;
|
||||||
public event CueInfoUpdatedHandler CueInfoUpdated;
|
public event CueInfoUpdatedHandler CueInfoUpdated;
|
||||||
public event PlaybackPositionUpdatedHandler PlaybackPositionUpdated;
|
public event PlaybackPositionUpdatedHandler PlaybackPositionUpdated;
|
||||||
@@ -92,15 +82,10 @@ namespace qController
|
|||||||
{
|
{
|
||||||
if (msg.Address.Contains("valuesForKeys"))
|
if (msg.Address.Contains("valuesForKeys"))
|
||||||
{
|
{
|
||||||
if (msg.Address.Contains("WithArguments"))
|
ParseCueUpdateInfo(msg);
|
||||||
ParseLevelInfo(msg);
|
|
||||||
else
|
|
||||||
ParseCueUpdateInfo(msg);
|
|
||||||
}
|
}
|
||||||
else if (msg.Address.Contains("notes"))
|
else if (msg.Address.Contains("notes"))
|
||||||
ParseNoteInfo(msg);
|
ParseNoteInfo(msg);
|
||||||
else if (msg.Address.Contains("levels"))
|
|
||||||
ParseLevelInfo(msg);
|
|
||||||
else if (msg.Address.Contains("cueLists"))
|
else if (msg.Address.Contains("cueLists"))
|
||||||
ParseWorkspaceInfo(msg);
|
ParseWorkspaceInfo(msg);
|
||||||
else if (msg.Address.Contains("playbackPosition"))
|
else if (msg.Address.Contains("playbackPosition"))
|
||||||
@@ -140,6 +125,7 @@ namespace qController
|
|||||||
public void ParseCueUpdateInfo(OscMessage msg)
|
public void ParseCueUpdateInfo(OscMessage msg)
|
||||||
{
|
{
|
||||||
JToken cueUpdate = OSC2JSON(msg);
|
JToken cueUpdate = OSC2JSON(msg);
|
||||||
|
Console.WriteLine(OSC2JSON(msg).ToString());
|
||||||
QCue cue = JsonConvert.DeserializeObject<QCue>(cueUpdate.ToString());
|
QCue cue = JsonConvert.DeserializeObject<QCue>(cueUpdate.ToString());
|
||||||
OnCueInfoUpdated(cue);
|
OnCueInfoUpdated(cue);
|
||||||
}
|
}
|
||||||
@@ -154,12 +140,6 @@ namespace qController
|
|||||||
//JToken cueInfo = OSC2JSON(msg);
|
//JToken cueInfo = OSC2JSON(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ParseLevelInfo(OscMessage msg){
|
|
||||||
var cue_id = msg.Address.Split('/')[3];
|
|
||||||
JToken levels = OSC2JSON(msg)[0];
|
|
||||||
OnAudioLevelsUpdated(cue_id, levels.ToObject<List<double>>());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ParseWorkspaceInfo(OscMessage msg)
|
public void ParseWorkspaceInfo(OscMessage msg)
|
||||||
{
|
{
|
||||||
if (msg.Arguments.Count > 0)
|
if (msg.Arguments.Count > 0)
|
||||||
@@ -196,11 +176,6 @@ namespace qController
|
|||||||
SelectedCueUpdated(this, new CueEventArgs() { Cue = cue });
|
SelectedCueUpdated(this, new CueEventArgs() { Cue = cue });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnAudioLevelsUpdated(string id, List<double> audioLevels){
|
|
||||||
if (AudioLevelsUpdated != null)
|
|
||||||
AudioLevelsUpdated(this, new AudioLevelArgs { cue_id = id, levels = audioLevels });
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void OnCueInfoUpdated(QCue cue)
|
protected virtual void OnCueInfoUpdated(QCue cue)
|
||||||
{
|
{
|
||||||
if (CueInfoUpdated != null)
|
if (CueInfoUpdated != null)
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ namespace qController
|
|||||||
{
|
{
|
||||||
qController = controller;
|
qController = controller;
|
||||||
updateThread = new Thread(new ThreadStart(UpdateLoop));
|
updateThread = new Thread(new ThreadStart(UpdateLoop));
|
||||||
|
|
||||||
|
qController.qClient.qParser.ChildrenUpdated += OnChildrenUpdated;
|
||||||
|
qController.qClient.qParser.CueInfoUpdated += OnCueUpdateReceived;
|
||||||
|
qController.qClient.qParser.WorkspaceUpdated += OnWorkspaceUpdated;
|
||||||
|
qController.qClient.qParser.PlaybackPositionUpdated += OnPlaybackPositionUpdated;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start(){
|
public void Start(){
|
||||||
@@ -29,6 +35,59 @@ namespace qController
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnCueUpdateReceived(object source, CueEventArgs args)
|
||||||
|
{
|
||||||
|
qController.qWorkspace.UpdateCue(args.Cue);
|
||||||
|
if (qController.playbackPosition == null)
|
||||||
|
{
|
||||||
|
qController.playbackPosition = args.Cue.uniqueID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnChildrenUpdated(object source, ChildrenEventArgs args)
|
||||||
|
{
|
||||||
|
qController.qWorkspace.UpdateChildren(args.cue_id, args.children);
|
||||||
|
|
||||||
|
if (!qController.qWorkspace.IsPopulated)
|
||||||
|
{
|
||||||
|
QCue cue = qController.qWorkspace.GetEmptyGroup();
|
||||||
|
if(cue != null)
|
||||||
|
{
|
||||||
|
qController.qClient.sendStringUDP("/cue_id/" + cue.uniqueID + "/children");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnWorkspaceUpdated(object source, WorkspaceEventArgs args)
|
||||||
|
{
|
||||||
|
qController.qWorkspace = args.UpdatedWorkspace;
|
||||||
|
qController.playbackPosition = null;
|
||||||
|
qController.qClient.UpdateSelectedCue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPlaybackPositionUpdated(object source, PlaybackPositionArgs args)
|
||||||
|
{
|
||||||
|
qController.playbackPosition = args.PlaybackPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshGroupCues()
|
||||||
|
{
|
||||||
|
if (qController.qWorkspace.ChildrenPopulated())
|
||||||
|
return;
|
||||||
|
foreach (var cueList in qController.qWorkspace.data)
|
||||||
|
{
|
||||||
|
foreach (var cue in cueList.cues)
|
||||||
|
{
|
||||||
|
if (cue.type == "Group")
|
||||||
|
{
|
||||||
|
Console.WriteLine("First Group Cue Found");
|
||||||
|
qController.qClient.sendStringUDP("/cue_id/" + cue.uniqueID + "/children");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SendThump()
|
public void SendThump()
|
||||||
{
|
{
|
||||||
qController.qClient.sendStringUDP("/thump");
|
qController.qClient.sendStringUDP("/thump");
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace qController
|
|||||||
{
|
{
|
||||||
public class QCue
|
public class QCue
|
||||||
{
|
{
|
||||||
|
//info loaded from "/cueLists"
|
||||||
public string number { get; set; }
|
public string number { get; set; }
|
||||||
public string uniqueID { get; set; }
|
public string uniqueID { get; set; }
|
||||||
public bool flagged { get; set; }
|
public bool flagged { get; set; }
|
||||||
@@ -13,6 +14,8 @@ namespace qController
|
|||||||
public string colorName { get; set; }
|
public string colorName { get; set; }
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
public bool armed { get; set; }
|
public bool armed { get; set; }
|
||||||
|
|
||||||
|
//info loaded from "/valuesForKeys
|
||||||
public decimal translationX { get; set; }
|
public decimal translationX { get; set; }
|
||||||
public bool isRunning { get; set; }
|
public bool isRunning { get; set; }
|
||||||
public decimal scaleX { get; set; }
|
public decimal scaleX { get; set; }
|
||||||
@@ -27,65 +30,13 @@ namespace qController
|
|||||||
public string displayName { get; set; }
|
public string displayName { get; set; }
|
||||||
public bool isLoaded { get; set; }
|
public bool isLoaded { get; set; }
|
||||||
public string notes { get; set; }
|
public string notes { get; set; }
|
||||||
public List<double> levels { get; set; }
|
public List<List<double>> levels { get; set; }
|
||||||
|
|
||||||
|
//info loaded from /children
|
||||||
public List<QCue> cues { get; set; }
|
public List<QCue> cues { get; set; }
|
||||||
public string getIconString()
|
public string getIconString()
|
||||||
{
|
{
|
||||||
switch (type)
|
return QIcon.GetIconFromType(type);
|
||||||
{
|
|
||||||
case "Group":
|
|
||||||
return "\uF248";
|
|
||||||
case "Audio":
|
|
||||||
return "\uE807";
|
|
||||||
case "Mic":
|
|
||||||
return "\uF130";
|
|
||||||
case "Video":
|
|
||||||
return "\uE805";
|
|
||||||
case "Camera":
|
|
||||||
return "\uE806";
|
|
||||||
case "Text":
|
|
||||||
return "T";
|
|
||||||
case "Light":
|
|
||||||
return "\uF0EB";
|
|
||||||
case "Fade":
|
|
||||||
return "\uF1DE";
|
|
||||||
case "Network":
|
|
||||||
return "\uF192";
|
|
||||||
case "MIDI":
|
|
||||||
return "";
|
|
||||||
case "MIDI File":
|
|
||||||
return "\uE804";
|
|
||||||
case "Timecode":
|
|
||||||
return "\uE808";
|
|
||||||
case "Start":
|
|
||||||
return "\uE809";
|
|
||||||
case "Stop":
|
|
||||||
return "\uE80A";
|
|
||||||
case "Pause":
|
|
||||||
return "\uE80B";
|
|
||||||
case "Load":
|
|
||||||
return "\uE80E";
|
|
||||||
case "Reset":
|
|
||||||
return "\uE80F";
|
|
||||||
case "Devamp":
|
|
||||||
return "\uE80C";
|
|
||||||
case "GoTo":
|
|
||||||
return "\uF178";
|
|
||||||
case "Target":
|
|
||||||
return "\uE80D";
|
|
||||||
case "Arm":
|
|
||||||
return "\uE810";
|
|
||||||
case "Disarm":
|
|
||||||
return "";
|
|
||||||
case "Wait":
|
|
||||||
return "\uF250";
|
|
||||||
case "Memo":
|
|
||||||
return "\uF27B";
|
|
||||||
case "Script":
|
|
||||||
return "\uE811";
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,20 +9,20 @@ namespace qController
|
|||||||
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 QCue GetCue(string cue_id)
|
public QCue GetCue(string cue_id)
|
||||||
{
|
{
|
||||||
QCue returnCue = null;
|
|
||||||
foreach (var cueList in data)
|
foreach (var cueList in data)
|
||||||
{
|
{
|
||||||
foreach (var cue in cueList.cues)
|
foreach (var cue in cueList.cues)
|
||||||
{
|
{
|
||||||
if(cue.uniqueID == cue_id)
|
if(cue.uniqueID == cue_id)
|
||||||
{
|
{
|
||||||
returnCue = cue;
|
return cue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return returnCue;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateCue(QCue cue)
|
public void UpdateCue(QCue cue)
|
||||||
@@ -34,6 +34,7 @@ namespace qController
|
|||||||
if(data[i].cues[j].uniqueID == cue.uniqueID)
|
if(data[i].cues[j].uniqueID == cue.uniqueID)
|
||||||
{
|
{
|
||||||
data[i].cues[j] = cue;
|
data[i].cues[j] = cue;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,25 +51,28 @@ namespace qController
|
|||||||
if(data[i].cues[j].type == "Group")
|
if(data[i].cues[j].type == "Group")
|
||||||
{
|
{
|
||||||
data[i].cues[j].cues = children;
|
data[i].cues[j].cues = children;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateLevels(string cue_id, List<double> levels)
|
public QCue GetEmptyGroup()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < data.Count; i++)
|
foreach (var cueList in data)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < data[i].cues.Count; j++)
|
foreach (var cue in cueList.cues)
|
||||||
{
|
{
|
||||||
if (data[i].cues[j].uniqueID == cue_id)
|
if (cue.type == "Group" && cue.cues == null)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Cue found and levels updated");
|
Console.WriteLine("Next Group Cue Found");
|
||||||
data[i].cues[j].levels = levels;
|
return cue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
IsPopulated = true;
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ChildrenPopulated()
|
public bool ChildrenPopulated()
|
||||||
@@ -79,10 +83,12 @@ namespace qController
|
|||||||
{
|
{
|
||||||
if (data[i].cues[j].type == "Group" && data[i].cues[j].cues == null)
|
if (data[i].cues[j].type == "Group" && data[i].cues[j].cues == null)
|
||||||
{
|
{
|
||||||
|
IsPopulated = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
IsPopulated = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +97,6 @@ namespace qController
|
|||||||
foreach (var cueList in data)
|
foreach (var cueList in data)
|
||||||
{
|
{
|
||||||
Console.WriteLine(cueList.listName + "("+ cueList.cues.Count + " cues)");
|
Console.WriteLine(cueList.listName + "("+ cueList.cues.Count + " cues)");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
using System;
|
||||||
|
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 SPIN3 = "\uE832";
|
||||||
|
|
||||||
|
public const string MENU = "\uF0C9";
|
||||||
|
|
||||||
|
public const string LIGHTBULB = "\uF0CB";
|
||||||
|
|
||||||
|
public const string MIC = "\uF130";
|
||||||
|
|
||||||
|
public const string MINUS_SQUARED = "\uF146";
|
||||||
|
|
||||||
|
public const string RIGHT = "\uF148";
|
||||||
|
|
||||||
|
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 = "\uF251";
|
||||||
|
|
||||||
|
public const string COMMENTING_O = "\uF27B";
|
||||||
|
|
||||||
|
|
||||||
|
public static string GetIconFromType(string type)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case "Group":
|
||||||
|
return OBJECT_UNGROUP;
|
||||||
|
case "Audio":
|
||||||
|
return VOLUME_UP;
|
||||||
|
case "Mic":
|
||||||
|
return MIC;
|
||||||
|
case "Video":
|
||||||
|
return VIDEO;
|
||||||
|
case "Camera":
|
||||||
|
return VIDEOCAM;
|
||||||
|
case "Text":
|
||||||
|
return "T";
|
||||||
|
case "Light":
|
||||||
|
return LIGHTBULB;
|
||||||
|
case "Fade":
|
||||||
|
return SLIDERS;
|
||||||
|
case "Network":
|
||||||
|
return DOT_CIRCLED;
|
||||||
|
case "MIDI":
|
||||||
|
return "";
|
||||||
|
case "MIDI File":
|
||||||
|
return MUSIC;
|
||||||
|
case "Timecode":
|
||||||
|
return CLOCK;
|
||||||
|
case "Start":
|
||||||
|
return PLAY;
|
||||||
|
case "Stop":
|
||||||
|
return STOP;
|
||||||
|
case "Pause":
|
||||||
|
return PAUSE;
|
||||||
|
case "Load":
|
||||||
|
return CHART_PIE;
|
||||||
|
case "Reset":
|
||||||
|
return UNDO;
|
||||||
|
case "Devamp":
|
||||||
|
return CW;
|
||||||
|
case "GoTo":
|
||||||
|
return RIGHT;
|
||||||
|
case "Target":
|
||||||
|
return TARGET;
|
||||||
|
case "Arm":
|
||||||
|
return POWER;
|
||||||
|
case "Disarm":
|
||||||
|
return "";
|
||||||
|
case "Wait":
|
||||||
|
return HOURGLASS_O;
|
||||||
|
case "Memo":
|
||||||
|
return COMMENTING_O;
|
||||||
|
case "Script":
|
||||||
|
return QRCODE;
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,11 +18,9 @@ namespace qController
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
qController = new QController(address, 53000);
|
qController = new QController(address, 53000);
|
||||||
qController.qClient.qParser.SelectedCueUpdated += SelectedCueUpdated;
|
|
||||||
qController.qClient.qParser.WorkspaceUpdated += WorkspaceUpdated;
|
qController.qClient.qParser.WorkspaceUpdated += WorkspaceUpdated;
|
||||||
qController.qClient.qParser.PlaybackPositionUpdated += PlaybackPositionUpdated;
|
qController.qClient.qParser.PlaybackPositionUpdated += PlaybackPositionUpdated;
|
||||||
qController.qClient.qParser.CueInfoUpdated += OnCueUpdateReceived;
|
qController.qClient.qParser.CueInfoUpdated += OnCueUpdateReceived;
|
||||||
qController.qClient.qParser.ConnectionStatusChanged += OnConnectionStatusChanged;
|
|
||||||
qController.qClient.qParser.ChildrenUpdated += OnChildrenUpdated;
|
qController.qClient.qParser.ChildrenUpdated += OnChildrenUpdated;
|
||||||
instanceName.Text = name;
|
instanceName.Text = name;
|
||||||
App.rootPage.MenuItemSelected += OnMenuItemSelected;
|
App.rootPage.MenuItemSelected += OnMenuItemSelected;
|
||||||
@@ -31,58 +29,6 @@ namespace qController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnChildrenUpdated(object source, ChildrenEventArgs args)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Children Updated in ControlPage: " + args.cue_id);
|
|
||||||
qController.qWorkspace.UpdateChildren(args.cue_id, args.children);
|
|
||||||
if (qController.qWorkspace.ChildrenPopulated())
|
|
||||||
{
|
|
||||||
Device.BeginInvokeOnMainThread(() =>
|
|
||||||
{
|
|
||||||
if (App.MenuIsPresented)
|
|
||||||
{
|
|
||||||
//App.MenuIsPresented = false;
|
|
||||||
App.rootPage.MenuPage.ChangeToWorkspace(qController.qWorkspace);
|
|
||||||
//App.MenuIsPresented = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
App.rootPage.MenuPage.ChangeToWorkspace(qController.qWorkspace);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
qController.qClient.UpdateSelectedCue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnConnectionStatusChanged(object source, ConnectEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.Status == "ok")
|
|
||||||
{
|
|
||||||
Console.WriteLine("Workspace has successfully connected");
|
|
||||||
}
|
|
||||||
else if (args.Status == "badpass")
|
|
||||||
{
|
|
||||||
Console.WriteLine("Password incorrect or no password supplied");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine("Workspace not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnMenuItemSelected(object source, MenuEventArgs args)
|
|
||||||
{
|
|
||||||
if (args.Command.Contains("/"))
|
|
||||||
{
|
|
||||||
Console.WriteLine("Cue selected: " + args.Command);
|
|
||||||
qController.qClient.sendStringUDP(args.Command);
|
|
||||||
}else if (args.Command == "disconnect")
|
|
||||||
{
|
|
||||||
Back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitGUI()
|
private void InitGUI()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -94,7 +40,7 @@ namespace qController
|
|||||||
topBar.BackgroundColor = Color.FromHex("71AEFF");
|
topBar.BackgroundColor = Color.FromHex("71AEFF");
|
||||||
|
|
||||||
BackgroundColor = Color.FromHex("4A4A4A");
|
BackgroundColor = Color.FromHex("4A4A4A");
|
||||||
menuButton.Text = "\uF0C9";
|
menuButton.Text = QIcon.MENU;
|
||||||
switch (Device.RuntimePlatform)
|
switch (Device.RuntimePlatform)
|
||||||
{
|
{
|
||||||
case Device.iOS:
|
case Device.iOS:
|
||||||
@@ -162,7 +108,6 @@ namespace qController
|
|||||||
row = 0;
|
row = 0;
|
||||||
column = 2;
|
column = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QButton goButton = new QButton("GO","/go");
|
QButton goButton = new QButton("GO","/go");
|
||||||
@@ -194,22 +139,6 @@ namespace qController
|
|||||||
App.NavigationPage.Navigation.PopAsync();
|
App.NavigationPage.Navigation.PopAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SelectedCueUpdated(object sender, CueEventArgs e){
|
|
||||||
Device.BeginInvokeOnMainThread(()=>{
|
|
||||||
if (e.Cue.type.Equals("Audio"))
|
|
||||||
{
|
|
||||||
//Console.WriteLine("CUE IS AN AUDIO CUE");
|
|
||||||
sLayout.Children.Add(qSelectedCueOptions);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Console.WriteLine("CUE IS NOT AN AUDIO CUE");
|
|
||||||
sLayout.Children.Remove(qSelectedCueOptions);
|
|
||||||
}
|
|
||||||
qCell.UpdateSelectedCue(e.Cue);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WorkspaceUpdated(object sender, WorkspaceEventArgs e)
|
public void WorkspaceUpdated(object sender, WorkspaceEventArgs e)
|
||||||
{
|
{
|
||||||
if(e.UpdatedWorkspace.data.Count > 0)
|
if(e.UpdatedWorkspace.data.Count > 0)
|
||||||
@@ -248,7 +177,7 @@ namespace qController
|
|||||||
Console.WriteLine("Cue that was updated is equal to the playback position.");
|
Console.WriteLine("Cue that was updated is equal to the playback position.");
|
||||||
Device.BeginInvokeOnMainThread(() =>
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
if (args.Cue.type.Equals("Audio"))
|
if (args.Cue.levels != null)
|
||||||
sLayout.Children.Add(qSelectedCueOptions);
|
sLayout.Children.Add(qSelectedCueOptions);
|
||||||
else
|
else
|
||||||
sLayout.Children.Remove(qSelectedCueOptions);
|
sLayout.Children.Remove(qSelectedCueOptions);
|
||||||
@@ -257,6 +186,42 @@ namespace qController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnChildrenUpdated(object source, ChildrenEventArgs args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Children Updated in ControlPage: " + args.cue_id);
|
||||||
|
qController.qWorkspace.UpdateChildren(args.cue_id, args.children);
|
||||||
|
if (qController.qWorkspace.ChildrenPopulated())
|
||||||
|
{
|
||||||
|
Device.BeginInvokeOnMainThread(() =>
|
||||||
|
{
|
||||||
|
if (App.MenuIsPresented)
|
||||||
|
{
|
||||||
|
//App.MenuIsPresented = false;
|
||||||
|
App.rootPage.MenuPage.ChangeToWorkspace(qController.qWorkspace);
|
||||||
|
//App.MenuIsPresented = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
App.rootPage.MenuPage.ChangeToWorkspace(qController.qWorkspace);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
qController.qClient.UpdateSelectedCue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnMenuItemSelected(object source, MenuEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.Command.Contains("/"))
|
||||||
|
{
|
||||||
|
qController.qClient.sendStringUDP(args.Command);
|
||||||
|
}
|
||||||
|
else if (args.Command == "disconnect")
|
||||||
|
{
|
||||||
|
Back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnDisappearing()
|
protected override void OnDisappearing()
|
||||||
{
|
{
|
||||||
base.OnDisappearing();
|
base.OnDisappearing();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
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
|
||||||
@@ -69,16 +70,19 @@ namespace qController
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public void ChangeToControl()
|
||||||
public void ChangeToWorkspace(QWorkSpace workspace)
|
|
||||||
{
|
{
|
||||||
items.Clear();
|
items.Clear();
|
||||||
items.Add(new MenuPageItem
|
items.Add(new MenuPageItem
|
||||||
{
|
{
|
||||||
Title = "Disconnect",
|
Title = "Disconnect",
|
||||||
Icon = "\uE803",
|
Icon = QIcon.CANCEL,
|
||||||
Command = "disconnect"
|
Command = "disconnect"
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
public void ChangeToWorkspace(QWorkSpace workspace)
|
||||||
|
{
|
||||||
|
ChangeToControl();
|
||||||
foreach (var cueList in workspace.data)
|
foreach (var cueList in workspace.data)
|
||||||
{
|
{
|
||||||
items.Add(new MenuPageItem
|
items.Add(new MenuPageItem
|
||||||
@@ -90,7 +94,6 @@ namespace qController
|
|||||||
foreach (var cue in cueList.cues)
|
foreach (var cue in cueList.cues)
|
||||||
{
|
{
|
||||||
AddSubCues(cue, 0);
|
AddSubCues(cue, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,10 +125,10 @@ namespace qController
|
|||||||
});
|
});
|
||||||
|
|
||||||
//uncomment to load nested group cues
|
//uncomment to load nested group cues
|
||||||
/*foreach (var sub_cue in cue.cues)
|
foreach (var sub_cue in cue.cues)
|
||||||
{
|
{
|
||||||
AddSubCues(sub_cue,level + 1);
|
AddSubCues(sub_cue,level + 1);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user