Ejemplo n.º 1
0
 public MyTreeListViewInfo(MyTreeList treeList)
     : base(treeList)
 {
     ColumnPanelBandMap = new BandMap();
     CellBandMap        = new BandMap();
     BandLinks          = new Dictionary <TreeListColumn, MyTreeListBandInfo>();
 }
 public MyTreeListBand(MyTreeList TreeList, MyTreeListBand parent, int position, int width, string name)
 {
     fTreeList   = TreeList;
     fChildren   = new MyTreeListBandCollection(this, TreeList.Bands);
     fColumns    = new TreeListColumn[width];
     fParent     = parent;
     fName       = name;
     fPosition   = position;
     fLevel      = (Parent == null) ? 0 : Parent.Level + 1;
     fBandColumn = null;
     fVisible    = true;
 }
        public virtual void CalcBandInfo(MyTreeListViewInfo viewInfo)
        {
            MyTreeList TL = viewInfo.TreeList;

            Appearance.Assign(viewInfo.PaintAppearance.HeaderPanel);
            int VisiblePosition = Band.IndexToColumnHandle(0);
            int X = viewInfo.ViewRects.IndicatorBounds.Width + 1 - TL.LeftCoord;

            for (int i = 0; i < VisiblePosition; i++)
            {
                TreeListColumn Col = TreeList.RootBand.GetColumn(i);
                if ((Col != null) && Col.Visible)
                {
                    X += Col.Width;
                }
            }
            int Y     = (Band.Level - 1) * viewInfo.BandHeight + viewInfo.ViewRects.ColumnPanel.Y;
            int Width = 0;

            for (int i = 0; i < Band.Width; i++)
            {
                TreeListColumn Col = Band.GetColumn(i);
                if ((Col != null) && Col.Visible)
                {
                    Width += Col.Width;
                }
            }
            int Height = viewInfo.BandHeight + 1;

            if ((Band.Children.Count == 0) && (!Band.HasColumns()))
            {
                Height *= viewInfo.BandMaxLevel - Band.Level;
            }
            Bounds      = new Rectangle(X, Y, Width, Height);
            CaptionRect = new Rectangle(0, 0, Width, Height);
            Caption     = Band.Name;
        }
Ejemplo n.º 4
0
 public MyTreeListHandler(MyTreeList treeList)
     : base(treeList)
 {
 }
Ejemplo n.º 5
0
 public MyTreeListBandCollection(MyTreeList treeList)
 {
     fRootBand = new MyTreeListBand(treeList, null, 0, treeList.Columns.Count, string.Empty);
     List.Add(fRootBand);
     fTreeListBands = null;
 }