Exemplo n.º 1
0
 public frmUserChat(User user)
 {
     InitializeComponent();
     this.user = user;
     this.isTyping = false;
     WhatsEventHandler.MessageRecievedEvent += WhatsEventHandlerOnMessageRecievedEvent;
     WhatsEventHandler.IsTypingEvent += WhatsEventHandlerOnIsTypingEvent;
 }
Exemplo n.º 2
0
 public static User UserExists(string phoneNum, string nickName)
 {
     WhatsUserManager man = new WhatsUserManager();
     var whatsUser = man.CreateUser(phoneNum, phoneNum);
     var tmpUser = new User(phoneNum, nickName);
     tmpUser.SetUser(whatsUser);
     return tmpUser;
 }
Exemplo n.º 3
0
        private void CheckIfUserRegisteredAndCreate(FMessage mess)
        {
            if (this.messageHistory.ContainsKey(mess.key.remote_jid))
                return;

            var jidSplit = mess.key.remote_jid.Split('@');
            WhatsUser tmpWhatsUser = new WhatsUser(jidSplit[0], jidSplit[1], mess.key.serverNickname);
            User tmpUser = new User(jidSplit[0], jidSplit[1]);
            tmpUser.SetUser(tmpWhatsUser);

            this.messageHistory.Add(mess.key.remote_jid, new List<FMessage>());
            this.messageHistory[mess.key.remote_jid].Add(mess);
        }
Exemplo n.º 4
0
 public void RegisterUser(User user, WhatsEventHandler.MessageRecievedHandler messHandler)
 {
 }