Пример #1
0
    /// <summary>
    /// 根据两个值进行比较,如果前者小于后者,前者变红,
    /// </summary>
    /// <param name="value"></param>
    /// <param name="needValue"></param>
    /// <returns></returns>
    public string GetNeedString(int needValue, int value)
    {
        string valueStr = value.ToString();

        if (value < needValue)
        {
            valueStr = UiUtility.GetTextColorString(value.ToString(), ColorType.Red);
        }
        return(string.Format("{0}/{1}", valueStr, needValue));
    }