Exemple #1
0
 public Chat(ChatServiceCallbackClient client, ChatClient.ChatService.User userInfo, ChatClient.ChatService.ChatRoom chatRoom)
 {
     InitializeComponent();
     this.client    = client;
     this.userInfo  = userInfo;
     this.chatRoom  = chatRoom;
     header.Content = chatRoom.Name + " Chat Room";
     client.JoinChatRoom(userInfo.Id + userInfo.Nickname, chatRoom.Id + chatRoom.Name);
     client.LatestMessageList += new LatestMessages(client_LatestMessages_Event);
 }
Exemple #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            currentUser = chatServer.Login(new ChatService.User()
            {
                UserName = txtUserName.Text
            });

            FillRoomList();

            tmrSync.Enabled = true;
        }