// This unloads everything private void Unload() { if (mainform != null) { mainform.Dispose(); } if (toolsform != null) { toolsform.Dispose(); } toolsform = null; }
// This loads what is needed to support USDF private void Load() { // Check if the map format has a DIALOGUE lump we can edit bool editlump = false; foreach (KeyValuePair <string, MapLumpInfo> lump in General.Map.Config.MapLumps) { if (lump.Key.Trim().ToUpperInvariant() == "DIALOGUE") { editlump = true; } } if (editlump) { // Load tools (this adds our button to the toolbar) if (toolsform == null) { toolsform = new ToolsForm(); } } }