Пример #1
0
        private void ShowDaysLeftReminder()
        {
            ////remider daysleft from config//////
            bool isReminderDayToday = false;

            string[] reminderdays = null;;
            string   strdaysleft  = confService.GetConfigValueForKey("daysleftreminder");//23nov2012

            if (strdaysleft != null && strdaysleft.Trim().Length > 0)
            {
                reminderdays = strdaysleft.Split(',');
            }
            if (reminderdays != null)
            {
                foreach (string s in reminderdays)
                {
                    if (DaysLeft.ToString().Trim().Equals(s.Trim()))
                    {
                        isReminderDayToday = true;
                        break;
                    }
                }
            }

            //only show popup when these many number of days are left.
            if (DaysLeft == 0 || DaysLeft == 1 || isReminderDayToday)
            {
                MessageBox.Show(LicMessage + " : " + LicType, "License Status", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
Пример #2
0
 private string CreateName()
 {
     if (DaysLeft == 9999)
     {
         return("∞d " + RealName);
     }
     else
     {
         return(DaysLeft.ToString(C) + "d " + RealName);
     }
 }
Пример #3
0
    public void OnDraw()
    {
        float alpha = DaysLeft == 0 ? 1.0f : 0.5f;

        image.color = new Color(1.0f, 1.0f, 1.0f, alpha);

        if (DaysLeft != 0)
        {
            numberText.text = DaysLeft.ToString();
        }
        else if (DaysBroken != 0)
        {
            numberText.text = $"<color=red>-{DaysBroken}</color>";
        }
        else
        {
            numberText.text = "";
        }

        imageFire.enabled = DaysBroken > 0;
    }