Пример #1
0
 /// <summary>
 /// Handle a request.
 /// </summary>
 /// <param name="pDisplay">The display which called this function.</param>
 /// <param name="pSurface">The surface which this display is hosted on.</param>
 /// <param name="dArguments">A dictionary of arguments which are passed to the function as parameters.</param>
 /// <returns>True if the request was processed sucessfully.  False if there was an error.</returns>
 public bool ProcessRequest(Display pDisplay, Surface pSurface, JSObject dArguments)
 {
     try
     {
         var pResource = new LowestPointCube(pDisplay, dArguments);
         pDisplay.AttachResource(pResource);
         Log.Write("LowestPointCube created relative to '" + pResource.RelativeSurface.Identifier + "'.", pDisplay.ToString(), Log.Type.DisplayInfo);
         return(true);
     }
     catch (Exception e)
     {
         Log.Write("Error creating LowestPointCube: " + e.Message, pDisplay.ToString(), Log.Type.DisplayWarning);
         return(false);
     }
 }
Пример #2
0
 /// <summary>
 /// Handle a request.
 /// </summary>
 /// <param name="pDisplay">The display which called this function.</param>
 /// <param name="pSurface">The surface which this display is hosted on.</param>
 /// <param name="dArguments">A dictionary of arguments which are passed to the function as parameters.</param>
 /// <returns>True if the request was processed sucessfully.  False if there was an error.</returns>
 public bool ProcessRequest(Display pDisplay, Surface pSurface, JSObject dArguments)
 {
     try
     {
         var pResource = new LowestPointCube(pDisplay, dArguments);
         pDisplay.AttachResource(pResource);
         Log.Write("LowestPointCube created relative to '" + pResource.RelativeSurface.Identifier + "'.", pDisplay.ToString(), Log.Type.DisplayInfo); 
         return true;
     }
     catch (Exception e)
     {
         Log.Write("Error creating LowestPointCube: " + e.Message, pDisplay.ToString(), Log.Type.DisplayWarning);
         return false;
     }
 }