예제 #1
0
        public void DeleteItem(ConditionCtrl c)
        {
            int idx = Array.IndexOf(items, c);

            if ((idx >= 0) && (idx < itemCou))
            {
                Point previous = items[idx].Location;

                for (int i = idx + 1; i < itemCou; i++)
                {
                    Point current = items[i].Location;
                    items[i].Location = previous;                      // items[i-1].Location;
                    previous          = current;
                    items[i - 1]      = items[i];
                }
                itemCou--;
                c.Dispose();
            }
        }
예제 #2
0
        public ConditionCtrl AddItem(condition c)
        {
            this.AutoScroll = false;

            ConditionCtrl itm = new ConditionCtrl(c);

//			itm.Size = new Size(this.Width- ScrolWidth, 20);
//			itm.Height = 20;
            itm.Width = itmWidth;
            itm.sizeInit();
            itm.Location   = new Point(3, (itemCou > 0)? itemCou * 20 + 2: 2);
            items[itemCou] = itm;

            itemCou++;
            Controls.Add(itm);

            this.AutoScroll = useScroll;

            return(itm);
        }
예제 #3
0
 void ConditionListMouseClick(object sender, MouseEventArgs e)
 {
     ConditionCtrl.DragInterop();
 }