private void RecreateDocument() { if (_document != null) { _document.Dispose(); } _editor = new GlobalVariablesEditor(_agsEditor.CurrentGame); _document = new ContentDocument(_editor, "Global Variables", this); }