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); }
public void Add(ITrueControl control, int row, int col) { Add(control.TrueControl, col - 1, row - 1); }
public void Add(ITrueControl control) { Add(control.TrueControl); }