private void _InitStopGrid() { unbind(gdStop); for (int i = 0; i < gdStop.RowsCount; i++) { for (int j = 0; j < gdStop.ColumnsCount; j++) { gdStop[i, j].UnBindToGrid(); } } gdStop.Rows.Clear(); gdStop.Redim(1, 5); gdStop[0, 0] = new CHeaderCell() { Caption = "Server", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdStop[0, 1] = new CHeaderCell() { Caption = "Channel", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdStop[0, 2] = new CHeaderCell() { Caption = "Item", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdStop[0, 3] = new CHeaderCell() { Caption = "Sec", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdStop.AutoSizeCells(); }
private void _InitCell() { if (m_CellList == null) { m_CellList = new Dictionary <Position, CellBase>(); } for (int row = 0; row < m_Securities.Length; row++) { for (int col = 0; col < m_Fields.Length; col++) { if (row == 0 && col == 0) { continue; } CellBase c = null; //Field Header if (row == 0 && col != 0) { c = new CHeaderCell() { Caption = m_Fields[col - 1] }; } //SecurityHeader else if (row != 0 && col == 0) { c = new RHeaderCell() { Caption = m_Securities[row - 1], BackColor = CHeaderCell.HeaderBackColor, DefaultFontColor = CHeaderCell.HeaderFontColor, TextAlignment = DevAge.Drawing.ContentAlignment.MiddleLeft }; } else { //content c = new TextCell() { Name = m_Securities[row - 1], Tag = m_Fields[col - 1], CellType = TextCell.TextType.String, FontColor = Color.Black, TextAlignment = DevAge.Drawing.ContentAlignment.MiddleRight }; } if (c != null) { m_CellList.Add(new Position(row, col), c); } } } }
private void _InitInfoGrid() { unbind(gdInfo); gdInfo.Redim(1, 3); gdInfo[0, 0] = new CHeaderCell() { Caption = "Server", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdInfo[0, 1] = new CHeaderCell() { Caption = "Channel", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdInfo[0, 2] = new CHeaderCell() { Caption = "Item", ColorStyle = DevAge.Drawing.BackgroundColorStyle.Solid, FontName = CellBase.FontName.Verdana, Sortable = true }.Field; gdInfo.AutoSizeCells(); }
private void CreateCell(ref CHeaderCell cell, string caption, OnDoubleClickDelegate onDoubleClick = null, OnClickDelegate onClick = null, Color?bc = null, Color?fc = null, int rowspan = 1, int colspan = 1) { if (cell != null) { return; } cell = new CHeaderCell() { Caption = caption, RowSpan = rowspan, ColumnSpan = colspan, DefaultBackColor = Color.LightGray, DefaultFontColor = Color.Black, FontSize = 8 }; if (bc != null) { cell.BackColor = (Color)bc; } if (fc != null) { cell.FontColor = (Color)fc; } cell.OnDoubleClick += onDoubleClick; cell.OnClick += onClick; }