private void AdditionalCancerRiskFactorsView_Load(object sender, EventArgs e) { if (!ViewClosing) { theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop; string configFile = SessionManager.SelectDockConfig("AdditionalCancerRiskFactorsView.config"); DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); if (File.Exists(configFile)) { theDockPanel.LoadFromXml(configFile, m_deserializeDockContent); } else { bcrf = new BreastCancerRiskFactors(); bcrf.Show(theDockPanel); bcrf.DockState = DockState.Document; ccrf = new ColonCancerRiskFactors(); ccrf.Show(theDockPanel); ccrf.DockState = DockState.Document; } } }
private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(BreastCancerRiskFactors).ToString()) { bcrf = new BreastCancerRiskFactors(); return(bcrf); } if (persistString == typeof(ColonCancerRiskFactors).ToString()) { ccrf = new ColonCancerRiskFactors(); return(ccrf); } return(null); }
private IDockContent GetContentFromPersistString(string persistString) { if (persistString == typeof(BreastCancerRiskFactors).ToString()) { bcrf = new BreastCancerRiskFactors(); return bcrf; } if (persistString == typeof(ColonCancerRiskFactors).ToString()) { ccrf = new ColonCancerRiskFactors(); return ccrf; } return null; }