Example #1
0
        private void bNetProfileControl_Click(object sender, EventArgs e)
        {
            var control = sender as BNetProfileControl;

            if (control == null)
            {
                return;
            }

            SuspendLayout();

            if (activeProfileControl != null)
            {
                activeProfileControl.IsHighlighted = false;
            }

            control.IsHighlighted = true;

            var profileContainer = (D3ProfileContainer)control.Tag;
            var career           = FetchCareer(profileContainer.BattleTag, profileContainer.Host);

            ShowCareer(career, profileContainer.BattleTag, profileContainer.Host);

            activeProfileControl = control;

            ResumeLayout();
        }
Example #2
0
        private void AddProfile(D3ProfileContainer profileContainer)
        {
            var control = new BNetProfileControl(profileContainer.BattleTag, profileContainer.Host)
            {
                Tag = profileContainer
            };

            control.Click += bNetProfileControl_Click;

            guiProfilePanel.Controls.Add(control);
        }
        private void bNetProfileControl_Click(object sender, EventArgs e)
        {
            var control = sender as BNetProfileControl;

            if (control == null)
            {
                return;
            }

            SuspendLayout();

            if (activeProfileControl != null)
            {
                activeProfileControl.IsHighlighted = false;
            }

            control.IsHighlighted = true;

            var profileContainer = (D3ProfileContainer)control.Tag;
            var career = FetchCareer(profileContainer.BattleTag, profileContainer.Host);
            ShowCareer(career, profileContainer.BattleTag, profileContainer.Host);

            activeProfileControl = control;

            ResumeLayout();
        }
        private void AddProfile(D3ProfileContainer profileContainer)
        {
            var control = new BNetProfileControl(profileContainer.BattleTag, profileContainer.Host) { Tag = profileContainer };

            control.Click += bNetProfileControl_Click;

            guiProfilePanel.Controls.Add(control);
        }