private void pbNew_Click(object sender, EventArgs e) { int y = globalPBList.IndexOf(sender as PictureBox); PictureForm pf = new PictureForm((sender as PictureBox).Image, (RoomChangeForm)Application.OpenForms[this.Name], true, y); pf.Show(); }
private void pb_Click(object sender, EventArgs e) { int idRoomImages = Convert.ToInt32(ConectionDB.ReturnResultLikeString(String.Format("select images_id from rooms_images where rooms_id = {0} and images_path = '{1}'", id, listOfStr[Convert.ToInt32((sender as PictureBox).Name)]))); int y = globalPBList.IndexOf(sender as PictureBox); PictureForm pf = new PictureForm(idRoomImages, (RoomChangeForm)Application.OpenForms[this.Name], false, y); pf.ShowDialog(); }