private void pic_PreView_Click(object sender, EventArgs e) { PictureBox picBox = (PictureBox)sender; string path = Convert.ToString(picBox.Tag); if (File.Exists(path)) { frmMapView frmMap = new frmMapView(parentForm, this); frmMap.MapPath = path; frmMap.Show(); } }
void gi_Click(ucGalleryItem ucgi) { frmMapView frmMap = new frmMapView(parentForm, this); frmMap.MapPath = ucgi.DataPath; frmMap.Show(); }