private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(PatientCommunicationView).ToString()) { pcv = new PatientCommunicationView(); pcv.PatientHeaderVisible = false; pcv.InitialTask = InitialTask; //pcv.SplitterDistance = 0; return pcv; } else if (persistString == typeof(PedigreeForm).ToString()) { pf = new PedigreeForm(); return pf; } else if (persistString == typeof(NewToDoView).ToString()) { ntdv = new NewToDoView(); return ntdv; } else return null; }
private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof (PatientCommunicationView).ToString()) { pcv = new PatientCommunicationView(); pcv.PatientHeaderVisible = false; pcv.Orientation = Orientation.Vertical; return pcv; } else if (persistString == typeof (NewToDoView).ToString()) { if (ShowNewToDo) { ntdv = new NewToDoView(); return ntdv; } else return null; } else return null; }
private void RiskClinicNotesView_Load(object sender, EventArgs e) { if (!ViewClosing) { theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop; string configFile = SessionManager.SelectDockConfig("RiskClinicNotesViewDockPanel.config"); DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (File.Exists(configFile)) { theDockPanel.LoadFromXml(configFile, m_deserializeDockContent); } else { pcv = new PatientCommunicationView(); pcv.PatientHeaderVisible = false; pcv.Orientation = Orientation.Vertical; pcv.InitialTask = InitialTask; pcv.Show(theDockPanel); pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; if (ShowNewToDo) { ntdv = new NewToDoView(); ntdv.Show(theDockPanel); ntdv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom; } } Patient proband = SessionManager.Instance.GetActivePatient(); if (proband != null) { if (patientRecordHeader1.Visible) { patientRecordHeader1.setPatient(proband); } } } }
private void QueueNotesView_Load(object sender, EventArgs e) { theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop; string configFile = SessionManager.SelectDockConfig("QueueNotesViewDockPanel.config"); DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (File.Exists(configFile)) { theDockPanel.LoadFromXml(configFile, m_deserializeDockContent); } else { pf = new PedigreeForm(); pf.Show(theDockPanel); pf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; pcv = new PatientCommunicationView(); pcv.PatientHeaderVisible = false; pcv.InitialTask = InitialTask; //pcv.SplitterDistance = 0; pcv.Show(theDockPanel); pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; ntdv = new NewToDoView(); ntdv.Show(theDockPanel); ntdv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom; } patientRecordHeader1.setPatient(SessionManager.Instance.GetActivePatient()); }