예제 #1
0
 public void Render(GlideGraphics bitmap, int Ay)
 {
     Width = Parent.Rect.Width;
     //Bitmaps.DT_AlignmentCenter
     bitmap.DrawTextInRect(Label, X, Ay + (Height - _font.Height) / 2, Width, _font.Height, new StringFormat()
     {
         Alignment = StringAlignment.Center
     }, Glide.Ext.Colors.Black, _font);
     bitmap.DrawLine(System.Drawing.Color.Gray, 1, 0, Ay + Height, Width, Ay + Height);
 }
예제 #2
0
        private void RenderItem(int index, object[] data, System.Drawing.Color backColor, System.Drawing.Color fontColor)
        {
            int x = 0;
            int y = index * RowHeight;

            _items.DrawRectangle(new Glide.Geom.Rectangle(x, y, Width, RowHeight), backColor, 255);

            //_items.DrawRectangle(0, 0, x, y, Width, RowHeight, 0, 0, backColor.ToNativeColor(), 0, 0, 0, 0, 0, 255);

            DataGridColumn dataGridColumn;

            for (int i = 0; i < _columns.Count; i++)
            {
                dataGridColumn = (DataGridColumn)_columns[i];

                //0
                _items.DrawTextInRect(data[i].ToString(), x + 5, y + (RowHeight - Font.Height) / 2, dataGridColumn.Width, RowHeight, new StringFormat(), fontColor, Font);
                _items.DrawLine(GridColor, 1, x, y, x, y + RowHeight);

                x += dataGridColumn.Width;
            }
        }