本文整理汇总了C#中MxitTestApp.UserSession.hasNewMessageEvent方法的典型用法代码示例。如果您正苦于以下问题:C# UserSession.hasNewMessageEvent方法的具体用法?C# UserSession.hasNewMessageEvent怎么用?C# UserSession.hasNewMessageEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MxitTestApp.UserSession
的用法示例。
在下文中一共展示了UserSession.hasNewMessageEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getOutputScreenMessage
public override MessageToSend getOutputScreenMessage(
UserSession us,
MenuPage mp,
MessageToSend ms,
InputHandlerResult ihr)
{
ms.Append(MessageBuilder.Elements.CreateClearScreen());
if (!mp.GetType().FullName.Equals("MxitTestApp.OptionMenuPage"))//TODO: Should be constant
throw new Exception("Invalid menu page passed into getScreen method ");
OptionMenuPage omp = (OptionMenuPage)mp;
ms.Append(omp.title + "\r\n", TextMarkup.Bold);
if (ihr.action == InputHandlerResult.INVALID_MENU_ACTION
&& ihr.error != null)
{
ms.Append((string)ihr.error + "\r\n");
}
else
{
ms.Append(parseMessage(us, omp.message) + "\r\n");
}
ms.AppendLine("Refer a friend to the BibleApp on MXit by using the link below. ");
ms.AppendLine(createMessageLink(MENU_LINK_NAME, "Spread The Word", MainMenuHandler.REFER_A_FRIEND));
ms.AppendLine();
if (us.user_profile.is_suspended)
{
ms.Append("\r\n");
ms.Append("You have been suspended from this application. Please email us at [email protected]");
ms.Append("\r\n");
ms.Append("\r\n");
return ms;
}
if (us.hasVariable(UserSession.GUEST_USER_NAME_ASSIGNED))
{
ms.Append("\r\n");
ms.Append("You have been assigned a guest user name. To remove this message please change your user name in the profile option below.");
ms.Append("\r\n");
ms.Append("\r\n");
}
if (us.bookmark_manager.bookmark_verse != null)
{
ms.Append("To continue reading where you left off ");
ms.Append(createMessageLink(MENU_LINK_NAME, "Click Here", "BOOKMARK"));
ms.Append("\r\n");
ms.Append("\r\n");
ms.Append("Or choose an option below...\r\n");
}
else
{
ms.Append("Choose an option below...\r\n");
}
List<MenuOptionItem> options = omp.options;
int count =1 ;
foreach (MenuOptionItem option in options)
{
ms.Append(createMessageLink(MENU_LINK_NAME, count + ") ", option.link_val));
if (option.menu_option_id == MY_PROFILE_OPTION_ID)
{
if (us.hasNewEvent())
{
ms.Append(option.display_text + " (!)\r\n", TextMarkup.Bold);
}
else
{
ms.Append(option.display_text + "\r\n");
}
}
else
{
ms.Append(option.display_text + "\r\n");
}
count++;
}
appendBackMainLinks(us, ms);
appendMessageConfig(true, ms);
ms.AppendLine("");
ms.AppendLine("");
ms.AppendLine("Shortcuts...", TextMarkup.Bold);
ms.Append(createMessageLink(MENU_LINK_NAME, "Inbox", MainMenuHandler.MESSAGE_INBOX));
if (us.hasNewMessageEvent())
{
ms.Append(" (NEW)", TextMarkup.Bold);
}
if (us.hasNewFriendRequest())
{
ms.Append(" | ");
ms.Append(createMessageLink(MENU_LINK_NAME, "Buddy Requests", MainMenuHandler.BUDDY_REQUESTS));
ms.Append(" (NEW)", TextMarkup.Bold);
}
//.........这里部分代码省略.........