Exemple #1
0
        private void aToolStripMenuItem_Click_1(object sender, EventArgs e)
        {


            //if (CompleteScreening.ListDescriptors.GetListNameActives().Count <= 1)
            //{
            //    MessageBox.Show("MINE Analysis requires at least two activated descriptors\n", "Error !", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    return;
            //}

            //bool IsFullScreen = false;
            //List<double>[] ListValueDesc = ExtractDesciptorAverageValuesList(IsFullScreen);

            //DisplayMINE(ListValueDesc);

            cGUI_ListClasses GUI_ListClasses = new cGUI_ListClasses();
            if (GUI_ListClasses.Run().IsSucceed == false) return;
            cExtendedList ListClassSelected = GUI_ListClasses.GetOutPut()[0];

            if (ProcessModeplateByPlateToolStripMenuItem.Checked)
            {
                cDesignerTab DT = new cDesignerTab();

                foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive)
                {
                    cListWells ListWellsToProcess = new cListWells(null);
                    foreach (cWell item in TmpPlate.ListActiveWells)
                    {
                        if (item.GetCurrentClassIdx() != -1)
                        {
                            if (ListClassSelected[item.GetCurrentClassIdx()] == 1)
                                ListWellsToProcess.Add(item);
                        }
                    }

                    cExtendedTable NewTable = new cExtendedTable(ListWellsToProcess, true);

                    cMineAnalysis MA = new cMineAnalysis();
                    MA.SetInputData(NewTable);
                    MA.Is_BriefReport = true;
                    MA.CurrentScreening = cGlobalInfo.CurrentScreening;
                    MA.Run();

                    cDesignerTab SubDT = new cDesignerTab();
                    foreach (var item in MA.GetOutPut())
                    {
                        cViewerTable SubTable = new cViewerTable();

                        SubTable.Title = "MINE - " + item.Name;
                        SubTable.SetInputData(item);
                        SubTable.Run();

                        SubDT.SetInputData(SubTable.GetOutPut());
                    }
                    SubDT.Title = TmpPlate.GetName();
                    SubDT.Run();
                    DT.SetInputData(SubDT.GetOutPut());
                }

                DT.Run();
                cDisplayToWindow TmpvD = new cDisplayToWindow();

                TmpvD.SetInputData(DT.GetOutPut());
                TmpvD.Title = "MINE analysis - " + cGlobalInfo.CurrentScreening.ListPlatesActive.Count + " plates";
                TmpvD.Run();
                TmpvD.Display();
            }
            else if (ProcessModeCurrentPlateOnlyToolStripMenuItem.Checked)
            {
                cPlate TmpPlate = cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate();

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

                cExtendedTable NewTable = new cExtendedTable(ListWellsToProcess, true);

                cMineAnalysis MA = new cMineAnalysis();
                MA.SetInputData(NewTable);
                MA.Is_BriefReport = true;
                MA.CurrentScreening = cGlobalInfo.CurrentScreening;
                MA.Run();

                cDesignerTab SubDT = new cDesignerTab();
                foreach (var item in MA.GetOutPut())
                {
                    cViewerTable SubTable = new cViewerTable();

                    SubTable.Title = "MINE - " + item.Name;
                    SubTable.SetInputData(item);
                    SubTable.Run();

                    SubDT.SetInputData(SubTable.GetOutPut());
                }
                SubDT.Title = TmpPlate.GetName();
                SubDT.Run();

                cDisplayToWindow TmpvD = new cDisplayToWindow();

                TmpvD.SetInputData(SubDT.GetOutPut());
                TmpvD.Title = "MINE analysis - " + TmpPlate.GetName() + " : " + ListWellsToProcess.Count + " wells";
                TmpvD.Run();
                TmpvD.Display();
            }
            else if (ProcessModeEntireScreeningToolStripMenuItem.Checked)
            {
                cListWells ListWellsToProcess = new cListWells(null);

                foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive)
                    foreach (cWell item in TmpPlate.ListActiveWells)
                        if (item.GetCurrentClassIdx() != -1)
                            if (ListClassSelected[item.GetCurrentClassIdx()] == 1) ListWellsToProcess.Add(item);

                cExtendedTable NewTable = new cExtendedTable(ListWellsToProcess, true);

                cMineAnalysis MA = new cMineAnalysis();
                MA.SetInputData(NewTable);
                MA.Is_BriefReport = true;
                MA.CurrentScreening = cGlobalInfo.CurrentScreening;
                MA.Run();

                cDesignerTab SubDT = new cDesignerTab();
                foreach (var item in MA.GetOutPut())
                {
                    cViewerTable SubTable = new cViewerTable();

                    SubTable.Title = "MINE - " + item.Name;
                    SubTable.SetInputData(item);
                    SubTable.Run();

                    SubDT.SetInputData(SubTable.GetOutPut());
                }
                SubDT.Run();

                cDisplayToWindow TmpvD = new cDisplayToWindow();

                TmpvD.SetInputData(SubDT.GetOutPut());
                TmpvD.Title = "MINE analysis : " + ListWellsToProcess.Count + " wells";
                TmpvD.Run();
                TmpvD.Display();
            }

        }
Exemple #2
0
        private void ToolStripMenuItem_MINEAnalysis(object sender, EventArgs e)
        {
            cExtendedTable CET = new cExtendedTable();
            foreach (DataGridViewColumn item in GridView.SelectedColumns)
                CET.Add(Input[item.Index]);

            cMineAnalysis MA = new cMineAnalysis();
            MA.SetInputData(CET);
            MA.Is_BriefReport = true;
            MA.Run();

            cDesignerTab SubDT = new cDesignerTab();
            foreach (var item in MA.GetOutPut())
            {
                cViewerTable SubTable = new cViewerTable();

                SubTable.Title = "MINE - " + item.Name;
                SubTable.SetInputData(item);
                SubTable.Run();

                SubDT.SetInputData(SubTable.GetOutPut());
            }
            SubDT.Run();

            cDisplayToWindow DW = new cDisplayToWindow();
            DW.SetInputData(SubDT.GetOutPut());
            DW.Title = CET.Name + " - MINE analysis";
            DW.Run();
            DW.Display();
        }