public void DoScanBatchDoc()
        {
            this._acq             = AppContext.GetInstance().GetVal <SharpAcquirerFactory>(typeof(SharpAcquirerFactory)).GetAdapter("");
            this._acq.OnAcquired -= new EventHandler <TEventArg <string> >(this._acq_OnAcquired);
            this._acq.OnError    -= new EventHandler <TEventArg <string> >(this._acq_OnError);
            this._acq.OnAcquired += new EventHandler <TEventArg <string> >(this._acq_OnAcquired);
            this._acq.OnError    += new EventHandler <TEventArg <string> >(this._acq_OnError);
            IAcquirerParam initparam = new IAcquirerParam
            {
                HostWnd = base.Handle
            };

            this._acq.Initialize(initparam);
            using (new DurTimeJob("采集中.."))
            {
                this._acq.Acquire();
            }

            /*
             * if (((navigateTree.Nodes.Count > 0) && (navigateTree.Nodes[navigateTree.Nodes.Count - 1].Nodes.Count > 0)) && (this._lastScanOpeType != ScanOpe.ReplaceCurrent))
             * {
             *  RadTreeNode node = navigateTree.Nodes[navigateTree.Nodes.Count - 1];
             *  RadTreeNode input = node.Nodes[node.Nodes.Count - 1];
             *  if (this.OnItemSelectChanged != null)
             *  {
             *      this.OnItemSelectChanged(this, new TEventArg<RadTreeNode>(input));
             *  }
             * }*/
        }
示例#2
0
        public static void MyShowInThread(IAcquirerParam param, SharedQueue <Object> objs)
        {
            _objs  = objs;
            _param = param;
            ThreadStart start = new ThreadStart(func);
            Thread      th    = new Thread(start);

            th.Start();
        }
示例#3
0
        public FormImageScaner(IAcquirerParam param)
        {
            InitializeComponent();
            twainDevice = new twain();

            this.ShowInTaskbar       = false;
            this.DialogResult        = DialogResult.Cancel;
            this.Text                = "扫描";
            this.Load               += FormImageScaner_Load;
            this.MinimumSizeChanged += FormImageScaner_MinimumSizeChanged;
        }
示例#4
0
 public ImageScaner(IAcquirerParam param, SharedQueue <Object> objs)
 {
     //  _msgs = objs;
     InitializeComponent();
     twainDevice = new twain();
     twainDevice.Init(this.Handle);
     this.ShowInTaskbar = false;
     this.DialogResult  = DialogResult.Cancel;
     this.Text          = "扫描";
     //    this.HandleDestroyed += ImageScaner_HandleDestroyed;
     // this.TopLevel = true;
 }
 public bool Initialize(IAcquirerParam initparam)
 {
     this._param = initparam;
     this.GetSetting().ImageDir = AppContext.GetInstance().Config.GetConfigParamValue("AppSetting", "TmpFileDir");
     return(true);
 }
示例#6
0
 public bool Initialize(IAcquirerParam initparam = null)
 {
     _param = initparam;
     return(true);
 }