public void HandleFriendRequestAnswer(FriendRequestAnswer answer, ToxEventArgs.FriendRequestEventArgs e)
 {
     switch (answer)
     {
         case FriendRequestAnswer.Accept:
             ToxModel.Instance.AddFriendNoRequest(e.PublicKey);
             return;
         case FriendRequestAnswer.Decline:
             return;
         case FriendRequestAnswer.Later:
             Items.Add(new OneFriendRequestViewModel(this, e.PublicKey, e.Message));
             return;
     }
 }
Esempio n. 2
0
        private void HandleFriendRequestAnswer(FriendRequestAnswer answer, ToxEventArgs.FriendRequestEventArgs e)
        {
            switch (answer)
            {
            case FriendRequestAnswer.Accept:
                _toxModel.AddFriendNoRequest(e.PublicKey);
                return;

            case FriendRequestAnswer.Decline:
                return;

            case FriendRequestAnswer.Later:
                Requests.Add(new OneFriendRequestViewModel(_toxModel, this, e.PublicKey, e.Message));
                return;
            }
        }