コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ItemTileSetBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ItemTileSetBox.SelectedIndex == -1)
            {
                return;
            }

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

            ItemTileset = ResourceManager.CreateAsset <TileSet>((string)ItemTileSetBox.SelectedItem);
        }
コード例 #2
0
        /// <summary>
        /// Form closing
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DecorationForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (DrawTimer != null)
            {
                DrawTimer.Dispose();
            }
            DrawTimer = null;

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

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

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

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

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