protected virtual void DrawItemPlusMinusLines(Graphics graphics, Rectangle rect, TreeListItem item) { if (item.Owner == null) { return; } using (var pen = new Pen(Color.Gray)) { pen.DashStyle = DashStyle.Dot; var x = rect.X + 7; int half = rect.Height / 2; int y0 = item.Parent == null && item.Index == 0 ? rect.Top + half : rect.Top; int y1 = item.Index == item.Owner.Count - 1 ? rect.Top + half : rect.Bottom; graphics.DrawLine(pen, x, y0, x, y1); graphics.DrawLine(pen, x, rect.Top + half, x + 8, rect.Top + half); var parent = item; for (int i = 1; i <= item.Level; i++) { parent = parent.Parent; if (parent.Index != parent.Owner.Count - 1) { int ox = x - i * item.TreeList.Indent; graphics.DrawLine(pen, ox, rect.Top, ox, rect.Bottom); } } } }
internal TreeListItemRenderEventArgs(TreeListItem item, Graphics graphics, Rectangle rect) : base(graphics, rect) { Item = item; }
internal TreeListCellCollection(TreeListItem item) { listitem = item; }
internal void ProcessItemCheck(TreeListItem item) { RaiseAfterItemCheckChangeEvent(item); InvalidateItem(item); }