public void OpenView(IViewManager newView) { try { MainAppForm.Opening obj; Monitor.Enter(obj = this.opening); try { if (this.opening.opening) { D.Sayf(0, "Warning: recursive open", new object[0]); return; } this.opening.opening = true; } finally { Monitor.Exit(obj); } this.CloseView(); this.ResetOverviewWindow(); D.Assert(this.currentView == null); this.currentView = newView; this.currentView.Activate(); this.layerControls.SelectObject(newView.GetViewedObject()); } finally { MainAppForm.Opening obj2; Monitor.Enter(obj2 = this.opening); try { this.opening.opening = false; } finally { Monitor.Exit(obj2); } } }