コード例 #1
0
ファイル: FormEditor.cs プロジェクト: DHunte/chocolate-box
        private void FormEditor_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!CheckChanges())
            {
                e.Cancel = true;
                return;
            }

            Reset();

            // Release all resources.
            FableMod.Gfx.Integration.GfxManager.GetModelManager().Clear();
            FableMod.Gfx.Integration.GfxManager.GetTextureManager().Clear();
            FableMod.Gfx.Integration.GfxManager.GetThemeManager().Clear();

            myView.Destroy();
            myController.Destroy();

            myController = null;
            myMaps       = null;
            myView       = null;
        }
コード例 #2
0
ファイル: FormEditor.cs プロジェクト: DHunte/chocolate-box
        private void Init()
        {
            myController = new GfxThingController();

            myView = new GfxThingView();

            myController.AddView(myView);

            panelView.Controls.Add(myView);
            myView.Dock = DockStyle.Fill;

            toolStripButtonNav.Visible =
                Settings.GetBool("Editor", "NavModeOn", false);

            myView.ThingSelected +=
                new ThingSelectedHandler(myView_ThingSelected);

            myView.ThingCreated +=
                new ThingCreateHandler(myView_ThingCreated);

            myView.ThingPicked +=
                new ThingPickHandler(myView_ThingPicked);
        }