コード例 #1
0
 private void RecentUsers_RecentUserHeadChanged(ProfilePicture sender, MessageSender messageSender)
 {
     if (_protoService.TryGetUser(messageSender, out User user))
     {
         sender.SetUser(_protoService, user, 32);
     }
     else if (_protoService.TryGetChat(messageSender, out Chat chat))
     {
         sender.SetChat(_protoService, chat, 32);
     }
 }
コード例 #2
0
 private void RecentUsers_RecentUserHeadChanged(ProfilePicture photo, MessageSender sender)
 {
     if (_protoService.TryGetUser(sender, out User user))
     {
         photo.SetUser(_protoService, user, 32);
     }
     else if (_protoService.TryGetChat(sender, out Chat chat))
     {
         photo.SetChat(_protoService, chat, 32);
     }
     else
     {
         photo.Source = null;
     }
 }