Changeset 2 for swappable message loop hook implementations.

This commit is contained in:
soukoku
2014-05-25 08:45:52 -04:00
parent 61b0e89313
commit 764c75a7a0
12 changed files with 285 additions and 63 deletions

View File

@@ -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 });