mirror of
https://github.com/soukoku/ntwain.git
synced 2025-10-24 10:11:20 +08:00
Some CA changes.
This commit is contained in:
@@ -49,7 +49,7 @@ namespace Tester.WPF
|
||||
//rc = DGControl.Status.Get(dsId, ref stat);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
foreach (var c in DS.CapSupportedCaps.Get().Select(o => new CapVM(DS, o)))
|
||||
foreach (var c in DS.CapSupportedCaps.GetValues().Select(o => new CapVM(DS, o)))
|
||||
{
|
||||
Caps.Add(c);
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace Tester.WPF
|
||||
{
|
||||
if (_session.CurrentSource.ICapXferMech.GetCurrent() == XferMech.File)
|
||||
{
|
||||
var formats = _session.CurrentSource.ICapImageFileFormat.Get();
|
||||
var formats = _session.CurrentSource.ICapImageFileFormat.GetValues();
|
||||
var wantFormat = formats.Contains(FileFormat.Tiff) ? FileFormat.Tiff : FileFormat.Bmp;
|
||||
|
||||
var fileSetup = new TWSetupFileXfer
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace Tester.Winform
|
||||
|
||||
private void LoadPaperSize(ICapWrapper<SupportedSize> cap)
|
||||
{
|
||||
var list = cap.Get();
|
||||
var list = cap.GetValues();
|
||||
comboSize.DataSource = list;
|
||||
var cur = cap.GetCurrent();
|
||||
if (list.Contains(cur))
|
||||
@@ -346,7 +346,7 @@ namespace Tester.Winform
|
||||
private void LoadDPI(ICapWrapper<TWFix32> cap)
|
||||
{
|
||||
// only allow dpi of certain values for those source that lists everything
|
||||
var list = cap.Get().Where(dpi => (dpi % 50) == 0).ToList();
|
||||
var list = cap.GetValues().Where(dpi => (dpi % 50) == 0).ToList();
|
||||
comboDPI.DataSource = list;
|
||||
var cur = cap.GetCurrent();
|
||||
if (list.Contains(cur))
|
||||
@@ -357,7 +357,7 @@ namespace Tester.Winform
|
||||
|
||||
private void LoadDepth(ICapWrapper<PixelType> cap)
|
||||
{
|
||||
var list = cap.Get();
|
||||
var list = cap.GetValues();
|
||||
comboDepth.DataSource = list;
|
||||
var cur = cap.GetCurrent();
|
||||
if (list.Contains(cur))
|
||||
@@ -376,7 +376,7 @@ namespace Tester.Winform
|
||||
if (!_loadingCaps && _twain.State == 4)
|
||||
{
|
||||
var sel = (SupportedSize)comboSize.SelectedItem;
|
||||
_twain.CurrentSource.ICapSupportedSizes.Set(sel);
|
||||
_twain.CurrentSource.ICapSupportedSizes.SetValue(sel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ namespace Tester.Winform
|
||||
if (!_loadingCaps && _twain.State == 4)
|
||||
{
|
||||
var sel = (PixelType)comboDepth.SelectedItem;
|
||||
_twain.CurrentSource.ICapPixelType.Set(sel);
|
||||
_twain.CurrentSource.ICapPixelType.SetValue(sel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,8 +394,8 @@ namespace Tester.Winform
|
||||
if (!_loadingCaps && _twain.State == 4)
|
||||
{
|
||||
var sel = (TWFix32)comboDPI.SelectedItem;
|
||||
_twain.CurrentSource.ICapXResolution.Set(sel);
|
||||
_twain.CurrentSource.ICapYResolution.Set(sel);
|
||||
_twain.CurrentSource.ICapXResolution.SetValue(sel);
|
||||
_twain.CurrentSource.ICapYResolution.SetValue(sel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace Tester.Winform
|
||||
{
|
||||
if (!_loadingCaps && _twain.State == 4)
|
||||
{
|
||||
_twain.CurrentSource.CapDuplexEnabled.Set(ckDuplex.Checked ? BoolType.True : BoolType.False);
|
||||
_twain.CurrentSource.CapDuplexEnabled.SetValue(ckDuplex.Checked ? BoolType.True : BoolType.False);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user