Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {

            if (clOut.hNode != null)
            {
                visHierar formSelect = new visHierar(clOut.hNode, "Select clusters",clOut.measure);
                formSelect.ShowCloseButton();
                DialogResult res = formSelect.ShowDialog();

                if (res == DialogResult.OK)
                {
                    if (formSelect.listNodes != null)
                    {
                        if (selected == null)
                            selected = new List<List<string>>();
                        selected.Clear();
                        foreach (var item in formSelect.listNodes)
                        //for (int i = 0; i < formSelect.listNodes.Count; i++)
                            selected.Add(item.Key.setStruct);

                        if(textBox1.Text!=null && textBox1.Text.Length>0)
                            button3.Enabled = true;

                        label4.Text = "Number of selected clusters: " + formSelect.listNodes.Count;
                    }
                }

            }
        }
Exemplo n.º 2
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 3 && e.RowIndex >= 0)
     {
         string        str    = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
         ClusterOutput output = dicOuput[str];
         if (output.hNode != null)
         {
             visHierar select = new visHierar(output.hNode, "Select clusters", output.measure, null);
             select.ShowCloseButton();
             DialogResult res = select.ShowDialog();
             if (res == DialogResult.OK)
             {
                 ((List <List <string> >)(dataGridView1.Rows[e.RowIndex].Cells[5].Value)).Clear();
                 foreach (var item in select.listNodes)
                 {
                     ((List <List <string> >)(dataGridView1.Rows[e.RowIndex].Cells[5].Value)).Add(item.Key.setStruct);
                 }
                 dataGridView1.Rows[e.RowIndex].Cells[3].Value    = select.listNodes.Count;
                 dataGridView1.Rows[e.RowIndex].Cells[4].ReadOnly = false;
             }
         }
     }
     if (e.ColumnIndex == 4 && e.RowIndex >= 0)
     {
         if (!dataGridView1.Rows[e.RowIndex].Cells[4].ReadOnly || !dataGridView1.Columns["Column5"].Visible)
         {
             dataGridView1.Rows[e.RowIndex].Cells[4].Value = !(bool)dataGridView1.Rows[e.RowIndex].Cells[4].Value;
         }
     }
 }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            visHierar win = new visHierar(hNode, name, measure);

            win.ShowCloseButton();
            win.ShowDialog();
            sel.start = Convert.ToInt32(numericUpDown1.Value);
            sel.stop  = Convert.ToInt32(numericUpDown2.Value);
            sel.range = radioButton1.Checked;
            if (win.listNodes != null)
            {
                if (sel.clusters != null)
                {
                    sel.clusters.Clear();
                }
                else
                {
                    sel.clusters = new List <List <string> >();
                }
                label4.Text = win.listNodes.Count.ToString();
                foreach (var item in win.listNodes)
                {
                    List <string> cl = new List <string>(item.Key.setStruct);
                    sel.clusters.Add(cl);
                }
            }
            else
            {
                label4.Text = "0";
            }
        }
Exemplo n.º 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (output.hNode != null)
            {
                visHierar formSelect = new visHierar(output.hNode, "Select clusters", output.measure, null);
                formSelect.ShowCloseButton();
                DialogResult res = formSelect.ShowDialog();

                if (res == DialogResult.OK)
                {
                    if (formSelect.listNodes != null)
                    {
                        if (selected == null)
                        {
                            selected = new List <List <string> >();
                        }
                        selected.Clear();
                        foreach (var item in formSelect.listNodes)
                        {
                            selected.Add(item.Key.setStruct);
                        }

                        button3.Enabled = true;
                    }
                }
            }
        }
Exemplo n.º 5
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (clOut.hNode != null)
            {
                visHierar formSelect = new visHierar(clOut.hNode, "Select clusters", clOut.measure, null);
                formSelect.ShowCloseButton();
                DialogResult res = formSelect.ShowDialog();

                if (res == DialogResult.OK)
                {
                    if (formSelect.listNodes != null)
                    {
                        if (selected == null)
                        {
                            selected = new List <List <string> >();
                        }
                        selected.Clear();
                        foreach (var item in formSelect.listNodes)
                        {
                            //for (int i = 0; i < formSelect.listNodes.Count; i++)
                            selected.Add(item.Key.setStruct);
                        }

                        if (textBox1.Text != null && textBox1.Text.Length > 0)
                        {
                            button3.Enabled = true;
                        }

                        label4.Text = "Number of selected clusters: " + formSelect.listNodes.Count;
                    }
                }
            }
        }
Exemplo n.º 6
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (output.hNode!=null)
            {
                visHierar formSelect = new visHierar(output.hNode, "Select clusters", output.measure);
                formSelect.ShowCloseButton();
                DialogResult res=formSelect.ShowDialog();

                if (res == DialogResult.OK)
                {
                    if (formSelect.listNodes != null)
                    {
                        if (selected == null)
                            selected = new List<List<string>>();
                        selected.Clear();
                        foreach(var item in formSelect.listNodes)
                            selected.Add(item.Key.setStruct);

                        button3.Enabled = true;
                    }
                }
            }
        }
Exemplo n.º 7
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 3 && e.RowIndex >= 0)
            {
                string str=dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                ClusterOutput output=dicOuput[str];
                if(output.hNode!=null)
                {
                    visHierar select = new visHierar(output.hNode, "Select clusters",output.measure);
                    select.ShowCloseButton();
                    DialogResult res=select.ShowDialog();
                    if (res == DialogResult.OK)
                    {
                        ((List<List<string>>)(dataGridView1.Rows[e.RowIndex].Cells[5].Value)).Clear();
                        foreach (var item in select.listNodes)                       
                            ((List<List<string>>)(dataGridView1.Rows[e.RowIndex].Cells[5].Value)).Add(item.Key.setStruct);
                        dataGridView1.Rows[e.RowIndex].Cells[3].Value = select.listNodes.Count;
                        dataGridView1.Rows[e.RowIndex].Cells[4].ReadOnly = false;
                    }

                }
            }
            if (e.ColumnIndex == 4 && e.RowIndex >= 0)
            {           
                if(!dataGridView1.Rows[e.RowIndex].Cells[4].ReadOnly || !dataGridView1.Columns["Column5"].Visible)
                    dataGridView1.Rows[e.RowIndex].Cells[4].Value = !(bool)dataGridView1.Rows[e.RowIndex].Cells[4].Value;
            }
        }