public MainFrame(mainFrameScreen m) { mainFrameScreen1 = m; prevCellInfo = new dgvInfo(); attributeRows = new List <int>(); attributeColumn = new List <int>(); attributeIndex = new List <int>(); attributeNames = new List <string>(); componentContent = new List <List <string> >(); placeHolder = new List <string>() { "", "", "", "", "", "", "", "", "", "" }; }
public void getCellInfo(int begRow, int endRow, int begColumn, int endColumn) { prevCellInfo = new dgvInfo(); string tempText = ""; Color tempColor = Color.Red; for (int a = begRow; a < endRow + 1; a++) { for (int b = begColumn; b < endColumn + 1; b++) { mainFrameScreen1.getdgvEBOMCellInfo(ref tempText, ref tempColor, a, b); prevCellInfo.colors.Add(tempColor); prevCellInfo.text.Add(tempText); prevCellInfo.rows.Add(a); prevCellInfo.columns.Add(b); } } }
//creates a list of all the cells we need for dragging around a section of cells to decide where we want something. dgvInfo generateDragList(int row, int column, string name, List <string> contents) { dgvInfo tempDgvInfo = new dgvInfo(); tempDgvInfo.text.Add(name); tempDgvInfo.rows.Add(row); tempDgvInfo.columns.Add(column); int headerLength = row + contents.Count + 1; if (headerType) { tempDgvInfo.colors.Add(Color.FromArgb(211, 211, 211)); for (int a = row + 1; a < headerLength; a++) { tempDgvInfo.rows.Add(a); tempDgvInfo.columns.Add(column); tempDgvInfo.text.Add(contents[a - row - 1]); if (a % 2 == 0) { tempDgvInfo.colors.Add(Color.FromArgb(173, 216, 230)); } else { tempDgvInfo.colors.Add(Color.White); } } return(tempDgvInfo); } else { tempDgvInfo.colors.Add(Color.FromArgb(191, 191, 191)); for (int a = column + 1; a < column + 2; a++) { tempDgvInfo.rows.Add(row); tempDgvInfo.columns.Add(a); tempDgvInfo.text.Add(contents[0]); tempDgvInfo.colors.Add(Color.LightGreen); } return(tempDgvInfo); } }