Ejemplo n.º 1
0
        private void Window_MouseMove(object sender, MouseEventArgs e)
        {
            if (!this.IsActive)
            {
                Activate();
            }

            var window = _windows.Find(e.GetPosition(ScreenshotImage));

            if (window == null)
            {
                return;
            }

            if (_currentWindow != null && _currentWindow.Hwnd == window.Hwnd)
            {
                return;
            }

            _currentWindow = window;

            WindowFrame.Width  = window.Size.Width;
            WindowFrame.Height = window.Size.Height;
            WindowFrame.Margin = new Thickness(window.Position.X, window.Position.Y, 0, 0);

            if (WindowFrame.Visibility != Visibility.Visible)
            {
                WindowFrame.Visibility = Visibility.Visible;
            }
        }
Ejemplo n.º 2
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height)
 {
     _fs     = fs;
     _window = window;
     _x      = x;
     _y      = y;
     _width  = width;
     _height = height;
 }
Ejemplo n.º 3
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height)
 {
     _fs = fs;
     _window = window;
     _x = x;
     _y = y;
     _width = width;
     _height = height;
 }
Ejemplo n.º 4
0
 public EffectTransparentScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
 {
     _fs = fs;
     _window = window;
     _x = x;
     _y = y;
     _width = width;
     _height = height;
     _effectBackground = background;
 }
Ejemplo n.º 5
0
 public EffectTransparentScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
 {
     _fs               = fs;
     _window           = window;
     _x                = x;
     _y                = y;
     _width            = width;
     _height           = height;
     _effectBackground = background;
 }
Ejemplo n.º 6
0
        private void Window_MouseUp(object sender, MouseEventArgs e)
        {
            int x = Convert.ToInt32(_currentWindow.Position.X);
            int y = Convert.ToInt32(_currentWindow.Position.Y);

            var rect          = new Int32Rect(Convert.ToInt32(_currentWindow.Position.X), Convert.ToInt32(_currentWindow.Position.Y), Convert.ToInt32(WindowFrame.Width), Convert.ToInt32(WindowFrame.Height));
            var croppedBitmap = new CroppedBitmap(_imageBitmap, rect);

            CroppedScreenshot.Source = croppedBitmap;
            CroppedScreenshot.Width  = WindowFrame.Width;
            CroppedScreenshot.Height = WindowFrame.Height;

            CroppedScreenshot.Margin = new Thickness(_currentWindow.Position.X, _currentWindow.Position.Y, 0, 0);

            _capturedWindow = _currentWindow;

            if (CroppedScreenshot.Visibility != Visibility.Visible)
            {
                CroppedScreenshot.Visibility = Visibility.Visible;
            }
        }
Ejemplo n.º 7
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
     : this(fs, window, x, y, width, height)
 {
     _effectBackground = background;
 }
Ejemplo n.º 8
0
        private void Window_MouseUp(object sender, MouseEventArgs e)
        {
            int x = Convert.ToInt32(_currentWindow.Position.X);
            int y = Convert.ToInt32(_currentWindow.Position.Y);

            var rect = new Int32Rect(Convert.ToInt32(_currentWindow.Position.X), Convert.ToInt32(_currentWindow.Position.Y), Convert.ToInt32(WindowFrame.Width), Convert.ToInt32(WindowFrame.Height));
            var croppedBitmap = new CroppedBitmap(_imageBitmap, rect);

            CroppedScreenshot.Source = croppedBitmap;
            CroppedScreenshot.Width = WindowFrame.Width;
            CroppedScreenshot.Height = WindowFrame.Height;

            CroppedScreenshot.Margin = new Thickness(_currentWindow.Position.X, _currentWindow.Position.Y, 0, 0);

            _capturedWindow = _currentWindow;

            if (CroppedScreenshot.Visibility != Visibility.Visible) CroppedScreenshot.Visibility = Visibility.Visible;
        }
Ejemplo n.º 9
0
        private void Window_MouseMove(object sender, MouseEventArgs e)
        {
            if (!this.IsActive) Activate();

            var window = _windows.Find(e.GetPosition(ScreenshotImage));

            if (window == null) return;

            if (_currentWindow != null && _currentWindow.Hwnd == window.Hwnd) return;

            _currentWindow = window;

            WindowFrame.Width = window.Size.Width;
            WindowFrame.Height = window.Size.Height;
            WindowFrame.Margin = new Thickness(window.Position.X, window.Position.Y, 0, 0);

            if (WindowFrame.Visibility != Visibility.Visible) WindowFrame.Visibility = Visibility.Visible;
        }