Пример #1
0
        private void pb_Click(object sender, EventArgs e)
        {
            PictureBox pb         = sender as PictureBox;
            RecipePage recipePage = new RecipePage(Convert.ToInt32(pb.Name));

            recipePage.ShowDialog();
        }
Пример #2
0
 private void dataGridView2_Click(object sender, EventArgs e)
 {
     if (dataGridView2.CurrentRow != null)
     {
         RecipePage recipePage = new RecipePage((int)dataGridView2.CurrentRow.Cells[2].Value);
         recipePage.ShowDialog();
     }
     else
     {
         return;
     }
 }