Ejemplo n.º 1
0
 protected void OnScreenshotFailed(ImageHelperError error)
 {
     if (ScreenshotFailed != null)
     {
         ScreenshotFailed(error);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// The screenshot could not be taken. Inform clients.
        /// </summary>
        /// <param name="error"></param>
        void imageHelperScreenshotFailed(ImageHelperError error)
        {
            foreach (var pair in socketsWaitingForScreenshot)
            {
                SendScreenshotToClient(pair.Key, pair.Value, error);
            }

            socketsWaitingForScreenshot = null;
        }
Ejemplo n.º 3
0
 protected void OnScreenshotFailed(ImageHelperError error)
 {
     if (ScreenshotFailed != null)
     {
         ScreenshotFailed(error);
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Send the current screenshot to the client as byte array
        /// </summary>
        public void SendScreenshotToClient(AsyncSocket sender, int width, ImageHelperError error)
        {
            MessageScreenshot screenshot = new MessageScreenshot();

            if (error != null)
            {
                screenshot.Error = error;
            }
            else
            {
                screenshot.Screenshot = imageHelper.resizedScreenshot(width);
            }

            SendMessageToClient(screenshot, sender);
        }