private void setCamera(IView view, ICamera camera) { if (view.GetCamera().IsRecording) { view.GetCamera().ToggleRecording(); view.SetCamera(camera); view.GetCamera().ToggleRecording(); } else { view.SetCamera(camera); } }