This commit is contained in:
		@@ -155,6 +155,8 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		public void InitializeBorder(VlnFlexGrid myFlexGrid, CellRange myRange)
 | 
							public void InitializeBorder(VlnFlexGrid myFlexGrid, CellRange myRange)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
								if (myRange.r1 == 0 && myRange.c1 == 0 && myRange.r2 == 2 && myRange.c2 == 2)
 | 
				
			||||||
 | 
									Console.WriteLine("here");
 | 
				
			||||||
			_TopBorder = GridLinePattern.Unknown;
 | 
								_TopBorder = GridLinePattern.Unknown;
 | 
				
			||||||
			_InsideHorizontalBorder = GridLinePattern.Unknown;
 | 
								_InsideHorizontalBorder = GridLinePattern.Unknown;
 | 
				
			||||||
			_BottomBorder = GridLinePattern.Unknown;
 | 
								_BottomBorder = GridLinePattern.Unknown;
 | 
				
			||||||
@@ -167,21 +169,21 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
					CellRange cr = myFlexGrid.GetMergedRange(r, c);
 | 
										CellRange cr = myFlexGrid.GetMergedRange(r, c);
 | 
				
			||||||
					if (r == myRange.r1) // Top Border
 | 
										if (r == myRange.r1) // Top Border
 | 
				
			||||||
						_TopBorder = CombinePattern(_TopBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r1, cr.c1]);
 | 
											_TopBorder = CombinePattern(_TopBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r1, cr.c1]);
 | 
				
			||||||
					if (r == myRange.r1 && c == myRange.c1) // Left Border
 | 
										if (c == myRange.c1) // Left Border
 | 
				
			||||||
						_LeftBorder = CombinePattern(_LeftBorder, myFlexGrid.MyBorders.VerticalLines[cr.r1, cr.c1]);
 | 
											_LeftBorder = CombinePattern(_LeftBorder, myFlexGrid.MyBorders.VerticalLines[cr.r1, cr.c1]);
 | 
				
			||||||
					if (r == myRange.r2) // Bottom Border
 | 
										if (r == myRange.r2) // Bottom Border
 | 
				
			||||||
						_BottomBorder = CombinePattern(_BottomBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r2+1, cr.c2]);
 | 
											_BottomBorder = CombinePattern(_BottomBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r2+1, cr.c2]);
 | 
				
			||||||
					if (r == myRange.r2 && c == myRange.c2) // Right Border
 | 
										if (c == myRange.c2) // Right Border
 | 
				
			||||||
						_RightBorder = CombinePattern(_RightBorder, myFlexGrid.MyBorders.VerticalLines[cr.r2, cr.c2+1]);
 | 
											_RightBorder = CombinePattern(_RightBorder, myFlexGrid.MyBorders.VerticalLines[cr.r2, cr.c2+1]);
 | 
				
			||||||
					if (r == cr.r1 && c == cr.c1) // Look for inside lines
 | 
										if (r == cr.r1 && c == cr.c1) // Look for inside lines
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						if (cr.r1 > myRange.r1 && cr.r1 < myRange.r2) // Inside Horizontal Top
 | 
											if (cr.r1 > myRange.r1 && cr.r1 < myRange.r2) // Inside Horizontal Top
 | 
				
			||||||
							_InsideHorizontalBorder = CombinePattern(_InsideHorizontalBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r1, cr.c1]);
 | 
												_InsideHorizontalBorder = CombinePattern(_InsideHorizontalBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r1, cr.c1]);
 | 
				
			||||||
						if (cr.r2 > myRange.r1 && cr.r2 < myRange.r2) // Inside Horizontal Bottom
 | 
											if (cr.r2+1 > myRange.r1 && cr.r2 < myRange.r2) // Inside Horizontal Bottom
 | 
				
			||||||
							_InsideHorizontalBorder = CombinePattern(_InsideHorizontalBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r2 +1, cr.c2]);
 | 
												_InsideHorizontalBorder = CombinePattern(_InsideHorizontalBorder, myFlexGrid.MyBorders.HorizontalLines[cr.r2 +1, cr.c2]);
 | 
				
			||||||
						if (cr.c1 > myRange.c1 && cr.c1 < myRange.c2) // Inside Vertical Left
 | 
											if (cr.c1 > myRange.c1 && cr.c1 < myRange.c2) // Inside Vertical Left
 | 
				
			||||||
							_InsideVerticalBorder = CombinePattern(_InsideVerticalBorder, myFlexGrid.MyBorders.VerticalLines[cr.r1, cr.c1]);
 | 
												_InsideVerticalBorder = CombinePattern(_InsideVerticalBorder, myFlexGrid.MyBorders.VerticalLines[cr.r1, cr.c1]);
 | 
				
			||||||
						if (cr.c2 > myRange.c1 && cr.c2 < myRange.c2) // Inside Vertical Right
 | 
											if (cr.c2+1 > myRange.c1 && cr.c2 < myRange.c2) // Inside Vertical Right
 | 
				
			||||||
							_InsideVerticalBorder = CombinePattern(_InsideVerticalBorder, myFlexGrid.MyBorders.VerticalLines[cr.r2, cr.c2 + 1]);
 | 
												_InsideVerticalBorder = CombinePattern(_InsideVerticalBorder, myFlexGrid.MyBorders.VerticalLines[cr.r2, cr.c2 + 1]);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					c = cr.c2;//Skip to the end of the merged cells
 | 
										c = cr.c2;//Skip to the end of the merged cells
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -226,6 +226,7 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
	public class LinePatternArray
 | 
						public class LinePatternArray
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		#region Properties
 | 
							#region Properties
 | 
				
			||||||
 | 
							protected static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 | 
				
			||||||
		private int _Rows;
 | 
							private int _Rows;
 | 
				
			||||||
		[XmlAttribute("Rows")]
 | 
							[XmlAttribute("Rows")]
 | 
				
			||||||
		public int Rows
 | 
							public int Rows
 | 
				
			||||||
@@ -262,7 +263,13 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
		#region Array Access
 | 
							#region Array Access
 | 
				
			||||||
		public GridLinePattern this[int r, int c]
 | 
							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; }
 | 
								set { Lines[r * Columns + c] = value; }
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		#endregion
 | 
							#endregion
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user