Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
comparison UI/StatsDataGridViewCell.cs @ 151:540c8aa6e565
Re #269: Handle multiple stat lines
* Start to rebuild UI using DataGridView, as we can get the header height from that and it replaces the original DataGrid
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 06 May 2010 20:05:43 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
150:0e3837170637 | 151:540c8aa6e565 |
---|---|
1 // This file (StatsDataGridViewCell.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2010 IBBoard. | |
2 // | |
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. | |
4 | |
5 using System; | |
6 using System.ComponentModel; | |
7 using System.Windows.Forms; | |
8 using IBBoard.WarFoundry.API.Objects; | |
9 | |
10 namespace IBBoard.WarFoundry.GUI.WinForms.UI | |
11 { | |
12 public class StatsDataGridViewCell : DataGridViewTextBoxCell | |
13 { | |
14 protected override Object GetFormattedValue(Object value, int rowIndex, ref DataGridViewCellStyle cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context) | |
15 { | |
16 return value == null ? "" : ((Stat)value).SlotValueString; | |
17 } | |
18 } | |
19 } |