Ejemplo n.º 1
0
 /// <summary>
 /// Listens to a type event from the given target element.
 /// </summary>
 /// <param name="target">Element to listen to</param>
 /// <param name="type">Type of event fired</param>
 public void RegisterEvent(DisplayElement target, HtmlEventType type)
 {
     if (HasLoaded)
     {
         PerformAction(RegistrationAction.RegisterEvent, target.Id, type);
     }
     else
     {
         throw new Exception("Cannot load register events untill system has loaded");
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Notifies the webview that an event
        /// </summary>
        /// <param name="actionToPerform">The action to send to the HTML page</param>
        /// <param name="id">Which element to send it to</param>
        /// <param name="type">The type of action</param>
        internal void PerformAction(RegistrationAction actionToPerform, String id, HtmlEventType type)
        {
            var msg = new JSON.JsonHelper((int)actionToPerform, id, type.ToString());

            _WEBVIEW_OWNERS[this].SendJavaScript(msg.ToString());
        }