mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-18 17:47:57 +08:00
Small time problem fixes.
This commit is contained in:
@@ -949,7 +949,7 @@ namespace NTwain.Data
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ContainerType.Range:
|
case ContainerType.Range:
|
||||||
for (var i = read.RangeMinValue; i <= read.RangeMaxValue; i += read.RangeStepSize)
|
for (var i = read.RangeMinValue; i >= read.RangeMinValue && i <= read.RangeMaxValue; i += read.RangeStepSize)
|
||||||
{
|
{
|
||||||
toPopulate.Add(i);
|
toPopulate.Add(i);
|
||||||
}
|
}
|
||||||
@@ -1390,7 +1390,10 @@ namespace NTwain.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class TWExtImageInfo : IDisposable
|
public sealed partial class TWExtImageInfo : IDisposable
|
||||||
{
|
{
|
||||||
internal TWExtImageInfo()
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="TWExtImageInfo"/> class.
|
||||||
|
/// </summary>
|
||||||
|
public TWExtImageInfo()
|
||||||
{
|
{
|
||||||
_info = new TWInfo[200];
|
_info = new TWInfo[200];
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ namespace NTwain
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Basic class for interfacing with TWAIN. You should only have one of this per application process.
|
/// Basic class for interfacing with TWAIN. You should only have one of this per application process.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TwainSession
|
public partial class TwainSession
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="TwainSession"/> class.
|
/// Initializes a new instance of the <see cref="TwainSession"/> class.
|
||||||
@@ -71,7 +71,7 @@ namespace NTwain
|
|||||||
}
|
}
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region ITwainSession Members
|
#region ITwainSession Members
|
||||||
|
|
||||||
|
|
||||||
@@ -421,7 +421,10 @@ namespace NTwain
|
|||||||
var hand = PropertyChanged;
|
var hand = PropertyChanged;
|
||||||
if (hand != null) { hand(this, new PropertyChangedEventArgs(propertyName)); }
|
if (hand != null) { hand(this, new PropertyChangedEventArgs(propertyName)); }
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine("PropertyChanged event error: " + ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -432,7 +435,10 @@ namespace NTwain
|
|||||||
var hand = PropertyChanged;
|
var hand = PropertyChanged;
|
||||||
if (hand != null) { hand(this, new PropertyChangedEventArgs(propertyName)); }
|
if (hand != null) { hand(this, new PropertyChangedEventArgs(propertyName)); }
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine("PropertyChanged event error: " + ex.ToString());
|
||||||
|
}
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -486,7 +492,10 @@ namespace NTwain
|
|||||||
onEventFunc();
|
onEventFunc();
|
||||||
if (handler != null) { handler(this, EventArgs.Empty); }
|
if (handler != null) { handler(this, EventArgs.Empty); }
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -497,7 +506,10 @@ namespace NTwain
|
|||||||
onEventFunc();
|
onEventFunc();
|
||||||
if (handler != null) { handler(this, EventArgs.Empty); }
|
if (handler != null) { handler(this, EventArgs.Empty); }
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
|
||||||
|
}
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -522,7 +534,10 @@ namespace NTwain
|
|||||||
onEventFunc(e);
|
onEventFunc(e);
|
||||||
if (handler != null) { handler(this, e); }
|
if (handler != null) { handler(this, e); }
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -535,7 +550,10 @@ namespace NTwain
|
|||||||
onEventFunc(e);
|
onEventFunc(e);
|
||||||
if (handler != null) { handler(this, e); }
|
if (handler != null) { handler(this, e); }
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
|
||||||
|
}
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user