コード例 #1
0
ファイル: WindowHCSAnalyzer.cs プロジェクト: cyrenaique/HCSA
        private void normalProbabilityPlotToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            cGUI_ListClasses GUI_ListClasses = new cGUI_ListClasses();
            GUI_ListClasses.IsCheckBoxes = true;
            GUI_ListClasses.IsSelectAll = true;

            if (GUI_ListClasses.Run().IsSucceed == false) return;
            cExtendedTable ListClassSelected = new cExtendedTable(GUI_ListClasses.GetOutPut());// GetOutPut();

            int IdxClass = -1;
            for (int IdxC = 0; IdxC < ListClassSelected[0].Count; IdxC++)
            {
                if (ListClassSelected[0][IdxC] == 1) IdxClass = IdxC;
            }

            #region single plate and plate by plate
            cDescriptorType CurrentDesc = cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptor();
            cDesignerTab DT = new cDesignerTab();
            if ((ProcessModeCurrentPlateOnlyToolStripMenuItem.Checked) || (ProcessModeplateByPlateToolStripMenuItem.Checked)/*||(ProcessModeEntireScreeningToolStripMenuItem.Checked)*/)
            {
                List<cPlate> ListPlatesToProcess = new List<cPlate>();
                if ((ProcessModeplateByPlateToolStripMenuItem.Checked))
                {
                    foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive)
                        ListPlatesToProcess.Add(TmpPlate);
                }
                else
                    ListPlatesToProcess.Add(cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate());

                foreach (cPlate TmpPlate in ListPlatesToProcess)
                {
                    cListWells ListWellsToProcess1 = new cListWells(null);
                    foreach (cWell item in TmpPlate.ListActiveWells)
                    {
                        if (item.GetCurrentClassIdx() != -1)
                        {
                            if (ListClassSelected[0][item.GetCurrentClassIdx()] == 1)
                                ListWellsToProcess1.Add(item);
                        }
                    }

                    cComputeAndDisplayNormalPlot CADP = new cComputeAndDisplayNormalPlot();
                    CADP.SetInputData(ListWellsToProcess1);
                    CADP.Run();
                    cExtendedControl ControlForTab = CADP.GetOutPut();

                    ControlForTab.Title = TmpPlate.GetName();

                    DT.SetInputData(ControlForTab);
                }
                DT.Run();

                cDisplayToWindow CDW = new cDisplayToWindow();
                CDW.SetInputData(DT.GetOutPut());//VG1.GetOutPut());


                if (ProcessModeCurrentPlateOnlyToolStripMenuItem.Checked)
                    CDW.Title = "Normal Probability Plot - " + CurrentDesc.GetName() + " - " + ListPlatesToProcess[0].GetName();
                else
                    CDW.Title = "Normal Probability Plot - " + CurrentDesc.GetName() + " - " + ListPlatesToProcess.Count + " plates";

                CDW.Run();
                CDW.Display();
            }
            #endregion
            //#region entire screening
            else if (ProcessModeEntireScreeningToolStripMenuItem.Checked)
            {
                List<cPlate> ListPlatesToProcess = new List<cPlate>();
                foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive)
                    ListPlatesToProcess.Add(TmpPlate);

                cListWells ListWellsToProcess1 = new cListWells(null);

                foreach (cPlate TmpPlate in ListPlatesToProcess)
                {

                    foreach (cWell item in TmpPlate.ListActiveWells)
                    {
                        if (item.GetCurrentClassIdx() != -1)
                        {
                            if (ListClassSelected[0][item.GetCurrentClassIdx()] == 1)
                                ListWellsToProcess1.Add(item);
                        }
                    }
                }

                cComputeAndDisplayNormalPlot CADP = new cComputeAndDisplayNormalPlot();
                CADP.SetInputData(ListWellsToProcess1);
                CADP.Run();

                cExtendedControl ControlForTab = CADP.GetOutPut();

                cDisplayToWindow CDW = new cDisplayToWindow();
                CDW.SetInputData(ControlForTab);//VG1.GetOutPut());

                CDW.Title = "Normal Probability Plot - " + CurrentDesc.GetName() + " - " + ListPlatesToProcess.Count + " plates";

                CDW.Run();
                CDW.Display();
            }


            //  ComputeAndDisplayMormalProbabilityPlot(false);
        }
コード例 #2
0
ファイル: cViewerTable.cs プロジェクト: cyrenaique/HCSA
        private void ToolStripMenuItem_NormalityTest(object sender, EventArgs e)
        {
            cExtendedTable CET = new cExtendedTable();
            foreach (DataGridViewColumn item in GridView.SelectedColumns)
                CET.Add(Input[item.Index]);

            cComputeAndDisplayNormalPlot CDNP = new cComputeAndDisplayNormalPlot();
            CDNP.SetInputData(CET);
            CDNP.Run();

            cDisplayToWindow DTW = new cDisplayToWindow();
            DTW.SetInputData(CDNP.GetOutPut());
            DTW.Title = "Normality Test";
            DTW.Run();

            DTW.Display();

            //cNormalityJarqueBera NJB = new cNormalityJarqueBera();
            //NJB.SetInputData(CET);
            //cFeedBackMessage FM = NJB.Run();
            //if(FM.IsSucceed==false)
            //{
            //    System.Windows.Forms.MessageBox.Show(FM.Message, "Error !", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    return;
            //}

            //cDisplayExtendedTable CDT = new cDisplayExtendedTable();
            //CDT.SetInputData(NJB.GetOutPut());
            //CDT.Run();
        }