Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Dynamic control creation
Browse files Browse the repository at this point in the history
This change supports controls created dynamically and recieving input from those controls.
  • Loading branch information
payzer committed Mar 13, 2018
1 parent 0721c0d commit bb7c91d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,7 @@ private void ProcessMethod(JsonReader jsonReader)
HandleInteractivityStarted(jsonReader);
break;
case WS_MESSAGE_METHOD_ON_CONTROL_UPDATE:
case WS_MESSAGE_METHOD_ON_CONTROL_CREATE:
HandleControlUpdate(jsonReader);
break;
case WS_MESSAGE_METHOD_ON_GROUP_CREATE:
Expand Down Expand Up @@ -2390,6 +2391,7 @@ private void HandleGiveInput(JsonReader jsonReader)
string participantSessionID = string.Empty;
string transactionID = string.Empty;
InputEvent inputEvent = new InputEvent();

while (jsonReader.Read())
{
if (jsonReader.Value != null)
Expand All @@ -2414,6 +2416,7 @@ private void HandleGiveInput(JsonReader jsonReader)
}
}
}

inputEvent.TransactionID = transactionID;
InteractiveParticipant participant = ParticipantBySessionId(participantSessionID);
if (!_participantsWhoTriggeredGiveInput.ContainsKey(inputEvent.ControlID))
Expand Down Expand Up @@ -3340,6 +3343,7 @@ private void SendJsonString(string jsonString)
private const string WS_MESSAGE_METHOD_PARTICIPANT_UPDATE = "onParticipantUpdate";
private const string WS_MESSAGE_METHOD_READY = "ready";
private const string WS_MESSAGE_METHOD_ON_CONTROL_UPDATE = "onControlUpdate";
private const string WS_MESSAGE_METHOD_ON_CONTROL_CREATE = "onControlCreate";
private const string WS_MESSAGE_METHOD_ON_GROUP_CREATE = "onGroupCreate";
private const string WS_MESSAGE_METHOD_ON_GROUP_UPDATE = "onGroupUpdate";
private const string WS_MESSAGE_METHOD_ON_READY = "onReady";
Expand Down

0 comments on commit bb7c91d

Please sign in to comment.