public FormForManualClustering(cGlobalInfo GlobalInfo)
        {
            InitializeComponent();

            this.GlobalInfo = GlobalInfo;
            WellClassSelectionPanel = new PanelForClassSelection(true, eClassType.WELL);
            WellClassSelectionPanel.SelectAll();
            WellClassSelectionPanel.Height = tabPageWellClasses.Height;
            tabPageWellClasses.Controls.Add(WellClassSelectionPanel);

            HitClassPanel = new PanelForClassSelection(false, eClassType.WELL);
            HitClassPanel.Height = panelForHitClass.Height;
            HitClassPanel.UnSelectAll();
            HitClassPanel.Select(1);
            panelForHitClass.Controls.Add(HitClassPanel);

            NonHitClassPanel = new PanelForClassSelection( false, eClassType.WELL);
            NonHitClassPanel.Height = panelForNonHitClass.Height;
            NonHitClassPanel.UnSelectAll();
            NonHitClassPanel.Select(0);
            panelForNonHitClass.Controls.Add(NonHitClassPanel);

            PlatesSelectionPanel = new PanelForPlatesSelection(true, null, true);
            PlatesSelectionPanel.Height = tabPageWellClasses.Height;
            PlatesSelectionPanel.Width = tabPageWellClasses.Width;
            TabPagePlates.Controls.Add(PlatesSelectionPanel);
        }
示例#2
0
        public FormFor3DDataDisplay(bool IsFullScreen, cScreening CompleteScreening)
        {
            this.CompleteScreening = CompleteScreening;
            InitializeComponent();

            // toolTip1.SetToolTip(comboBoxDescriptorX,comboBoxDescriptorX.Text+"aaaaaa");
            //comboBoxDescriptorX.MouseHover += new System.EventHandler(this.comboBoxDescriptorX_MouseHover);

            //this.comboBoxDescriptorX.tool
            // Set up the ToolTip text for the Button and Checkbox.
            // toolTip1.SetToolTip(, "Unsupervised feature selection.\nThese approaches use all the active wells as data for the dimensionality reduction.");

            this.IsFullScreen = IsFullScreen;
            //  WindowFormFor3DVizuOptions.Parent = this;

            for (int i = 0; i < (int)CompleteScreening.ListDescriptors.Count; i++)
            {
                ListScales.Add(1);
            }

            ClassSelectionPanel = new PanelForClassSelection(true, Classes.Base_Classes.GUI.eClassType.WELL);
            ClassSelectionPanel.Height = panelForClasses.Height;
            ClassSelectionPanel.SelectAll();
            panelForClasses.Controls.Add(ClassSelectionPanel);

            foreach (var CurrentCheckBox in ClassSelectionPanel.ListCheckBoxes)
            {
                CurrentCheckBox.CheckedChanged += new EventHandler(CurrentCheckBox_CheckedChanged);
            }

            ToolTipForX.AutoPopDelay = ToolTipForY.AutoPopDelay = ToolTipForZ.AutoPopDelay = 5000;
            ToolTipForX.InitialDelay = ToolTipForY.InitialDelay = ToolTipForZ.InitialDelay = 500;
            ToolTipForX.ReshowDelay = ToolTipForY.ReshowDelay = ToolTipForZ.ReshowDelay = 500;
            ToolTipForX.ShowAlways = ToolTipForY.ShowAlways = ToolTipForZ.ShowAlways = true;
            ToolTipForX.SetToolTip(comboBoxDescriptorX, comboBoxDescriptorX.Text);

            this.WindowFormFor3DVizuOptions = new FormFor3DVizuOptions(this);

            this.LightIntensity = (double)this.WindowFormFor3DVizuOptions.numericUpDownLightIntensity.Value;
            this.LightAmbient = (double)this.WindowFormFor3DVizuOptions.numericUpDownLightAmbient.Value;
            this.LightDiffuse = (double)this.WindowFormFor3DVizuOptions.numericUpDownLightIntensity.Value;
            this.LightSpecular = (double)this.WindowFormFor3DVizuOptions.numericUpDownLightIntensity.Value;

            SphereSource = vtkSphereSource.New();
        }
