Пример #1
0
        private IDockContent GetContentFromPersistString(string persistString)
        {
            if (persistString == typeof(ExpressFamilyHistoryView).ToString())
            {
                efhv = new ExpressFamilyHistoryView();
                return efhv;
            }
            if (persistString == typeof(MammographyHxView).ToString())
            {
                mmHx = new MammographyHxView();
                return mmHx;
            }
            if (persistString == typeof(AdditionalCancerRiskFactorsView).ToString())
            {
                acrf = new AdditionalCancerRiskFactorsView();
                return acrf;
            }

            else if (persistString == typeof(PatientCommunicationView).ToString())
            {
                pcv = new PatientCommunicationView();
                pcv.routineName = "screening";
                pcv.PatientHeaderVisible = false;
                return pcv;
            }
            else
                return null;
        }
Пример #2
0
        private void EditSurveyForm_Load(object sender, EventArgs e)
        {
            if (!ViewClosing)
            {
                theDockPanel.Visible = false;

                theDockPanel.AllowEndUserDocking = SessionManager.Instance.AllowDockDragAndDrop;

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

                if (File.Exists(configFile))
                {
                    theDockPanel.LoadFromXml(configFile, m_deserializeDockContent);

                }
                else
                {
                    efhv = new ExpressFamilyHistoryView();
                    efhv.Show(theDockPanel);
                    efhv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;
                    /**/
                    acrf = new AdditionalCancerRiskFactorsView();
                    acrf.Show(theDockPanel);
                    acrf.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                    mmHx = new MammographyHxView();
                    mmHx.Show(theDockPanel);
                    mmHx.DockState = DockState.Document;

                    pcv = new PatientCommunicationView();
                    pcv.routineName = "screening";
                    pcv.PatientHeaderVisible = false;
                    pcv.Show(theDockPanel);
                    pcv.DockState = WeifenLuo.WinFormsUI.Docking.DockState.Document;

                }

                if (InitialView == typeof(ExpressFamilyHistoryView))
                {
                    if (efhv != null)
                        efhv.Show();
                }
                if (InitialView == typeof (MammographyHxView))
                {
                    if (mmHx != null)
                    {
                        mmHx.Show();
                    }
                }
                if (InitialView == typeof(AdditionalCancerRiskFactorsView))
                {
                    if (acrf != null)
                        acrf.Show();
                }
                else if (InitialView == typeof(PatientCommunicationView))
                {
                    if (pcv != null)
                        pcv.Show();
                }

                //TODO implement other InitialViews as needed
                patientRecordHeader1.setPatient(SessionManager.Instance.GetActivePatient());
            }
            theDockPanel.Visible = true;
        }