コード例 #1
0
 public void SendMessage(string message)
 {
     try
     {
         if (Recipient == MessageRecipient.Glyma)
         {
             if (MappingToolController != null)
             {
                 MappingToolController.Invoke("SendGlymaMessage", message);
             }
         }
         else if (Recipient == MessageRecipient.VideoPlayer)
         {
             if (VideoControllerObject != null)
             {
                 VideoControllerObject.Invoke("SendVideoPlayerMessage", message);
             }
         }
     }
     catch (Exception)
     {
         // There is a chance of an exception when the page is refreshed, the video player exits which
         // causes an event that will always fail as the JS no longer exists.
         // Other exceptions could occur if the JavaScript methods had errors in them, TODO: determine if this is a problem that can be mitigated other ways
     }
 }
コード例 #2
0
 public void InvokeReaderContextMenuCallback(string contextMenuItemName, string rootMap, string map, string node)
 {
     if (HasRelatedContentPanel)
     {
         if (MappingToolController != null)
         {
             MappingToolController.Invoke("InvokeReaderContextMenuCallback", contextMenuItemName, rootMap, map, node);
         }
     }
 }