예제 #1
0
        private void neuesBildScannenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Image image = ScanForm.ScanSomething(this.FindForm());

            if (image != null)
            {
                Data = JpegCompressor.CompressJpeg(image, MaxPictureSize);
            }
        }
예제 #2
0
        public static Image ScanSomething(Form f = null)
        {
            ScanForm sf = new ScanForm();

            if (sf.DialogResult == DialogResult.Abort)
            {
                return(null);
            }

            if (f == null)
            {
                sf.ShowDialog();
            }
            else
            {
                sf.ShowDialog(f);
            }

            sf.session.Close();

            return(sf.theImage);
        }