Пример #1
0
        public Photobooth()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            PrinterPicker picker = new PrinterPicker();
            picker.ShowDialog();
            printerName = picker.PrinterName;

            Prompt p = new Prompt("What text would you like to display as a watermark?");
            p.ShowDialog();
            watermarkText = p.Result;

            Prompt s = new Prompt("What size would you like the text?");
            s.ShowDialog();
            try
            {
                watermarkSize = int.Parse(s.Result);
            }
            catch
            {
                watermarkSize = 0;
            }

            const int VIDEODEVICE = 0; // zero based index of video capture device to use
            const int VIDEOWIDTH = 640; // Depends on video device caps
            const int VIDEOHEIGHT = 480; // Depends on video device caps
            const int VIDEOBITSPERPIXEL = 24; // BitsPerPixel values determined by device

            cam = new Capture(VIDEODEVICE, VIDEOWIDTH, VIDEOHEIGHT, VIDEOBITSPERPIXEL);
        }
Пример #2
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            const int VIDEODEVICE = 0; // zero based index of video capture device to use
            const int VIDEOWIDTH = 640; // Depends on video device caps
            const int VIDEOHEIGHT = 480; // Depends on video device caps
            const int VIDEOBITSPERPIXEL = 24; // BitsPerPixel values determined by device

            cam = new Capture(VIDEODEVICE, VIDEOWIDTH, VIDEOHEIGHT, VIDEOBITSPERPIXEL, pictureBox2);
        }
Пример #3
0
 private void reactivateCamera()
 {
     try
     {
         cam = new Capture(Properties.Settings.Default.CameraNumber,
                           Properties.Settings.Default.CameraWidth,
                           Properties.Settings.Default.CameraHeight,
                           Properties.Settings.Default.CameraBitsPerPixel,
                           acquisitionWindow);
     }
     catch (Exception) { }
 }