public ResizeManager(Surface surface, AreaManager areaManager) { this.surface = surface; this.areaManager = areaManager; MinMoveSpeed = surface.Config.MinMoveSpeed; MaxMoveSpeed = surface.Config.MaxMoveSpeed; surface.KeyDown += surface_KeyDown; nodes = new NodeObject[8]; for (int i = 0; i < 8; i++) { nodes[i] = surface.MakeNode(); } nodes[(int)NodePosition.BottomRight].Order = 10; }
private void CaptureRegion(Surface surface, bool autoHideForm = true) { Capture(() => { Image img = null; Image screenshot = Screenshot.CaptureFullscreen(); surface.Config = Program.Settings.SurfaceOptions; surface.SurfaceImage = screenshot; surface.Prepare(); if (surface.ShowDialog() == DialogResult.OK) { img = surface.GetRegionImage(); } surface.Dispose(); return img; }, autoHideForm); }
private void CaptureRegion(Surface surface) { pbResult.Image = null; try { surface.Config = SurfaceConfig; surface.SurfaceImage = screenshot; surface.Prepare(); surface.ShowDialog(); if (surface.Result == SurfaceResult.Region) { Result = surface.GetRegionImage(); } else if (surface.Result == SurfaceResult.Fullscreen) { Result = screenshot; } } finally { surface.Dispose(); } }
private void CaptureRegion(Surface surface) { pbResult.Image = null; surface.Config = SurfaceConfig; surface.SurfaceImage = screenshot; surface.Prepare(); if (surface.ShowDialog() == DialogResult.OK) { Result = surface.GetRegionImage(); } surface.Dispose(); }