private void Dispose(bool disposing) { if (labelTitle != null) { labelTitle.Dispose(); } if (buttonSelect != null) { buttonSelect.Dispose(); } if (iconFrame != null) { iconFrame.Dispose(); } if (textureBackgroundTile != null) { textureBackgroundTile.Dispose(); } foreach (var key in scenarioItemPages.Keys) { foreach (var scenarioItem in scenarioItemPages[key]) { if (scenarioItem != null) { scenarioItem.Dispose(); } } scenarioItemPages[key].Clear(); } scenarioItemPages.Clear(); if (textboxInputCompanyName != null) { textboxInputCompanyName.Dispose(); } if (textboxInputPlayerName != null) { textboxInputPlayerName.Dispose(); } }