コード例 #1
0
 private void UserRequestCompleted(User user, UserRequestDialog.RequestPurpose purpose)
 {
     if (purpose == UserRequestDialog.RequestPurpose.currentName)
     {
         _user = user;
         _localData.ChangeUser(user);
         user.Friends = _localData.FindFriendsOfUser(user);
         user.Groups  = _localData.FindGroupsOfUser(user);
         SetUserView();
         menu.SetButtonsEnable(true);
     }
     else if (purpose == UserRequestDialog.RequestPurpose.newFriendName)
     {
         _localData.AddNewFriend(_user, user);
         _user.Friends.Add(user);
         SetFriendsView(UI.Views.FriendsView.Mode.Editable);
     }
 }