mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-19 01:57:56 +08:00
Changeset 2 for swappable message loop hook implementations.
This commit is contained in:
@@ -65,7 +65,11 @@ namespace Tester.WPF
|
||||
{
|
||||
base.OnSourceInitialized(e);
|
||||
|
||||
var rc = _twainVM.Open();
|
||||
// use this for internal msg loop
|
||||
//var rc = _twainVM.Open();
|
||||
// use this to hook into current app loop
|
||||
var rc = _twainVM.Open(new WpfMessageLoopHook(new WindowInteropHelper(this).Handle));
|
||||
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
SrcList.ItemsSource = _twainVM.GetSources().Select(s => new DSVM { DS = s });
|
||||
|
Reference in New Issue
Block a user