コード例 #1
0
ファイル: Form1.cs プロジェクト: serdaraltin/Passcus
 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
ファイル: event_daily.cs プロジェクト: serdaraltin/Passcus
 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);
         }
     }
 }