view UI/StatsDataGridViewCell.cs @ 210:694f23814ec2

Re #354: Single-button Add Unit * Make the form translatable * Update FrmArmyTree so it doesn't look out of place (ContextMenuStrip and update the icons) * Add "change selection on right-click" code to solve calculation issues * Hide categories that don't have entries (assume they're not relevant to that race) Also: * Clean up code and replace space indents with tabs
author IBBoard <dev@ibboard.co.uk>
date Sat, 20 Aug 2011 20:58:16 +0100
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;
		}
	}
}