public void addLeftCell(String str) { L_ListCell lc = new L_ListCell(str, lco); leftControl.Add(lc); double previous_num = 0; if (leftNameControl.Count != 0) { previous_num = ((N_ListCell)leftNameControl[leftNameControl.Count - 1]).getNum(); } N_ListCell nc = new N_ListCell(Math.Floor(previous_num) + 1, lco); leftNameControl.Add(nc); handleMiddleCell(); }
public void moveCell(L_ListCell lc, int index) { List <L_ListCell> list = leftControl.Cast <L_ListCell>().ToList <L_ListCell>(); list.Remove(lc); if (index < 0) { index = 0; } if (index < list.Count) { list.Insert(index, lc); } else { list.Add(lc); } leftControl.Clear(); leftControl.AddRange(list.ToArray()); lco.Refresh(); }
public int getCellIndex(L_ListCell lc) { return(leftControl.IndexOf(lc)); }
public void deleteCell(L_ListCell lc) { leftNameControl.RemoveAt(leftNameControl.Count - 1); leftControl.Remove(lc); handleMiddleCell(); }