protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { IsTrading = false; PlayerItems = null; if (UserLabel != null) { if (!UserLabel.IsDisposed) { UserLabel.Dispose(); } UserLabel = null; } if (PlayerLabel != null) { if (!PlayerLabel.IsDisposed) { PlayerLabel.Dispose(); } PlayerLabel = null; } if (UserGrid != null) { if (!UserGrid.IsDisposed) { UserGrid.Dispose(); } UserGrid = null; } if (PlayerGrid != null) { if (!PlayerGrid.IsDisposed) { PlayerGrid.Dispose(); } PlayerGrid = null; } if (UserGoldLabel != null) { if (!UserGoldLabel.IsDisposed) { UserGoldLabel.Dispose(); } UserGoldLabel = null; } if (PlayerGoldLabel != null) { if (!PlayerGoldLabel.IsDisposed) { PlayerGoldLabel.Dispose(); } PlayerGoldLabel = null; } if (ConfirmButton != null) { if (!ConfirmButton.IsDisposed) { ConfirmButton.Dispose(); } ConfirmButton = null; } } }