Exemple #1
0
        internal void StartSellingItem()
        {
            Thread.Sleep(2000);
            Jid jid = new Jid(string.Format(ITEM_ID_AS_LOGIN, item.Identifier), ApplicationRunner.XMPP_HOSTNAME, AUCTION_RESOURCE);

            connection.Password                 = AUCTION_PASSWORD;
            connection.Username                 = jid.User;
            connection.AutoAgents               = false;
            connection.AutoPresence             = true;
            connection.AutoRoster               = true;
            connection.AutoResolveConnectServer = true;

            ChatManager chatManager = new ChatManager(connection);

            chatManager.AddChatListener(new ChatManagerListener
            {
                OnChatCreated = (Chat chat) =>
                {
                    currentChat = chat;

                    chat.MessageListener = messageListener;
                }
            });

            connection.Open();
        }