Beispiel #1
0
        public void MoveRight(int i)
        {
            //int i = leftGrid.CurrentRowIndex;
            if (i >= 0)
            {
                ArrayList a = new ArrayList(rightItems);
                a.Add(leftItems[i]);
                rightItems = (DataContent[])a.ToArray(itemType);

                a = new ArrayList(leftItems);
                a.RemoveAt(i);
                leftItems = (DataContent[])a.ToArray(itemType);

                WFSUtils.FillDataGrid(leftGrid, leftPropertyList, leftItems);
                WFSUtils.FillDataGrid(rightGrid, rightPropertyList, rightItems);

                if (i < this.leftItems.Length)
                {
                    this.leftGrid.UnSelect(WFSUtils.GetCurrentRowIndex(leftGrid));
                    this.leftGrid.Select(i);
                    this.leftGrid.CurrentRowIndex = i;
                }
                else if (i > 0)
                {
                    this.leftGrid.UnSelect(WFSUtils.GetCurrentRowIndex(leftGrid));
                    this.leftGrid.Select(i - 1);
                    this.leftGrid.CurrentRowIndex = i - 1;
                }
            }
        }
Beispiel #2
0
        public void MoveAllRight()
        {
            ArrayList a = new ArrayList(rightItems);

            for (int i = 0; i < leftItems.Length; i++)
            {
                a.Add(leftItems[i]);
            }
            rightItems = (DataContent[])a.ToArray(itemType);
            leftItems  = (DataContent[])Array.CreateInstance(itemType, 0);
            WFSUtils.FillDataGrid(leftGrid, leftPropertyList, leftItems);
            WFSUtils.FillDataGrid(rightGrid, rightPropertyList, rightItems);
        }
Beispiel #3
0
 public ListSelector()
 {
     // Cet appel est requis par le Concepteur de formulaires Windows.Forms.
     InitializeComponent();
     LeftData  = new DataContent[0];
     RightData = new DataContent[0];
     WFSUtils.FillDataGrid(leftGrid, LeftPropertyList, leftItems);
     WFSUtils.FillDataGrid(rightGrid, RightPropertyList, rightItems);
     moveAllLeftButtonEventHandler  = new System.EventHandler(this.moveAllLeftButton_Click);
     moveAllLeftButton.Click       += moveAllLeftButtonEventHandler;
     moveAllRightButtonEventHandler = new System.EventHandler(this.moveAllRightButton_Click);
     moveAllRightButton.Click      += moveAllRightButtonEventHandler;
     moveLeftButtonEventHandler     = new System.EventHandler(this.moveLeftButton_Click);
     moveLeftButton.Click          += moveLeftButtonEventHandler;
     moveRightButtonEventHandler    = new System.EventHandler(this.moveRightButton_Click);
     moveRightButton.Click         += moveRightButtonEventHandler;
     // TODO : ajoutez les initialisations après l'appel à InitializeComponent
 }
Beispiel #4
0
 public void MoveRight()
 {
     MoveRight(WFSUtils.GetCurrentRowIndex(leftGrid));
 }
Beispiel #5
0
 public void MoveLeft()
 {
     MoveLeft(WFSUtils.GetCurrentRowIndex(rightGrid));
 }