Mercurial > repos > IBBoard.WarFoundry.GUI.WinForms
view UI/StatsDataGridViewCell.cs @ 203:b4e428dcfcb6 default-army-name
Re #153: Default name for armies
* Have a fight between VS.Net versions over how to reference projects (may need to update from 2K3 but still target .Net 2)
* Use property of race object and clean up comments
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 07 Sep 2010 20:03:52 +0000 |
parents | 540c8aa6e565 |
children |
line wrap: on
line source
// This file (StatsDataGridViewCell.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2010 IBBoard. // // 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. using System; using System.ComponentModel; using System.Windows.Forms; using IBBoard.WarFoundry.API.Objects; namespace IBBoard.WarFoundry.GUI.WinForms.UI { public class StatsDataGridViewCell : DataGridViewTextBoxCell { protected override Object GetFormattedValue(Object value, int rowIndex, ref DataGridViewCellStyle cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context) { return value == null ? "" : ((Stat)value).SlotValueString; } } }