示例#3
0
        public cFeedBackMessage Run()
        {
            //if (GlobalInfo == null)
            //{
            //    base.FeedBackMessage.IsSucceed = false;
            //    return base.FeedBackMessage;
            //}
            FormForDisplay WindowToDisplay = new FormForDisplay();
            WindowToDisplay.Text = "Class Selection";
            WindowToDisplay.FormBorderStyle = FormBorderStyle.FixedSingle;

            PanelForClassSelection ClassSelectionPanel = new PanelForClassSelection(this.IsCheckBoxes, this.ClassType);
            //ClassSelectionPanel.Height = WindowToDisplay.Height;

            if ((IsSelectAll) && (this.IsCheckBoxes))
            {
                ClassSelectionPanel.SelectAll();
            }
            else
            {
                ClassSelectionPanel.UnSelectAll();
                ClassSelectionPanel.Select(0);
                ClassSelectionPanel.Select(1);
            }
            ClassSelectionPanel.Location = new System.Drawing.Point(10, 10);
            ClassSelectionPanel.Width = 150;
            ClassSelectionPanel.Height = ClassSelectionPanel.ListCheckBoxes.Count * 25;
            ClassSelectionPanel.BorderStyle = BorderStyle.Fixed3D;
            // MyPanel.Controls.Add(ClassSelectionPanel);

            Button ReturnButton = new Button();
            ReturnButton.Text = "Ok";
            ReturnButton.DialogResult = DialogResult.OK;
            ReturnButton.Location = new System.Drawing.Point(ClassSelectionPanel.Location.X, ClassSelectionPanel.Location.Y + ClassSelectionPanel.Height + 5);
            WindowToDisplay.Controls.Add(ReturnButton);

            WindowToDisplay.Controls.Add(ClassSelectionPanel);
            WindowToDisplay.Width = ClassSelectionPanel.Width + 28;
            WindowToDisplay.Height = ClassSelectionPanel.Height + ReturnButton.Height + 48;

            if (WindowToDisplay.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                FeedBackMessage.IsSucceed = false;
                FeedBackMessage.Message = "Selection aborded !";
                return FeedBackMessage;
            }

            List<bool> ListBool = ClassSelectionPanel.GetListSelectedClass();

            int NumSelected = 0;
            this.ListSelectedClass = new cExtendedList();
            foreach (var item in ListBool)
            {
                if (item)
                {
                    this.ListSelectedClass.Add(1);
                    NumSelected++;
                }
                else
                    this.ListSelectedClass.Add(0);
            }

            if (NumSelected == 0)
            {
                FeedBackMessage.IsSucceed = false;
                FeedBackMessage.Message = "No class selected !";
                return FeedBackMessage;
            }

            return FeedBackMessage;
        }
示例#4
0
        public cFeedBackMessage Run()
        {
            FormForDisplay WindowToDisplay = new FormForDisplay();
            WindowToDisplay.Text = "Class Selection";
            WindowToDisplay.FormBorderStyle = FormBorderStyle.FixedSingle;

            PanelForClassSelection ClassSelectionPanel = new PanelForClassSelection( this.IsCheckBoxes, this.ClassType);

            //ClassSelectionPanel.Height = WindowToDisplay.Height;
            if (this.IsSelectAll && this.IsCheckBoxes)
            {
                ClassSelectionPanel.SelectAll();
            }
            else
            {
                ClassSelectionPanel.UnSelectAll();
                ClassSelectionPanel.Select(0);
                ClassSelectionPanel.Select(1);
            }
            ClassSelectionPanel.Location = new System.Drawing.Point(10, 10);
            ClassSelectionPanel.Width = 150;

            if(IsCheckBoxes)
                ClassSelectionPanel.Height = ClassSelectionPanel.ListCheckBoxes.Count*25;
            else
                ClassSelectionPanel.Height = ClassSelectionPanel.ListRadioButtons.Count * 25;
            ClassSelectionPanel.BorderStyle = BorderStyle.Fixed3D;
               // MyPanel.Controls.Add(ClassSelectionPanel);

            Button ReturnButton = new Button();
            ReturnButton.Text = "Ok";
            ReturnButton.DialogResult = DialogResult.OK;
            ReturnButton.Location = new System.Drawing.Point(ClassSelectionPanel.Location.X, ClassSelectionPanel.Location.Y + ClassSelectionPanel.Height + 5);
            WindowToDisplay.Controls.Add(ReturnButton);

            WindowToDisplay.Controls.Add(ClassSelectionPanel);
            WindowToDisplay.Width = ClassSelectionPanel.Width + 28;
            WindowToDisplay.Height = ClassSelectionPanel.Height + ReturnButton.Height+ 48;

            if (WindowToDisplay.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                FeedBackMessage.IsSucceed = false;
                FeedBackMessage.Message = "Selection aborded !";
                return FeedBackMessage;
            }

            List<bool> ListBool = ClassSelectionPanel.GetListSelectedClass();

            int NumSelected = 0;

            this.ListSelectedClass = new cExtendedTable();
            this.ListSelectedClass.Name = "List Class Selected";
            this.ListSelectedClass.Add(new cExtendedList());

            this.ListSelectedClass[0].ListTags = new List<object>();

            int Idx = 0;
            foreach (var item in ListBool)
            {
                if (item)
                {
                    this.ListSelectedClass[0].Add(1);
                    if(this.ClassType== eClassType.WELL)
                        this.ListSelectedClass[0].ListTags.Add(cGlobalInfo.ListWellClasses[Idx]);
                    else if(this.ClassType == eClassType.PHENOTYPE)
                        this.ListSelectedClass[0].ListTags.Add(cGlobalInfo.ListCellularPhenotypes[Idx]);

                    NumSelected++;
                }
                else
                {
                    this.ListSelectedClass[0].Add(0);
                    this.ListSelectedClass[0].ListTags.Add(null);

                }
                Idx++;
            }

            if (NumSelected==0)
            {
                FeedBackMessage.IsSucceed = false;
                FeedBackMessage.Message = "No class selected !";
                return FeedBackMessage;
            }

            //if (NumSelected < MinNumberOfClass)
            //{
            //    FeedBackMessage.IsSucceed = false;
            //    FeedBackMessage.Message = "At least "+MinNumberOfClass+" class have to be selected !";
            //    return FeedBackMessage;
            //}

            return FeedBackMessage;
        }