public override void Dispose() { UnitDrawDistance.ValueChanged -= UnitDrawDistanceChanged; ProjectileDrawDistance.ValueChanged -= ProjectileDrawDistanceChanged; TerrainDrawDistance.ValueChanged -= TerrainDrawDistanceChanged; CameraScroll.ValueChanged -= CameraScrollChanged; CameraRotation.ValueChanged -= CameraRotationChanged; MouseCamRotation.ValueChanged -= MouseCamRotationChanged; ZoomSpeed.ValueChanged -= ZoomSpeedChanged; Resolutions.ItemSelected -= ResolutionSelected; WindowTypes.ItemSelected -= WindowTypeSelected; HighDPI.Toggled -= HighDPIToggled; TripleBuffer.Toggled -= TripleBufferToggled; VSync.Toggled -= VSyncToggled; DebugHUD.Toggled -= DebugHUDToggled; BorderMovement.Toggled -= BorderMovementToggled; PathFindingVisualization.ItemSelected -= PathFindingVisualizationSelected; UnitDrawDistance.Dispose(); ProjectileDrawDistance.Dispose(); TerrainDrawDistance.Dispose(); CameraScroll.Dispose(); CameraRotation.Dispose(); MouseCamRotation.Dispose(); ZoomSpeed.Dispose(); window.RemoveAllChildren(); window.Remove(); window.Dispose(); }