Beispiel #1
0
        private ProfileDocument(BattleNetClient client)
            : this()
        {
            m_client  = client;
            this.Text = this.TabText = (client.Settings as ClientProfile).ProfileName;

            if (client.Settings.Client == Product.StarcraftRetail.ProductCode || client.Settings.Client == Product.StarcraftBroodWar.ProductCode ||
                client.Settings.Client == Product.Warcraft3Retail.ProductCode || client.Settings.Client == Product.Warcraft3Expansion.ProductCode)
            {
                //WardenPacketHandler module = new WardenPacketHandler(client);
                //m_client.WardenHandler = module;
            }

            client.EventExceptionThrown += new EventExceptionEventHandler(client_EventExceptionThrown);

            m_chat      = new ChatDocument(client);
            m_chat.Text = "Main chat window (Disconnected)";
            m_chat.Show(this.dock);

            m_channel = new ChannelList(client);
            m_channel.Show(this.dock);

            IBattleNetSettings settings   = client.Settings;
            string             clientCode = settings.Client;

            if (clientCode.Equals(Product.Warcraft3Retail.ProductCode, StringComparison.Ordinal) ||
                clientCode.Equals(Product.Warcraft3Expansion.ProductCode, StringComparison.Ordinal))
            {
                m_friends = new FriendsList(client);
                m_friends.Show(this.dock);

                m_clan = new ClanList(client);
                m_clan.Show(this.dock);

                m_news = new NewsList(client);
                m_news.Show(this.dock);
                m_news.DockState = DockState.DockLeftAutoHide;
            }
            else if (clientCode.Equals(Product.StarcraftRetail.ProductCode, StringComparison.Ordinal) ||
                     clientCode.Equals(Product.StarcraftBroodWar.ProductCode, StringComparison.Ordinal))
            {
                m_friends = new FriendsList(client);
                m_friends.Show(this.dock);
            }

            m_channel.Show();

            m_ssUri = m_chat.StylesheetUri;

            m_documents.Add(m_chat);

            client.RegisterWarcraftProfileReceivedNotification(Priority.Low, WarcraftProfileReceived);

            m_channel.VoidView = this.VoidView;
        }
Beispiel #2
0
        private ProfileDocument(BattleNetClient client)
            : this()
        {
            m_client = client;
            this.Text = this.TabText = (client.Settings as ClientProfile).ProfileName;

            if (client.Settings.Client == Product.StarcraftRetail.ProductCode || client.Settings.Client == Product.StarcraftBroodWar.ProductCode 
                || client.Settings.Client == Product.Warcraft3Retail.ProductCode || client.Settings.Client == Product.Warcraft3Expansion.ProductCode)
            {
                //WardenPacketHandler module = new WardenPacketHandler(client);
                //m_client.WardenHandler = module;
            }

            client.EventExceptionThrown += new EventExceptionEventHandler(client_EventExceptionThrown);

            m_chat = new ChatDocument(client);
            m_chat.Text = "Main chat window (Disconnected)";
            m_chat.Show(this.dock);

            m_channel = new ChannelList(client);
            m_channel.Show(this.dock);

            IBattleNetSettings settings = client.Settings;
            string clientCode = settings.Client;
            if (clientCode.Equals(Product.Warcraft3Retail.ProductCode, StringComparison.Ordinal) ||
                clientCode.Equals(Product.Warcraft3Expansion.ProductCode, StringComparison.Ordinal))
            {
                m_friends = new FriendsList(client);
                m_friends.Show(this.dock);

                m_clan = new ClanList(client);
                m_clan.Show(this.dock);

                m_news = new NewsList(client);
                m_news.Show(this.dock);
                m_news.DockState = DockState.DockLeftAutoHide;
            }
            else if (clientCode.Equals(Product.StarcraftRetail.ProductCode, StringComparison.Ordinal) ||
                clientCode.Equals(Product.StarcraftBroodWar.ProductCode, StringComparison.Ordinal))
            {
                m_friends = new FriendsList(client);
                m_friends.Show(this.dock);
            }

            m_channel.Show();

            m_ssUri = m_chat.StylesheetUri;

            m_documents.Add(m_chat);

            client.RegisterWarcraftProfileReceivedNotification(Priority.Low, WarcraftProfileReceived);

            m_channel.VoidView = this.VoidView;
        }