/// <summary> /// Replaces existing <see cref="Lines"/> with the specified <see cref="ImageMarkerLine"/>s. /// </summary> /// <param name="lines">The new <see cref="ImageMarkerLine"/>s</param> public void UpdateLines(List <ImageMarkerLine> lines) { if (Lines.Count > 0) { ImageMarkerLine[] tempLines = new ImageMarkerLine[Lines.Count]; Lines.CopyTo(tempLines); Lines.Clear(); foreach (ImageMarkerLine imageMarkerLine in tempLines) { Rectangle rectangle = GetImageMarkerLineRectangle(imageMarkerLine); rectangle.Inflate(1, 1); Invalidate(rectangle); } } if (lines.Count > 0) { Lines.AddRange(lines); foreach (ImageMarkerLine imageMarkerLine in Lines) { Rectangle rectangle = GetImageMarkerLineRectangle(imageMarkerLine); rectangle.Inflate(1, 1); Invalidate(rectangle); } } }
public void CopyTo(string[] array, int arrayIndex) { Lines.CopyTo(array, arrayIndex); }