Esempio n. 1
0
        public GeneticTestingRowExpandable(GeneticTestingView geneticTestingView, GeneticTest geneticTest)
        {
            this.geneticTestingView = geneticTestingView;
            this.geneticTest        = geneticTest;
            InitializeComponent();

            string dateFormat = Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern;

            if (dateFormat == "M/d/yyyy")
            {
                dateFormat = "MM/dd/yyyy";
            }
            dateTimePicker1.Format       = DateTimePickerFormat.Custom;
            dateTimePicker1.CustomFormat = dateFormat;

            if (!geneticTestingView.canModify)
            {
                dateTimePicker1.Enabled   = false;
                testMonthComboBox.Enabled = false;
                testYearComboBox.Enabled  = false;
                //statusComboBox.Enabled = false;
                deleteButton.Visible    = false;
                addResultButton.Visible = false;
            }

            if (this.geneticTest.GeneticTestResults.Count > 0)
            {
                this.addResultButton.Enabled = true;
                this.addResultButton.Visible = true;
            }

            if (this.geneticTest.IsASOTest && this.geneticTest.GeneticTestResults.Count < 1)
            {
                this.addResultButton.Visible = true;
                this.addResultButton.Enabled = true;
            }
            else if (this.geneticTest.IsASOTest && this.geneticTest.GeneticTestResults.Count > 0)
            {
                this.addResultButton.Visible = false;
                this.addResultButton.Enabled = false;
            }

            //if (geneticTest.panelID > 0)
            if (geneticTest.GeneticTestResults.Count > 0)
            {
                this.panelComboBox.Enabled = false;
            }

            this.geneticTest.AddHandlersWithLoad(GeneticTestChanged, null, GeneticTestPersisted);

            FillControls();

            if (geneticTest.panelID > 0 && geneticTest.GeneticTestResults.Count == 0)
            {
                addResultRows();
                addResultButton.Enabled = true;
            }
        }
        public GeneticTestingRowExpandable(GeneticTestingView geneticTestingView, GeneticTest geneticTest)
        {
            this.geneticTestingView = geneticTestingView;
            this.geneticTest = geneticTest;
            InitializeComponent();

            string dateFormat = Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern;
            if (dateFormat == "M/d/yyyy")
            {
                dateFormat = "MM/dd/yyyy";
            }
            dateTimePicker1.Format = DateTimePickerFormat.Custom;
            dateTimePicker1.CustomFormat = dateFormat;

            if (!geneticTestingView.canModify)
            {
                dateTimePicker1.Enabled = false;
                testMonthComboBox.Enabled = false;
                testYearComboBox.Enabled = false;
                //statusComboBox.Enabled = false;
                deleteButton.Visible = false;
                addResultButton.Visible = false;
            }

            if (this.geneticTest.GeneticTestResults.Count > 0)
            {
                this.addResultButton.Enabled = true;
                this.addResultButton.Visible = true;
            }

            if (this.geneticTest.IsASOTest && this.geneticTest.GeneticTestResults.Count < 1)
            {
                this.addResultButton.Visible = true;
                this.addResultButton.Enabled = true;
            }
            else if(this.geneticTest.IsASOTest && this.geneticTest.GeneticTestResults.Count>0)
            {
                this.addResultButton.Visible = false;
                this.addResultButton.Enabled = false;
            }

            //if (geneticTest.panelID > 0)
            if (geneticTest.GeneticTestResults.Count > 0)
            {
                this.panelComboBox.Enabled = false;
            }

            this.geneticTest.AddHandlersWithLoad(GeneticTestChanged, null, GeneticTestPersisted);

            FillControls();

            if (geneticTest.panelID > 0 && geneticTest.GeneticTestResults.Count == 0)
            {
                addResultRows();
                addResultButton.Enabled = true;
            }
        }
 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();
 }
        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;
                }
            }
        }
        /**************************************************************************************************/
        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;
 }