Ejemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            if (graphicsDeviceService != null)
            {
                graphicsDeviceService.Release (disposing);
                graphicsDeviceService = null;
            }

            base.Dispose (disposing);
        }
Ejemplo n.º 2
0
        protected override void OnCreateControl()
        {
            // Don't initialize the graphics device if we are running in the designer.
            if (!DesignMode)
            {
                graphicsDeviceService = new ElenimoGraphicsDeviceService (Handle, ClientSize.Width, ClientSize.Height);

                // Register the service, so components like ContentManager can find it.
                services.AddService<IGraphicsDeviceService> (graphicsDeviceService);

                // Give derived classes a chance to initialize themselves.
                Initialize ();
            }

            base.OnCreateControl ();
        }