Exemple #1
0
        public TwCapability(TwCap cap, short sval)
        {
            Cap     = (short)cap;
            ConType = (short)TwOn.One;
            Handle  = Twain.GlobalAlloc(0x42, 6);
            IntPtr pv = Twain.GlobalLock(Handle);

            Marshal.WriteInt16(pv, 0, (short)TwType.Int16);
            Marshal.WriteInt32(pv, 2, (int)sval);
            Twain.GlobalUnlock(Handle);
        }
Exemple #2
0
        public MainForm(Int32 orderNumber)
        {
            InitializeComponent();
            this.orderNumber = orderNumber;
            tw = new Twain();
            tw.Init(this.Handle);

            if (userName == @"win7x64\user" || userName == @"inc\volovod" || userName == @"inc\master1" || userName == @"inc\incmasters" || userName == @"inc\astapuk" || userName == @"inc\grinchik" || userName == @"inc\inc-tech14")
            {
                btnPrint.Enabled = true;
            }
            else
            {
                btnPrint.Enabled = false;
            }

            loadImagesFromDb(orderNumber);
        }