/////////////////////////////////////////////////////////////////////////// // IStripBar Implementation public void AddBand(StripBand aBand) { Bands.Add(aBand); aBand.Bar = this; if (aBand.NewRow) { StripRow row = new StripRow(this); Rows.Add(row); aBand.Row = row; row.Bands.Add(aBand); // TODO: Trigger Height-Changed Event } else { StripRow row; if (Rows.Count >= 1) { row = Rows[Rows.Count - 1] as StripRow; } else { row = new StripRow(this); Rows.Add(row); } row.Bands.Add(aBand); aBand.Row = row; // Invalidate Row Invalidate(row.Bounds); } }
/////////////////////////////////////////////////////////////////////////// // Overriden Methods protected override void OnPaint(PaintEventArgs aPea) { int rowCount = Rows.Count; for (int i = 0; i < rowCount; ++i) { StripRow currRow = Rows[i] as StripRow; if (currRow.Bounds.IntersectsWith(aPea.ClipRectangle)) { currRow.PaintRow(aPea); } } }
/////////////////////////////////////////////////////////////////////////// // IStripBar Implementation public void AddBand(StripBand aBand) { Bands.Add(aBand); aBand.Bar = this; if (aBand.NewRow) { StripRow row = new StripRow(this); Rows.Add(row); aBand.Row = row; row.Bands.Add(aBand); // TODO: Trigger Height-Changed Event } else { StripRow row; if (Rows.Count >= 1) row = Rows[Rows.Count-1] as StripRow; else { row = new StripRow(this); Rows.Add(row); } row.Bands.Add(aBand); aBand.Row = row; // Invalidate Row Invalidate(row.Bounds); } }