本文整理汇总了C#中PhoneApplicationPage.Alert方法的典型用法代码示例。如果您正苦于以下问题:C# PhoneApplicationPage.Alert方法的具体用法?C# PhoneApplicationPage.Alert怎么用?C# PhoneApplicationPage.Alert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhoneApplicationPage
的用法示例。
在下文中一共展示了PhoneApplicationPage.Alert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowHolidayWords
/// <summary>
/// Shows the holiday words.
/// </summary>
/// <param name="page">The page.</param>
public static void ShowHolidayWords(PhoneApplicationPage page)
{
string key;
string str2 = System.DateTime.Now.Date.ToString("MM-dd");
var str = System.DateTime.Now.Date.ToString("yyyy-MM-dd");
if (holidays.Contains<string>(str) || holidays.Contains<string>(str2))
{
IsolatedAppSetingsHelper.DoActionOnceBy("HolidayKey", (p) => p != str2, str2, () =>
{
if (!hasShowToday && (System.DateTime.Now.TimeOfDay <= System.TimeSpan.FromHours(18.0)))
{
hasShowToday = true;
key = holidays.Contains<string>(str) ? str : string.Empty;
key = holidays.Contains<string>(str2) ? str2 : key;
if (holidays.Contains<string>(str) || holidays.Contains<string>(str2))
{
System.Func<TipsItem, Boolean> predicate = null;
System.Func<TipsItem, Boolean> func2 = null;
System.Collections.Generic.IEnumerable<TipsItem> tips = AboutPageViewModel.GetTips(4);
if (predicate == null)
{
predicate = p => p.Text.Contains(key);
}
if (tips.Count<TipsItem>(predicate) != 0)
{
if (func2 == null)
{
func2 = p => p.Text.Contains(key);
}
key = tips.FirstOrDefault<TipsItem>(func2).Text.Replace("#NTL#", "\r\n").Replace("[" + key + "]", string.Empty).FormatWith(new object[] { ViewModelLocator.MainPageViewModel.AccountInfoSummary.MoneyInfo.MoneyInfo });
decimal money = ViewModelLocator.MainPageViewModel.AccountInfoSummary.MoneyInfo.Money;
if (key.Contains("#NoEnoughMoneyMessage#"))
{
string newValue = string.Empty;
if (((money > 0.0M) && (money <= 1000M)) || (money < 0M))
{
newValue = LocalizedStrings.GetLanguageInfoByKey("NoEnoughMoneyMessage");
}
key = key.Replace("#NoEnoughMoneyMessage#", newValue);
}
page.Alert(key, null);
}
}
}
});
}
}