Пример #1
0
 private void btnUsername_Click(object sender, EventArgs ea)
 {
     _username   = tbUsername.Text.Trim();
     _connection = new JmsConnection(_username);
     _connection.ChatListUpdateDelegate    += UpdateChatList;
     _connection.ChatMessageUpdateDelegate += UpdateChatMessages;
     FormClosing          += (s, e) => { _connection.Disconnect(); };
     panelUsername.Visible = false;
     lblUsername.Text      = _username;
     FormTransform.TransformSize(this, Width, 490);
 }
Пример #2
0
        private void OpenConversation(Conversation c)
        {
            _connection.ActiveConversation = c;
            var conversation = c as GroupConversation;

            gbConversation.Text = conversation != null?conversation.GetGroupName() : ((PersonalConversation)c).GetAuthor();

            UpdateChatMessages();
            if (Width != 834)
            {
                FormTransform.TransformSize(this, 834, Height);
            }
        }