예제 #1
0
 private IDockContent GetContentFromPersistString(string persistString)
 {
     if (persistString == typeof(PedigreeForm).ToString())
     {
         pf = new PedigreeForm();
         //pf.SetMode("SELF_ORGANIZING");
         return pf;
     }
     if (persistString == typeof(FamilyHistoryView).ToString())
     {
         fhv = new FamilyHistoryView();
         return fhv;
     }
     else if (persistString == typeof(RelativeDetailsView).ToString())
     {
         rdv = new RelativeDetailsView();
         return rdv;
     }
     else if (persistString == typeof(DocumentUploadView).ToString())
     {
         duv = new DocumentUploadView();
         return duv;
     }
     else if (persistString == typeof(PastMedicalHistoryView).ToString())
     {
         pmhv = new PastMedicalHistoryView();
         return pmhv;
     }
     else if (persistString == typeof(GeneticTestingView).ToString())
     {
         gtv = new GeneticTestingView();
         return gtv;
     }
     else
         throw new NullDockingConfigException();
 }
예제 #2
0
        private void RiskClinicFamilyHistoryView_Load(object sender, EventArgs e)
        {
            if (!ViewClosing)
            {
                theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop;

                configFile = SessionManager.SelectDockConfig("RiskClinicFamilyHistoryViewDockPanel.config");
                DeserializeDockContent m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString);

                if (File.Exists(configFile))
                    theDockPanel.LoadFromXml(configFile, m_deserializeDockContent);
                else
                {
                    pf = new PedigreeForm();
                    //pf.SetMode("SELF_ORGANIZING");
                    pf.Show(theDockPanel);
                    pf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    fhv = new FamilyHistoryView();
                    fhv.Show(theDockPanel);
                    fhv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    rdv = new RelativeDetailsView();
                    rdv.Show(theDockPanel);
                    rdv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockRight;

                    duv = new DocumentUploadView();
                    duv.Show(rdv.Pane, rdv);

                    pmhv = new PastMedicalHistoryView();
                    pmhv.Show(theDockPanel);
                    pmhv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;

                    gtv = new GeneticTestingView();
                    gtv.Show(theDockPanel);
                    gtv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.DockBottom;
                }
            }
        }