Exemple #1
0
        public bool InsertControl(ITrueControl trueControl, int row, int col)
        {
            if (row > _rowNum || col > _colNum)
            {
                throw new IndexOutOfRangeException();
            }

            //BAD CODE
            var control = trueControl as IControl;

            if (control != null)
            {
                control.Click += _tableLayoutWrapperChild_Click;
            }

            _tableLayoutWrapper.AccessControls.Add(trueControl, row, col);
            _insertedControls[row - 1][col - 1] = trueControl;
            return(true);
        }
Exemple #2
0
 public void Add(ITrueControl control, int row, int col)
 {
     Add(control.TrueControl, col - 1, row - 1);
 }
Exemple #3
0
 public void Add(ITrueControl control)
 {
     Add(control.TrueControl);
 }