Exemplo n.º 1
0
 public override void UserCame(User user)
 {
     try
     {
         UpdateContactList();
         Debug.WriteLine("Works(Came) - " + user.FirstName + " - (currentUser - " + GlobalBase.CurrentUser.FirstName + ")");
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 2
0
        public MessageMainVM(IMessaging View, User user) : base()
        {
            _view = View;
            _view.ScrolledToTop += OnScrolledToTop;

            GlobalBase.CurrentUser = user;

            GlobalBase.UpdateMessagesOnUI += () =>
            {
                _view.UpdateMessageList();
            };
            GlobalBase.AddMessageOnUi    += AddMessageOnUI;
            GlobalBase.UpdateContactList += UpdateContactList;
            GlobalBase.RemoveMessageOnUI += DeleteMessageOnUI;
            GlobalBase.UpdateProfileUi   += SetAvatarForUI;
            GlobalBase.ExitProgramm      += ExecuteOnExit;

            SetAvatarForUI();
            UpdateContactList();
            UserServiceClient.OnUserCame(user.Id);

            IsMenuEnabled = false;
            FileAmount    = 0;
        }