Ejemplo n.º 1
0
 private void _miTwainTemplateShow_Click(object sender, System.EventArgs e)
 {
     using (Template templateDlg = new Template())
     {
         templateDlg._twainSession = _twainSession;
         templateDlg.ShowDialog(this);
         _transferMode = templateDlg._transferMode;
     }
 }
Ejemplo n.º 2
0
        private void AddScannerFormats(int format, int index)
        {
            TwainCapabilityValue formatValue = (TwainCapabilityValue)format;

            switch (formatValue)
            {
            case TwainCapabilityValue.FileFormatTiff:
                _cmbFileFormats.Items.Insert(index, "TIFF");
                _format[index] = RasterImageFormat.Tif;
                break;

            case TwainCapabilityValue.FileFormatBmp:
                _cmbFileFormats.Items.Insert(index, "BMP");
                _format[index] = RasterImageFormat.Bmp;
                break;

            case TwainCapabilityValue.FileFormatXbm:
                _cmbFileFormats.Items.Insert(index, "XBM");
                _format[index] = RasterImageFormat.Xbm;
                break;

            case TwainCapabilityValue.FileFormatJfif:
                _cmbFileFormats.Items.Insert(index, "JFIF");
                _format[index] = RasterImageFormat.Jpeg;
                break;

            case TwainCapabilityValue.FileFormatTiffMulti:
                _cmbFileFormats.Items.Insert(index, "TIFF MULTI");
                _format[index] = RasterImageFormat.Tif;
                break;

            case TwainCapabilityValue.FileFormatPng:
                _cmbFileFormats.Items.Insert(index, "PNG");
                _format[index] = RasterImageFormat.Png;
                break;

            case TwainCapabilityValue.FileFormatExif:
                _cmbFileFormats.Items.Insert(index, "EXIF");
                _format[index] = RasterImageFormat.Exif;
                break;
            }
        }