private void dgvRequest_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { if (dgvRequest.Rows[e.RowIndex].Cells["img"].Value.ToString() != "") { string path = dgvRequest.Rows[e.RowIndex].Cells["ImagePath"].Value.ToString(); RequestOnline.ImgDialog img = new ImgDialog(path); img.ShowDialog(); } } }
private void button1_Click(object sender, EventArgs e) { if (dr["ImagePath"].ToString() != "") { string path = System.IO.Directory.GetCurrentDirectory() + "/RequestOnline/Image/" + dr["ImagePath"].ToString(); RequestOnline.ImgDialog img = new ImgDialog(path); img.ShowDialog(); } }
private void listView1_DoubleClick(object sender, EventArgs e) { RequestOnline.ImgDialog img = new ImgDialog(listView1.SelectedItems[0].SubItems[0].Text); img.ShowDialog(); }