This commit is contained in:
@@ -226,6 +226,7 @@ namespace Volian.Controls.Library
|
||||
public class LinePatternArray
|
||||
{
|
||||
#region Properties
|
||||
protected static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private int _Rows;
|
||||
[XmlAttribute("Rows")]
|
||||
public int Rows
|
||||
@@ -262,7 +263,13 @@ namespace Volian.Controls.Library
|
||||
#region Array Access
|
||||
public GridLinePattern this[int r, int c]
|
||||
{
|
||||
get { return Lines[r * Columns + c]; }
|
||||
get
|
||||
{
|
||||
int indx = r * Columns + c;
|
||||
if (indx < Lines.Length) return Lines[r * Columns + c];
|
||||
_MyLog.WarnFormat("GridLinePattern: Lines Array Access out-of-bounds ({0}, {1}) within ({2}, {3})", r, c, Rows, Columns);
|
||||
return GridLinePattern.Single;
|
||||
}
|
||||
set { Lines[r * Columns + c] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user