示例#1
0
        private void bttnImageViewer_Click(object sender, EventArgs e)
        {
            string filename = dataGridView1.Rows[bs.Position].Cells["filename"].Value.ToString();
            string folder   = dataGridView1.Rows[bs.Position].Cells["folder"].Value.ToString();
            string fullname = folder + "\\" + filename;

            imageViewer          = new frmImageViewer(fullname);
            imageViewer.Location = new Point(this.Location.X, this.Location.Y + this.Height);
            imageViewer.Show();
        }
示例#2
0
 private void bttnDisplayImage_Click(object sender, EventArgs e)
 {
     if (selectedFile == "")
     {
         MessageBox.Show("No image file is selected to display. Select one.", "No selected file", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         return;
     }
     imageViewer          = new frmImageViewer(selectedFile);
     imageViewer.Location = new Point(this.Location.X, this.Location.Y + this.Height);
     imageViewer.Show();
 }