// When plugin is initialized public override void OnInitialize() { // Setup me = this; // Settings showvisualthings = 2; usegravity = false; usehighlight = true; LoadSettings(); // Load menus form and register it menusform = new MenusForm(); menusform.Register(); // Load curve linedefs form curvelinedefsform = new CurveLinedefsForm(); // Load find/replace form findreplaceform = new FindReplaceForm(); // Load error checking form errorcheckform = new ErrorCheckForm(); // Load Undo\Redo docker undoredopanel = new UndoRedoPanel(); undoredodocker = new Docker("undoredo", "Undo / Redo", undoredopanel); General.Interface.AddDocker(undoredodocker); }
// Disposer public override void Dispose() { // Not already disposed? if (!IsDisposed) { // Clean up General.Interface.RemoveDocker(undoredodocker); undoredopanel.Dispose(); menusform.Unregister(); menusform.Dispose(); menusform = null; curvelinedefsform.Dispose(); curvelinedefsform = null; findreplaceform.Dispose(); findreplaceform = null; errorcheckform.Dispose(); errorcheckform = null; // Done me = null; base.Dispose(); } }