Esempio n. 1
0
        public static DialogResult ShowExpiredDialog(int daysRemaining)
        {
            ExpirationForm form = new ExpirationForm();

            string title;
            string message;

            if (daysRemaining <= 0)
            {
                title   = Res.Get(StringId.BetaExpiredTitle);
                message = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.BetaExpiredMessage), ApplicationEnvironment.ProductNameQualified);
            }
            else
            {
                title = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.BetaDaysRemaining), daysRemaining);
                if (daysRemaining == 1)
                {
                    title = Res.Get(StringId.Beta1DayRemaining);
                }
                message = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.BetaRemainingMessage), ApplicationEnvironment.ProductNameQualified, ExpirationSettings.Expires.ToShortDateString());
            }

            form.Title   = title;
            form.Text    = Res.Get(StringId.BetaExpiredDialogTitle);
            form.Message = message;
            return(form.ShowDialog());
        }
        public static DialogResult ShowExpiredDialog(int daysRemaining)
        {
            ExpirationForm form = new ExpirationForm();

            string title;
            string message;
            if (daysRemaining <= 0)
            {
                title = Res.Get(StringId.BetaExpiredTitle);
                message = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.BetaExpiredMessage), ApplicationEnvironment.ProductNameQualified);
            }
            else
            {
                title = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.BetaDaysRemaining), daysRemaining);
                if (daysRemaining == 1)
                    title = Res.Get(StringId.Beta1DayRemaining);
                message = string.Format(CultureInfo.CurrentCulture, Res.Get(StringId.BetaRemainingMessage), ApplicationEnvironment.ProductNameQualified, ExpirationSettings.Expires.ToShortDateString());
            }

            form.Title = title;
            form.Text = Res.Get(StringId.BetaExpiredDialogTitle);
            form.Message = message;
            return form.ShowDialog();
        }