public void ForceSaveAndExit() { if (this.paintMode != PaintMode.Exiting) { this.paintMode = PaintMode.Exiting; this.SaveAndExit(); } }