private void PatientContactView_Load(object sender, EventArgs e) { string configFile = SessionManager.SelectDockConfig("PatientContactView.config"); DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (File.Exists(configFile)) { theDockPanel.LoadFromXml(configFile, m_deserializeDockContent); } else { pf = new PedigreeForm(); pf.SetMode("MANUAL"); //pf.Register(sessionManager); pf.Show(theDockPanel); pf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockLeft; rdv = new RelativeDetailsView(); //rdv.Register(sessionManager); rdv.Show(theDockPanel); rdv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockRight; pcv = new PatientCommunicationView(); //pcv.Register(sessionManager); pcv.Show(theDockPanel); pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom; } }
private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(PedigreeForm).ToString()) { pf = new PedigreeForm(); pf.SetMode("MANUAL"); //pf.Register(sessionManager); return(pf); } else if (persistString == typeof(RelativeDetailsView).ToString()) { rdv = new RelativeDetailsView(); //rdv.Register(sessionManager); return(rdv); } else if (persistString == typeof(PatientCommunicationView).ToString()) { pcv = new PatientCommunicationView(); //pcv.Register(sessionManager); return(pcv); } return(null); }