Ejemplo n.º 1
0
        /// <summary>
        /// Form closing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TileSetForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (Batch != null)
            {
                Batch.Dispose();
            }
            Batch = null;

            if (TileSet != null)
            {
                TileSet.Dispose();
            }
            TileSet = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;

            if (BMFont != null)
            {
                BMFont.Dispose();
            }
            BMFont = null;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Dispose resources
        /// </summary>
        /// <param name="disposing"></param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);


            if (TileSet != null)
            {
                TileSet.Dispose();
            }
            TileSet = null;

            if (SpriteBatch != null)
            {
                SpriteBatch.Dispose();
            }
            SpriteBatch = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Form closing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DungeonForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            DrawTimer.Stop();

            if (Dungeon != null)
            {
                Dungeon.Dispose();
            }
            Dungeon = null;

            if (SpriteBatch != null)
            {
                SpriteBatch.Dispose();
            }
            SpriteBatch = null;

            if (Icons != null)
            {
                Icons.Dispose();
            }
            Icons = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;
        }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AnimationForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (SpriteBatch != null)
            {
                SpriteBatch.Dispose();
            }
            SpriteBatch = null;

            if (Animation != null)
            {
                Animation.Dispose();
            }
            Animation = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Form closing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ItemForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (TileSet != null)
            {
                TileSet.Dispose();
            }
            TileSet = null;

            if (SpriteBatch != null)
            {
                SpriteBatch.Dispose();
            }
            SpriteBatch = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Form closing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BitmapFontForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (Batch != null)
            {
                Batch.Dispose();
            }
            Batch = null;

            if (CurrentFont != null)
            {
                CurrentFont.Dispose();
            }
            CurrentFont = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;
        }
Ejemplo n.º 7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LayoutForm_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
        {
            if (Batch != null)
            {
                Batch.Dispose();
            }
            Batch = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;

            if (CurrentLayout != null)
            {
                CurrentLayout.Dispose();
            }
            CurrentLayout = null;
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Form closing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ParentForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            DrawTimer.Stop();

            if (Batch != null)
            {
                Batch.Dispose();
            }
            Batch = null;

            if (Icons != null)
            {
                Icons.Dispose();
            }
            Icons = null;

            if (CheckerBoard != null)
            {
                CheckerBoard.Dispose();
            }
            CheckerBoard = null;
        }