private void PlaceAddFromFirst(ControlBase value)
        {
            if (TotalControlHeight > Size.Height)
            {
                vScrollBarAdv1.Value = vScrollBarAdv1.Minimum;
                vScrollBarAdv1.Enabled = true;
            }
            IndexVisibleList.Clear();
            int currentHeigth = value.Size.Height;

            for (int i = 0; i < ListControls.Count; ++i)
            {
                if (currentHeigth < Size.Height)
                {
                    IndexVisibleList.Add(i + 1);
                    EnableControl(ListControls[i]);
                    ListControls[i].Location = new Point(1, currentHeigth);
                    currentHeigth += ListControls[i].Size.Height;
                }
                else
                {
                    DisableControl(ListControls[i]);
                }
            }

            value.Location = new Point(1, 0);
            EnableControl(value);
            ListControls.Insert(0, value);
            IndexVisibleList.Insert(0, 0);

            if (TotalControlHeight > Size.Height)
            {
                this.vScrollBarAdv1.Maximum = (int)((double)(TotalControlHeight * vScrollBarAdv1.LargeChange) / (double)vScrollBarAdv1.ClientSize.Height);
                this.vScrollBarAdv1.Value = 1;
            }
            selectIndex = SelectIndex + 1;
            SelectIndex = 0;
            vScrollBarAdv1.Update();
            Update();
        }
        private void PlaceAddFromEnd(ControlBase value)
        {
            IndexVisibleList.Clear();
            ListControls.Add(value);

            if (TotalControlHeight > Size.Height)
            {
                vScrollBarAdv1.Enabled = true;
                int currentHeigth = 0;

                for (int i = ListControls.Count - 1; i >= 0; --i)
                {
                    if (currentHeigth < Size.Height)
                    {
                        IndexVisibleList.Insert(0, i);
                        EnableControl(ListControls[i]);
                        ListControls[i].Location = new Point(1, Size.Height - currentHeigth - ListControls[i].Size.Height);
                        currentHeigth += ListControls[i].Size.Height;
                    }
                    else
                    {
                        DisableControl(ListControls[i]);
                    }
                }
                this.vScrollBarAdv1.Maximum = (int)((double)(TotalControlHeight * vScrollBarAdv1.LargeChange) / (double)vScrollBarAdv1.ClientSize.Height);
                this.vScrollBarAdv1.Value = vScrollBarAdv1.Maximum - vScrollBarAdv1.LargeChange + 1;
            }
            else
            {
                vScrollBarAdv1.Enabled = false;
                int currentHeigth = 0;

                for (int i = 0; i < ListControls.Count; ++i)
                {
                    if (currentHeigth < Size.Height)
                    {
                        IndexVisibleList.Add(i);
                        EnableControl(ListControls[i]);
                        ListControls[i].Location = new Point(1, currentHeigth);
                        currentHeigth += ListControls[i].Size.Height;
                    }
                    else
                    {
                        DisableControl(ListControls[i]);
                    }
                }
             }
            SelectIndex = ListControls.Count - 1;
            Update();
        }
        void Controls_MouseDown(object sender, MouseEventArgs e)
        {
            Console.Write("Controls_MouseDown\n");
            foreach (int Index in IndexVisibleList)
            {
                if (ListControls[Index] == (ControlBase)sender)
                {
                    SelectIndex = Index;
                    break;
                }
            }
            DragIndex = SelectIndex;
            lastDragOver = ((ControlBase)sender);
            if (this.ContextMenu != null)
            {
                this.ContextMenu.Show(lastDragOver, e.Location);
            }
            if (e.Button == MouseButtons.Left)
            {
                ((ControlBase)sender).DoDragDrop("", DragDropEffects.Copy | DragDropEffects.None);
            }

            this.Cursor = System.Windows.Forms.Cursors.Default;
        }
        void Controls_DragOver(object sender, DragEventArgs e)
        {
            Console.Write("Controls_DragOver\n");
            ControlBase myCtrl = (ControlBase)sender;
            ControlBase myDragCtrl = ListControls[SelectIndex];

            DragIndex = ListControls.IndexOf(myCtrl);

            if (myCtrl != myDragCtrl)
            {
                if (LastDragY < e.Y)
                {
                    ((ControlBase)sender).ShowBorderForDragOver(DevComponents.DotNetBar.eBorderSide.Bottom);
                    ++DragIndex;
                }
                else if (LastDragY > e.Y)
                {
                    ((ControlBase)sender).ShowBorderForDragOver(DevComponents.DotNetBar.eBorderSide.Top);
                }
            }

            LastDragY = e.Y;
            lastDragOver = myCtrl;
        }
 //         public void InsertAt(int Index, ControlBase value)
 //         {
 //         }
 public void Remove(ControlBase value)
 {
     int index = ListControls.IndexOf(value);
     RemoveAt(index);
 }
        public void Add(ControlBase value)
        {
            //value.Enabled = false;
            value.Size = new Size(this.Size.Width - this.vScrollBarAdv1.Width - 2, 80);
            value.AllowDrop = true;
            value.MouseDown += new MouseEventHandler(this.Controls_MouseDown);
            value.QueryContinueDrag += new System.Windows.Forms.QueryContinueDragEventHandler(this.Controls_QueryContinueDrag);
            value.DragOver += new System.Windows.Forms.DragEventHandler(this.Controls_DragOver);
            value.DragLeave += new EventHandler(Controls_DragLeave);
            value.DragDrop += new DragEventHandler(Controls_DragDrop);
            Controls.Add(value);

            TotalControlHeight += value.Size.Height;
            LastWheelValue = -1;

            if (AddFromFirst)
            {
                PlaceAddFromFirst(value);
            }
            else
            {
                PlaceAddFromEnd(value);
            }
        }