Esempio n. 1
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 /// <param name="disposing">
 /// A value indicating whether the dispose or the finalize process should be started.
 /// </param>
 public static void Dispose(bool disposing)
 {
     if (disposing)
     {
         FormsKeyboard.Stop();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes the <see cref="Manager"/> class with the given values.
        /// </summary>
        /// <param name="device">
        /// A <see cref="GraphicsDevice"/> used to create default objects.
        /// </param>
        /// <param name="font">
        /// A <see cref="SpriteFont"/> used as default <see cref="SpriteFont"/>.
        /// </param>
        public static void Initialize(GraphicsDevice device, SpriteFont font)
        {
            Manager.graphicsDevice = device;
            Manager.spriteBatch    = new ComponentSpriteBatch(device);
            Texture2D texture = new Texture2D(device, 1, 1);

            texture.SetData(new[] { Color.White });
            FormsKeyboard.Initialize();
            DefaultStyles.Initialize(device, font);
            Manager.IsInitialized = true;
        }