Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        public override void Unbind()
        {
            WinSoftGLCanvas winCanvas = this.BindingCanvas;

            if (winCanvas != null)
            {
                winCanvas.MouseMove -= mouseMove;
                winCanvas.MouseDown -= mouseDown;
                winCanvas.MouseUp   -= mouseUp;
                winCanvas.KeyDown   -= keyDown;
                winCanvas.KeyUp     -= keyUp;

                this.BindingCanvas = null;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="canvas"></param>
        public override void Bind(IGLCanvas canvas)
        {
            var winCanvas = canvas as WinSoftGLCanvas;

            if (winCanvas == null)
            {
                throw new ArgumentException();
            }

            winCanvas.MouseMove += mouseMove;
            winCanvas.MouseDown += mouseDown;
            winCanvas.MouseUp   += mouseUp;
            winCanvas.KeyDown   += keyDown;
            winCanvas.KeyUp     += keyUp;
            winCanvas.Resize    += resize;

            this.BindingCanvas = winCanvas;
        }