public override void stopped(float timelineTime, Clock clock) { if (imageDisplay != null) { imageDisplay.Dispose(); imageDisplay = null; } }
public IImageDisplay showImage(String imageName, String cameraName) { IImageDisplay imageDisplay = null; try { using (Stream imageStream = resourceProvider.openFile(imageName)) { imageDisplay = ImageDisplayFactory.createImageDisplay(cameraName); if (imageStream != null) { imageDisplay.setImage(imageStream); } else { Log.Warning("Could not load image {0}.", imageName); } imageDisplay.show(); return(imageDisplay); } } catch (Exception ex) { Log.Warning("Could not display image {0} Reason: {1}", imageName, ex.Message); if (imageDisplay != null) { imageDisplay.Dispose(); } return(null); } }