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; } }
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; }
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; }
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; }
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; }
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; } }
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; }
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; }
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; }