/**************************************************************************************************/ private void NotYetInformedGeneticTestsView_Load(object sender, EventArgs e) { theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop; SessionManager.Instance.ClearActivePatient(); SessionManager.Instance.NewActivePatient += new RiskApps3.Controllers.SessionManager.NewActivePatientEventHandler(NewActivePatient); string configFile = SessionManager.SelectDockConfig("NotYetInformedGeneticTestsView.config"); DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (File.Exists(configFile)) theDockPanel.LoadFromXml(configFile, m_deserializeDockContent); else { pf = new PedigreeImageView(); //pf.SetMode("MANUAL"); pf.Show(theDockPanel); pf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; sfv = new SummaryFollowupView(); sfv.Show(theDockPanel); sfv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; pcv = new PatientCommunicationView(); pcv.Show(theDockPanel); pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document; gtv = new GeneticTestingView(false); //can't modify view gtv.Show(theDockPanel); gtv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom; pn = new PatientNavigation(); pn.Show(theDockPanel); pn.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom; } GetNewNotYetInformedGenTestList(); if (pf != null) { pf.Enabled = false; pf.Show(); } }
/**************************************************************************************************/ private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(PedigreeForm).ToString()) { pf = new PedigreeImageView(); //pf.SetMode("MANUAL"); return pf; } else if (persistString == typeof(PatientNavigation).ToString()) { pn = new PatientNavigation(); //pn.AddViewToParent = this.AddViewToParent; return pn; } else if (persistString == typeof(SummaryFollowupView).ToString()) { sfv = new SummaryFollowupView(); //sfv.AddViewToParent = this.AddViewToParent; return sfv; } else if (persistString == typeof(PatientCommunicationView).ToString()) { pcv = new PatientCommunicationView(); //pcv.AddViewToParent = this.AddViewToParent; return pcv; } else if (persistString == typeof(GeneticTestingView).ToString()) { gtv = new GeneticTestingView(false); return gtv; } else return null; }