コード例 #1
0
ファイル: AInputHandler.cs プロジェクト: rowan84/BibleApp
 protected string extractReply(MessageReceived messageReceived)
 {
     if (messageReceived.Type == MessageType.Normal || messageReceived.Type == MessageType.Chat)
     {
         return messageReceived.Body;
     }
     else if (messageReceived.Type == MessageType.MXitCommand)
     {
         Dictionary<string, IReply> request = messageReceived.ExtractReply();
         return request[OptionScreenOutputAdapter.MENU_LINK_NAME].Value;
     }
     else if (messageReceived.Type == MessageType.ServiceRedirect
                 || messageReceived.Type == MessageType.Service2Service)
     {
         return MainMenuHandler.REFER_A_FRIEND_COMPLETED;
     }
     else
     {
         throw new Exception("Unsupported Message Received");
     }
 }