Exemplo n.º 1
0
    /// <summary>
    /// 设置季度
    /// </summary>
    /// <param name="month"></param>
    public void SetSeasons(int month)
    {
        if (tvSeasons == null)
        {
            return;
        }
        switch ((SeasonsEnum)month)
        {
        case SeasonsEnum.Spring:
            tvSeasons.text = TextHandler.Instance.manager.GetTextById(33);
            break;

        case SeasonsEnum.Summer:
            tvSeasons.text = TextHandler.Instance.manager.GetTextById(34);
            break;

        case SeasonsEnum.Autumn:
            tvSeasons.text = TextHandler.Instance.manager.GetTextById(35);
            break;

        case SeasonsEnum.Winter:
            tvSeasons.text = TextHandler.Instance.manager.GetTextById(36);
            break;

        default:
            tvSeasons.text = "";
            break;
        }
        tvSeasons.color = SeasonsEnumTools.GetSeasonsColor((SeasonsEnum)month);
    }
Exemplo n.º 2
0
    public void SetMonthAndDay(int month, int day)
    {
        if (tvMonthAndDay == null)
        {
            return;
        }
        string seasons = "";

        switch (month)
        {
        case 1:
            seasons = TextHandler.Instance.manager.GetTextById(33);
            break;

        case 2:
            seasons = TextHandler.Instance.manager.GetTextById(34);
            break;

        case 3:
            seasons = TextHandler.Instance.manager.GetTextById(35);
            break;

        case 4:
            seasons = TextHandler.Instance.manager.GetTextById(36);
            break;
        }
        tvMonthAndDay.color = SeasonsEnumTools.GetSeasonsColor((SeasonsEnum)month);
        tvMonthAndDay.text  = seasons + " " + day + TextHandler.Instance.manager.GetTextById(31);
    }