/**************************************************************************************************/ private void PendingGeneticTestsView_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("PendingGeneticTestsView.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; gtfsv = new GeneticTestingFamilySummaryView(); //can't modify view gtfsv.Show(theDockPanel); gtfsv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom; } GetNewPendingGenTestList(); 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(GeneticTestingFamilySummaryView).ToString()) { gtfsv = new GeneticTestingFamilySummaryView(); return gtfsv; } else return null; }