private void EditSurveyForm_Load(object sender, EventArgs e) { if (!ViewClosing) { theDockPanel.Visible = false; theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop; string configFile = SessionManager.SelectDockConfig("EditSurveyFormDockPanel.config"); DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (File.Exists(configFile)) { theDockPanel.LoadFromXml(configFile, m_deserializeDockContent); } else { efhv = new ExpressFamilyHistoryView(); efhv.Show(theDockPanel); efhv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; /**/ acrf = new AdditionalCancerRiskFactorsView(); acrf.Show(theDockPanel); acrf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; mmHx = new MammographyHxView(); mmHx.Show(theDockPanel); mmHx.DockState = DockState.Document; pcv = new PatientCommunicationView(); pcv.routineName = "screening"; pcv.PatientHeaderVisible = false; pcv.Show(theDockPanel); pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; } if (InitialView == typeof(ExpressFamilyHistoryView)) { if (efhv != null) efhv.Show(); } if (InitialView == typeof (MammographyHxView)) { if (mmHx != null) { mmHx.Show(); } } if (InitialView == typeof(AdditionalCancerRiskFactorsView)) { if (acrf != null) acrf.Show(); } else if (InitialView == typeof(PatientCommunicationView)) { if (pcv != null) pcv.Show(); } //TODO implement other InitialViews as needed patientRecordHeader1.setPatient(SessionManager.Instance.GetActivePatient()); } theDockPanel.Visible = true; }