Example #1
0
        ///////////////////////////////////////////////////////////////////////////
        // 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);
            }
        }
Example #2
0
        ///////////////////////////////////////////////////////////////////////////
        // 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);
                }
            }
        }
Example #3
0
        ///////////////////////////////////////////////////////////////////////////
        // 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);
              }
        }