Exemplo n.º 1
0
        public void SetVisible(bool toggleTo, bool month = true, bool day = true, bool year = true, bool hour = true, bool minute = true, bool amPm = true)
        {
            if (!TcdEditer.IsEditing)
            {
                ScreenTCD.SetVisible(SlotType, toggleTo, month, day, year, hour, minute, amPm);
            }

            Scaleform.SetVisible(toggleTo, month, day, year, hour, minute);

            if ((!toggleTo && amPm) || (toggleTo && !amPm))
            {
                amProp?.DeleteProp();
                pmProp?.DeleteProp();
            }
            else if ((!toggleTo && !amPm) || (toggleTo && amPm))
            {
                amProp.SetState(date.ToString("tt", CultureInfo.InvariantCulture) == "AM");
                pmProp.SetState(date.ToString("tt", CultureInfo.InvariantCulture) != "AM");
            }

            toggle = toggleTo;
        }