private void BT_SendAddFriendMessage_Click(object sender, RoutedEventArgs e) { ContentControl bt = sender as ContentControl; long num = Convert.ToInt64(bt.Tag); SocketTool.GetClientUDP().SendToServer(TheMessageModel.MAKEFRIEND(UserSource.UloginNumber ?? 0, num, Model.MessageContent.MakeFriendType.SendStart)); }
private void MENUITEM_Friends_Click(object sender, RoutedEventArgs e) { MenuItem item = (sender as MenuItem); User SelectedUser = item.DataContext as User; switch (item.Tag.ToString().ToUpper()) { case "DELETEFRIEND": SocketTool.GetClientUDP().SendToServer(TheMessageModel.MAKEFRIEND(UserSource.UloginNumber ?? 0, SelectedUser.UloginNumber ?? 0, MakeFriendType.Delete)) ; break; } }