Example #1
0
        public MagnificationForm(PresentationImage image, Point startPointTile, RenderMagnifiedImage render)
		{
			InitializeComponent();

            Visible = false;
			this.DoubleBuffered = false;
			this.SetStyle(ControlStyles.DoubleBuffer, false);
			this.SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
			this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);

			if (Form.ActiveForm != null)
				this.Owner = Form.ActiveForm;

			_startPointTile = startPointTile;
            _render = render;

            _surface = image.ImageRenderer.GetRenderingSurface(Handle, ClientRectangle.Width, ClientRectangle.Height);

            _startPointDesktop = Centre = Cursor.Position;
		}
        public MagnificationForm(PresentationImage image, Point startPointTile, RenderMagnifiedImage render)
        {
            InitializeComponent();

            Visible             = false;
            this.DoubleBuffered = false;
            this.SetStyle(ControlStyles.DoubleBuffer, false);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
            this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);

            if (Form.ActiveForm != null)
            {
                this.Owner = Form.ActiveForm;
            }

            _startPointTile = startPointTile;
            _render         = render;

            _surface = image.ImageRenderer.GetRenderingSurface(Handle, ClientRectangle.Width, ClientRectangle.Height);

            _startPointDesktop = Centre = Cursor.Position;
        }
        public void Open(IPresentationImage image, Point locationTile, RenderMagnifiedImage render)
		{
            _form = new MagnificationForm((PresentationImage)image, locationTile, render);
			_form.Show();
		}
 public void Open(IPresentationImage image, Point locationTile, RenderMagnifiedImage render)
 {
     _form = new MagnificationForm((PresentationImage)image, locationTile, render);
     _form.Show();
 }