Beispiel #1
0
        /// <summary>
        /// Sets a new thumbnail.
        /// </summary>
        /// <param name="handle">Handle to the window to clone.</param>
        /// <param name="region">Region of the window to clone or null.</param>
        public void SetThumbnail(WindowHandle handle, ThumbnailRegion region)
        {
            try
            {
                CurrentThumbnailWindowHandle = handle;
                ThumbnailPanel.SetThumbnailHandle(handle, region);

                //Set aspect ratio (this will resize the form), do not refresh if in fullscreen
                SetAspectRatio(ThumbnailPanel.ThumbnailPixelSize, true);
            }
            catch (Exception ex)
            {
                ThumbnailError(ex, false, "无法创建缩略图");
                ThumbnailPanel.UnsetThumbnail();
            }
        }
Beispiel #2
0
 /// <summary>
 /// Disables the cloned thumbnail.
 /// </summary>
 public void UnsetThumbnail()
 {
     CurrentThumbnailWindowHandle = null;
     ThumbnailPanel.UnsetThumbnail();
     KeepAspectRatio = false;
 }