private void setView(object view) { if (emptyPlanetView.InvokeRequired) { emptyPlanetView.BeginInvoke(new Action <object>(setView), view); return; } emptyPlanetView.Visible = view.Equals(emptyPlanetView); siteView.Visible = view.Equals(siteView); }
private void setView(object view) { if (emptyPlanetView.InvokeRequired) { emptyPlanetView.BeginInvoke(new Action <object>(setView), view); return; } emptyPlanetView.Visible = view.Equals(emptyPlanetView); if (view.Equals(siteView)) { this.ShowElement(siteView); } else { this.HideElement(siteView); } }