public CamView RequestCamView(string initStateTypeName = null) { CamView cam = new CamView(this.camViews.Count, initStateTypeName); this.camViews.Add(cam); cam.FormClosed += delegate(object sender, FormClosedEventArgs e) { this.camViews.Remove(sender as CamView); }; if (!this.isLoading) { cam.Show(DualityEditorApp.MainForm.MainDockPanel); if (cam.Pane != null) { cam.Pane.Activate(); if (cam.LocalGLControl != null) cam.LocalGLControl.Focus(); else cam.Focus(); } } return cam; }