示例#1
0
        /// <summary>
        /// Creates a new <see>ChatDocument</see> to handle the specified client.
        /// </summary>
        /// <param name="client">The client to handle.</param>
        public ChatDocument(BattleNetClient client)
            : this()
        {
            m_client  = client;
            m_prp     = ProfileResourceProvider.GetForClient(client);
            m_profile = client.Settings as ClientProfile;

            SetupEventRegistration();
        }
示例#2
0
        public ChannelList(BattleNetClient client)
            : this()
        {
            m_client = client;

            ProcessEventSetup();

            m_resourceProvider = ProfileResourceProvider.GetForClient(client);
        }
示例#3
0
        public ClanList(BattleNetClient client)
            : this()
        {
            m_client = client;

            m_prp = ProfileResourceProvider.GetForClient(client);

            client.ClanMemberListReceived += new ClanMemberListEventHandler(client_ClanMemberListReceived);
            client.ClanMembershipReceived += new ClanMembershipEventHandler(client_ClanMembershipReceived);
        }
示例#4
0
        void EnteredChat(object sender, EnteredChatEventArgs e)
        {
            Product clientProduct = Product.GetByProductCode(m_client.Settings.Client.ToUpperInvariant());
            string  imgID         = m_prp.Icons.GetImageIdFor(UserFlags.None, UserStats.CreateDefault(clientProduct));
            Image   userImg       = ProfileResourceProvider.GetForClient(m_client).Icons.GetImageFor(UserFlags.None, UserStats.CreateDefault(clientProduct));

            chat.AddChat(new ChatNode("Entered chat as ", CssClasses.EnteringChat),
                         new ImageChatNode(string.Concat(imgID, ".jpg"),
                                           userImg, clientProduct.Name),
                         new ChatNode(e.UniqueUsername, CssClasses.UsernameOther));
            m_userName    = e.UniqueUsername;
            m_inChat      = true;
            m_enteredChat = DateTime.Now;
        }