Small time problem fixes.

This commit is contained in:
soukoku 2014-09-16 18:33:35 -04:00
parent 92063d2b84
commit d72c0586e6
2 changed files with 31 additions and 10 deletions

View File

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

View File

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