private void btnphotograph_Click(object sender, EventArgs e) { pictureBox2.Image = camera.NewFrame; pictureBox2.Visible = true; using (frmSave fs = new frmSave()) { fs.ShowDialog(); } if (shouldBeSave) { if (!Directory.Exists(ScanDocPath)) { Directory.CreateDirectory(ScanDocPath); } pictureBox2.Image.Save(ScanDocPath + "\\" + name + ".jpg", ImageFormat.Jpeg); photopath = ScanDocPath + "\\" + name + ".jpg"; cAccess.add(name, "", photopath, cConfig.strScanType, DateTime.Now.ToString(), Environment.UserName, note); frmMain.fm.initialize(); toolStripStatusLabel1.Text = "照片已储存"; shouldBeSave = false; } pictureBox2.Image = null; pictureBox2.Visible = false; }
private void btnphotograph_Click(object sender, EventArgs e) { pictureBox2.Image = camera.NewFrame; pictureBox2.Visible = true; using (frmSave fs = new frmSave()) { fs.ShowDialog(); } if (shouldBeSave) { if (!Directory.Exists(ScanDocPath)) Directory.CreateDirectory(ScanDocPath); pictureBox2.Image.Save(ScanDocPath + "\\" + name + ".jpg", ImageFormat.Jpeg); photopath = ScanDocPath + "\\" + name + ".jpg"; cAccess.add(name, "", photopath, cConfig.strScanType, DateTime.Now.ToString(), Environment.UserName, note); frmMain.fm.initialize(); toolStripStatusLabel1.Text = "照片已储存"; shouldBeSave = false; } pictureBox2.Image = null; pictureBox2.Visible = false; }