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; }
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); }