protected override void Dispose(bool disposing) { //transfer settings to other maps in this set if (dirty) { BeatmapManager.Beatmaps.FindAll(b => b.ContainingFolder == BeatmapManager.Current.ContainingFolder).ForEach(b => { b.DisableSamples = checkboxHitsounds.Checked; b.DisableSkin = checkboxSkin.Checked; b.DisableStoryboard = checkboxStoryboard.Checked; if (ConfigManager.sVideo && GameBase.Mode != OsuModes.Edit && !GameBase.TestMode) { b.DisableVideo = BeatmapManager.Current.DisableVideo; } b.DimLevel = (int)backgroundTransparency.Current; }); } spriteManager.Dispose(); backgroundTransparency.Dispose(); base.Dispose(disposing); if (skinChanged) { TextureManager.ClearBeatmapCache(true); Player.Retrying = false; //force the Player instance into non-retry mode to ensure skin is reloaded. } if (samplesetChanged) { AudioEngine.ClearBeatmapCache(); } //restore settings to defaults EventManager.ShowStoryboard = true; EventManager.ShowVideo = ConfigManager.sVideo; SkinManager.IgnoreBeatmapSkin = false; AudioEngine.IgnoreBeatmapSamples = false; EventManager.UserDimLevel = 30; }
protected override void Dispose(bool disposing) { spriteManager.Dispose(); sliderBar.Dispose(); base.Dispose(disposing); }
public override void Dispose() { base.Dispose(); Slider.Dispose(); value.ValueChanged -= value_ValueChanged; }