示例#1
0
        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;
        }
示例#2
0
        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();
            }
        }