// 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); }
// This updates the list column size private void UpdateColumnSizes() { // Check if a vertical scrollbar exists and adjust the column in the listbox accordingly if ((BuilderPlug.GetWindowLong(list.Handle, BuilderPlug.GWL_STYLE) & BuilderPlug.WS_VSCROLL) != 0) { coldescription.Width = list.ClientRectangle.Width - 2; } else { coldescription.Width = list.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth - 2; } }
// 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(); } }