예제 #1
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows[0].Cells[10].Value.ToString() != "")
     {
         byte[]       imageBytes = Convert.FromBase64String(dataGridView1.SelectedRows[0].Cells[10].Value.ToString());
         MemoryStream ms         = new MemoryStream(imageBytes, 0, imageBytes.Length);
         ms.Write(imageBytes, 0, imageBytes.Length);
         screenshot_view sv  = new screenshot_view();
         PictureBox      svp = sv.Controls["pictureBox1"] as PictureBox;
         svp.Image = Image.FromStream(ms, true);
         sv.ShowDialog();
     }
 }
예제 #2
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridView1.SelectedRows[0].Cells[3].Value.ToString() != "")
     {
         try
         {
             byte[]       imageBytes = Convert.FromBase64String(dataGridView1.SelectedRows[0].Cells[3].Value.ToString());
             MemoryStream ms         = new MemoryStream(imageBytes, 0, imageBytes.Length);
             ms.Write(imageBytes, 0, imageBytes.Length);
             screenshot_view sv  = new screenshot_view();
             PictureBox      svp = sv.Controls["pictureBox1"] as PictureBox;
             svp.Image = Image.FromStream(ms, true);
             sv.ShowDialog();
         }
         catch (Exception hata)
         {
             MessageBox.Show(hata.Message.ToString(), "PassCus", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }