Beispiel #1
0
    private void TimeSetting()
    {
        int restTimeSeconds = GUIBannerParts.GetRestTimeSeconds(DateTime.Parse(this.bannerInfo.endTime));
        int secondToDays    = GUIBannerParts.GetSecondToDays(restTimeSeconds);
        int secondToHours   = GUIBannerParts.GetSecondToHours(restTimeSeconds);
        int secondToMinutes = GUIBannerParts.GetSecondToMinutes(restTimeSeconds);

        if (secondToDays > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeD"), secondToDays);
        }
        else if (secondToHours > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeH"), secondToHours);
        }
        else if (secondToMinutes > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeM"), secondToMinutes);
        }
        else if (restTimeSeconds > 0)
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeRemaining") + string.Format(StringMaster.GetString("SystemTimeM"), 1);
        }
        else
        {
            this.fukidashiLabel.text = StringMaster.GetString("ExchangeCloseTitle");
            base.CancelInvoke("TimeSetting");
        }
    }
 public static int GetSecondToMinutes(int totalSeconds)
 {
     return((totalSeconds - GUIBannerParts.DAY_SECONDS * GUIBannerParts.GetSecondToDays(totalSeconds) - GUIBannerParts.HOUR_SECONDS * GUIBannerParts.GetSecondToHours(totalSeconds)) / GUIBannerParts.MINUTES_SECONDS);
 }