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