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)); * } * }*/ }
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(); }
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; }
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); }
public bool Initialize(IAcquirerParam initparam = null) { _param = initparam; return(true); }