예제 #1
0
        // 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);
        }
예제 #2
0
        // 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();
            }
        }