예제 #1
0
        private void displayRespondingDRCToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (CompleteScreening.GetCurrentDisplayPlate().ListDRCRegions == null) return;

            FormForDRCSelection WindowSelectionDRC = new FormForDRCSelection();
            if (WindowSelectionDRC.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;

            if (WindowSelectionDRC.checkBoxMOAClassification.Checked == false)
            {
                int h = 0;
                FormToDisplayDRC WindowforDRCsDisplay = new FormToDisplayDRC();

                foreach (cDRC_Region TmpRegion in CompleteScreening.GetCurrentDisplayPlate().ListDRCRegions)
                {
                    int cpt = 0;
                    List<cDRC> ListDRC = new List<cDRC>();
                    for (int i = 0; i < CompleteScreening.ListDescriptors.Count; i++)
                    {
                        if (CompleteScreening.ListDescriptors[i].IsActive())
                        {
                            cDRC CurrentDRC = new cDRC(TmpRegion, CompleteScreening.ListDescriptors[i]);
                            if (CurrentDRC.IsResponding(WindowSelectionDRC) == 1)
                            {
                                ListDRC.Add(CurrentDRC);
                                cpt++;
                            }
                        }
                    }

                    cDRCDisplay DRCDisplay = new cDRCDisplay(ListDRC, GlobalInfo);
                    if (DRCDisplay.CurrentChart.Series.Count == 0) continue;

                    DRCDisplay.CurrentChart.Location = new Point((DRCDisplay.CurrentChart.Width + 50) * 0, (DRCDisplay.CurrentChart.Height + 10 + DRCDisplay.CurrentRichTextBox.Height) * h++);
                    DRCDisplay.CurrentRichTextBox.Location = new Point(DRCDisplay.CurrentChart.Location.X, DRCDisplay.CurrentChart.Location.Y + DRCDisplay.CurrentChart.Height + 5);

                    WindowforDRCsDisplay.LChart.Add(DRCDisplay.CurrentChart);
                    WindowforDRCsDisplay.LRichTextBox.Add(DRCDisplay.CurrentRichTextBox);
                }

                WindowforDRCsDisplay.panelForDRC.Controls.AddRange(WindowforDRCsDisplay.LChart.ToArray());
                WindowforDRCsDisplay.panelForDRC.Controls.AddRange(WindowforDRCsDisplay.LRichTextBox.ToArray());
                WindowforDRCsDisplay.Show();
                return;
            }

            System.Windows.Forms.DialogResult ResWin = MessageBox.Show("By applying this process, the current screening will be entirely updated ! Proceed ?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if (ResWin == System.Windows.Forms.DialogResult.No) return;

            foreach (cPlate CurrentPlate in CompleteScreening.ListPlatesActive)
            {
                foreach (cDRC_Region TmpRegion in CurrentPlate.ListDRCRegions)
                {
                    int cpt = 0;
                    //List<cDRC> ListDRC = new List<cDRC>();
                    //for (int i = 0; i < CompleteScreening.ListDescriptors.Count; i++)
                    //{
                    //  if (CompleteScreening.ListDescriptors[i].IsActive())
                    //    {
                    //        cDRC CurrentDRC = new cDRC(TmpRegion, CompleteScreening.ListDescriptors[i]);
                    //        if (CurrentDRC.IsResponding(WindowSelectionDRC))
                    //        {
                    //            ListDRC.Add(CurrentDRC);
                    //            cpt++;
                    //        }
                    //    }

                    //}
                    List<int> ResDescActive = TmpRegion.GetListRespondingDescritpors(CompleteScreening, WindowSelectionDRC);

                    for (int j = 0; j < TmpRegion.NumReplicate; j++)
                        for (int i = 0; i < TmpRegion.NumConcentrations; i++)
                        {

                            cWell CurrentWell = TmpRegion.GetListWells()[j][i];
                            if (CurrentWell == null) continue;

                            for (int IdxDesc = 0; IdxDesc < ResDescActive.Count; IdxDesc++)
                            {
                                if (ResDescActive[IdxDesc] == -1) continue;

                                //CurrentWell.ListDescriptors[IdxDesc].HistoValues = new double[1];
                                CurrentWell.ListDescriptors[IdxDesc].SetHistoValues((double)ResDescActive[IdxDesc]);
                                if ((i == 0) && (j == 0))
                                    CurrentWell.SetClass(0);
                                else
                                    CurrentWell.SetAsNoneSelected();
                                //[0] = ResDescActive[IdxDesc];
                                CurrentWell.ListDescriptors[IdxDesc].UpDateDescriptorStatistics();

                            }

                        }
                }
                CurrentPlate.UpDataMinMax();
            }
        }
예제 #2
0
        private void displayDRCToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (CompleteScreening.GetCurrentDisplayPlate().ListDRCRegions == null) return;

            int h = 0;
            FormToDisplayDRC WindowforDRCsDisplay = new FormToDisplayDRC();

            foreach (cDRC_Region TmpRegion in CompleteScreening.GetCurrentDisplayPlate().ListDRCRegions)
            {
                int cpt = 0;
                List<cDRC> ListDRC = new List<cDRC>();
                for (int i = 0; i < CompleteScreening.ListDescriptors.Count; i++)
                {
                    if (CompleteScreening.ListDescriptors[i].IsActive())
                    {
                        cDRC CurrentDRC = new cDRC(TmpRegion, CompleteScreening.ListDescriptors[i]);

                        ListDRC.Add(CurrentDRC);
                        cpt++;
                    }

                }

                cDRCDisplay DRCDisplay = new cDRCDisplay(ListDRC, GlobalInfo);

                if (DRCDisplay.CurrentChart.Series.Count == 0) continue;

                DRCDisplay.CurrentChart.Location = new Point((DRCDisplay.CurrentChart.Width + 50) * 0, (DRCDisplay.CurrentChart.Height + 10 + DRCDisplay.CurrentRichTextBox.Height) * h++);
                DRCDisplay.CurrentRichTextBox.Location = new Point(DRCDisplay.CurrentChart.Location.X, DRCDisplay.CurrentChart.Location.Y + DRCDisplay.CurrentChart.Height + 5);

                WindowforDRCsDisplay.LChart.Add(DRCDisplay.CurrentChart);
                WindowforDRCsDisplay.LRichTextBox.Add(DRCDisplay.CurrentRichTextBox);
            }

            WindowforDRCsDisplay.panelForDRC.Controls.AddRange(WindowforDRCsDisplay.LChart.ToArray());
            WindowforDRCsDisplay.panelForDRC.Controls.AddRange(WindowforDRCsDisplay.LRichTextBox.ToArray());
            WindowforDRCsDisplay.Show();
        }