block scheme for c# method

Viewed 127

Hello all please help me. I have a small method for my student project to search data inside a DatagridView.

private void searchbutton_Click(object sender, EventArgs e)
        {
            string searchValue = textBox1.Text;
            if (searchValue != "")
            {
                productsDataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
                //search 
                try
                {
                    foreach (DataGridViewRow row in productsDataGridView.Rows)
                    {
                        if (row.Cells[1].Value.ToString().Equals(searchValue))
                        {
                            row.Selected = true;
                            break;
                        }
                    }
                }
                catch (Exception exc)
                {
                    MessageBox.Show("Нічого не знайдено");
                }
            }
            //search by category
            if(comboBox1.SelectedValue!=null)
            {
                try
                {
                    foreach (DataGridViewRow row in productsDataGridView.Rows)
                    {
                        if (row.Cells[5].Value.Equals(comboBox1.SelectedValue))
                        {
                            row.Selected = true;
                            break;
                        }
                    }
                }
                catch (Exception exc)
                {
                    MessageBox.Show("Нічого не знайдено");
                }
            }
        //end
    }

Only problem for me is that I have to draw a block scheme for this method. Is there any tool that I can use to generate the scheme from this source code or any tool that is accessible with screen reading software to accomplish this task?

0 Answers
Related