Exemplo n.º 1
0
        private void item_MouseMove(object sender, MouseEventArgs e)
        {
            runes playerItem = (runes)((RuneItem)sender).Tag;
            if (PlayerItem == null)
            {
                PlayerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(PlayerItem);

                Panel.SetZIndex(PlayerItem, 4);

                //Only load once
                PlayerItem.ProfileImage.Source = playerItem.icon;
                PlayerItem.PlayerName.Content = playerItem.name;

                PlayerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                if (PlayerItem.PlayerName.DesiredSize.Width > 250) //Make title fit in item
                    PlayerItem.Width = PlayerItem.PlayerName.DesiredSize.Width;
                else
                    PlayerItem.Width = 250;
                PlayerItem.PlayerLeague.Content = playerItem.id;
                PlayerItem.UsingLegendary.Visibility = System.Windows.Visibility.Hidden;

                PlayerItem.PlayerWins.Content = ((string)playerItem.description.Replace("<br>", Environment.NewLine));
                PlayerItem.PlayerStatus.Text = "";
                PlayerItem.LevelLabel.Content = "";
                PlayerItem.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                PlayerItem.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            }

            Point MouseLocation = e.GetPosition(Client.MainGrid);

            double YMargin = MouseLocation.Y;

            double XMargin = MouseLocation.X;
            if (XMargin + PlayerItem.Width + 10 > Client.MainGrid.ActualWidth)
                XMargin = Client.MainGrid.ActualWidth - PlayerItem.Width - 10;

            PlayerItem.Margin = new Thickness(XMargin + 5, YMargin + 5, 0, 0);
        }
Exemplo n.º 2
0
        private void img_MouseMove(object sender, MouseEventArgs e)
        {
            var icon = (SmallChampionItem)sender;
            var img = (BitmapImage)icon.ChampionImage.Source;
            if (img == null)
                return;

            var playerItem = (LargeChatPlayer)icon.Tag;
            if (playerItem != null)
            {
                string[] s = img.UriSource.Segments;
                int id = int.Parse(s[s.Length - 1].Replace(".png", ""));
                Client.MainGrid.Children.Add(playerItem);

                items item = items.GetItem(id);

                playerItem = new LargeChatPlayer();

                playerItem.PlayerName.Content = item.name;
                playerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                playerItem.Width = playerItem.PlayerName.DesiredSize.Width > 250
                    ? playerItem.PlayerName.DesiredSize.Width
                    : 250;
                playerItem.PlayerWins.Content = item.price + " gold (" + item.sellprice + " sell)";
                playerItem.PlayerLeague.Content = "Item ID " + item.id;
                playerItem.LevelLabel.Content = "";
                playerItem.UsingLegendary.Visibility = Visibility.Hidden;

                string parsedDescription = item.description;
                parsedDescription = parsedDescription.Replace("<br>", Environment.NewLine);
                parsedDescription = Regex.Replace(parsedDescription, "<.*?>", string.Empty);
                playerItem.PlayerStatus.Text = parsedDescription;

                playerItem.ProfileImage.Source = img;
                playerItem.HorizontalAlignment = HorizontalAlignment.Left;
                playerItem.VerticalAlignment = VerticalAlignment.Top;
                playerItem.Visibility = Visibility.Hidden;
                icon.Tag = playerItem;
            }

            if (playerItem == null || playerItem.ActualHeight == 0 || playerItem.ActualWidth == 0)
                return;

            double yMargin = (Client.MainGrid.ActualHeight / 2) - (playerItem.ActualHeight / 2);
            double xMargin = (Client.MainGrid.ActualWidth / 2) - (playerItem.ActualWidth / 2);
            playerItem.Margin = new Thickness(xMargin, yMargin, 0, 0);
            if (playerItem.Visibility == Visibility.Hidden)
                playerItem.Visibility = Visibility.Visible;
        }
Exemplo n.º 3
0
        private void img_MouseMove(object sender, MouseEventArgs e)
        {
            Image item = (Image)sender;
            ProfilePage.KeyValueItem playerItem = (ProfilePage.KeyValueItem)item.Tag;
            if (PlayerItem == null)
            {
                PlayerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(PlayerItem);

                items Item = items.GetItem(Convert.ToInt32(playerItem.Value));

                PlayerItem.PlayerName.Content = Item.name;

                PlayerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                if (PlayerItem.PlayerName.DesiredSize.Width > 250) //Make title fit in item
                    PlayerItem.Width = PlayerItem.PlayerName.DesiredSize.Width;
                else
                    PlayerItem.Width = 250;

                PlayerItem.PlayerWins.Content = Item.price + " gold (" + Item.sellprice + " sell)";
                PlayerItem.PlayerLeague.Content = "Item ID " + Item.id;
                PlayerItem.LevelLabel.Content = "";
                PlayerItem.UsingLegendary.Visibility = System.Windows.Visibility.Hidden;

                string ParsedDescription = Item.description;
                ParsedDescription = ParsedDescription.Replace("<br>", Environment.NewLine);
                ParsedDescription = Regex.Replace(ParsedDescription, "<.*?>", string.Empty);
                PlayerItem.PlayerStatus.Text = ParsedDescription;

                var uriSource = Path.Combine(Client.ExecutingDirectory, "Assets", "item", Item.id + ".png");
                PlayerItem.ProfileImage.Source = Client.GetImage(uriSource);

                PlayerItem.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                PlayerItem.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            }

            Point MouseLocation = e.GetPosition(Client.MainGrid);

            double YMargin = MouseLocation.Y;

            double XMargin = MouseLocation.X;
            if (XMargin + PlayerItem.Width + 10 > Client.MainGrid.ActualWidth)
                XMargin = Client.MainGrid.ActualWidth - PlayerItem.Width - 10;

            PlayerItem.Margin = new Thickness(XMargin + 5, YMargin + 5, 0, 0);
        }
Exemplo n.º 4
0
 private void item_MouseLeave(object sender, MouseEventArgs e)
 {
     if (PlayerItem != null)
     {
         Client.MainGrid.Children.Remove(PlayerItem);
         PlayerItem = null;
     }
 }
Exemplo n.º 5
0
        private void item_MouseLeave(object sender, MouseEventArgs e)
        {
            if (_playerItem == null)
            {
                return;
            }

            Client.MainGrid.Children.Remove(_playerItem);
            _playerItem = null;
        }
Exemplo n.º 6
0
        private void item_MouseMove(object sender, MouseEventArgs e)
        {
            var item = (MasteryItem) sender;
            var playerItem = (masteries) item.Tag;
            if (_playerItem == null)
            {
                _playerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(_playerItem);

                Panel.SetZIndex(_playerItem, 4);

                //Only load once
                _playerItem.ProfileImage.Source = playerItem.icon;
                _playerItem.PlayerName.Content = playerItem.name;

                _playerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                _playerItem.Width = _playerItem.PlayerName.DesiredSize.Width > 250
                    ? _playerItem.PlayerName.DesiredSize.Width
                    : 250;

                _playerItem.PlayerWins.Content = "Requires " + playerItem.treeRow*4 + " points in " + playerItem.tree;

                var isAtRequirement = true;
                switch (playerItem.tree)
                {
                    case "Offense":
                        if (_offenseUsedPoints < playerItem.treeRow*4)
                        {
                            isAtRequirement = false;
                        }
                        break;
                    case "Defense":
                        if (_defenseUsedPoints < playerItem.treeRow*4)
                        {
                            isAtRequirement = false;
                        }
                        break;
                    default:
                        if (_utilityUsedPoints < playerItem.treeRow*4)
                        {
                            isAtRequirement = false;
                        }
                        break;
                }

                if (isAtRequirement)
                {
                    if (playerItem.prereq != 0)
                    {
                        var prereqMastery = Client.Masteries.Find(x => playerItem.prereq == x.id);
                        _playerItem.PlayerWins.Content = "Requires " + prereqMastery.ranks + " points in " +
                                                         prereqMastery.name;
                    }
                }

                _playerItem.PlayerLeague.Content = playerItem.id;
                _playerItem.LevelLabel.Content = playerItem.selectedRank + "/" + playerItem.ranks;
                _playerItem.UsingLegendary.Visibility = Visibility.Hidden;

                var selectedRank = playerItem.selectedRank;
                if (selectedRank == 0)
                {
                    selectedRank = 1;
                }

                _playerItem.PlayerStatus.Text = ((string) playerItem.description[selectedRank - 1]).Replace("<br>",
                    Environment.NewLine);

                _playerItem.HorizontalAlignment = HorizontalAlignment.Left;
                _playerItem.VerticalAlignment = VerticalAlignment.Top;
            }

            var mouseLocation = e.GetPosition(Client.MainGrid);

            var yMargin = mouseLocation.Y;

            var xMargin = mouseLocation.X;
            if (xMargin + _playerItem.Width + 10 > Client.MainGrid.ActualWidth)
            {
                xMargin = Client.MainGrid.ActualWidth - _playerItem.Width - 10;
            }

            _playerItem.Margin = new Thickness(xMargin + 5, yMargin + 5, 0, 0);
        }
Exemplo n.º 7
0
        private void ChatPlayerMouseOver(object sender, MouseEventArgs e)
        {
            ChatPlayer item = (ChatPlayer)sender;
            ChatPlayerItem playerItem = (ChatPlayerItem)item.Tag;
            if (PlayerItem == null)
            {
                PlayerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(PlayerItem);
                Panel.SetZIndex(PlayerItem, 5);
                PlayerItem.Tag = playerItem;
                PlayerItem.PlayerName.Content = playerItem.Username;
                PlayerItem.PlayerLeague.Content = playerItem.LeagueTier + " " + playerItem.LeagueDivision;
                if (playerItem.RankedWins == 0)
                    PlayerItem.PlayerWins.Content = playerItem.Wins + " Normal Wins";
                else
                    PlayerItem.PlayerWins.Content = playerItem.RankedWins + " Ranked Wins";
                PlayerItem.LevelLabel.Content = playerItem.Level;
                PlayerItem.UsingLegendary.Visibility = playerItem.UsingLegendary ? System.Windows.Visibility.Visible : System.Windows.Visibility.Hidden;
                var uriSource = Path.Combine(Client.ExecutingDirectory, "Assets", "profileicon", playerItem.ProfileIcon + ".png");
                PlayerItem.ProfileImage.Source = Client.GetImage(uriSource);
                if (playerItem.Status != null)
                {
                    PlayerItem.PlayerStatus.Text = playerItem.Status.Replace("∟", "");
                }
                else
                {
                    PlayerItem.PlayerStatus.Text = "";
                }

                if (playerItem.GameStatus != "outOfGame")
                {
                    TimeSpan elapsed = new TimeSpan();
                    if (playerItem.Timestamp != 0)
                    {
                        elapsed = DateTime.Now.Subtract(Client.JavaTimeStampToDateTime(playerItem.Timestamp));
                    }
                    switch (playerItem.GameStatus)
                    {
                        case "inGame":
                            champions InGameChamp = champions.GetChampion(playerItem.Champion);
                            if (InGameChamp != null)
                                PlayerItem.InGameStatus.Text = "In Game" + Environment.NewLine +
                                                               "Playing as " + InGameChamp.displayName + Environment.NewLine +
                                                               "For " + string.Format("{0} Minutes and {1} Seconds", elapsed.Minutes, elapsed.Seconds);
                            else
                                PlayerItem.InGameStatus.Text = "In Game";
                            break;
                        case "hostingPracticeGame":
                            PlayerItem.InGameStatus.Text = "Creating Custom Game";
                            break;
                        case "inQueue":
                            PlayerItem.InGameStatus.Text = "In Queue" + Environment.NewLine +
                                                           "For " + string.Format("{0} Minutes and {1} Seconds", elapsed.Minutes, elapsed.Seconds);
                            break;
                        case "spectating":
                            PlayerItem.InGameStatus.Text = "Spectating";
                            break;
                        case "championSelect":
                            PlayerItem.InGameStatus.Text = "In Champion Select" + Environment.NewLine +
                                                           "For " + string.Format("{0} Minutes and {1} Seconds", elapsed.Minutes, elapsed.Seconds);
                            break;
                    }
                    PlayerItem.InGameStatus.Visibility = System.Windows.Visibility.Visible;
                }

                PlayerItem.Width = 250;
                PlayerItem.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
                PlayerItem.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            }

            Point MouseLocation = e.GetPosition(Client.MainGrid);
            double YMargin = MouseLocation.Y;
            if (YMargin + 195 > Client.MainGrid.ActualHeight)
                YMargin = Client.MainGrid.ActualHeight - 195;
            PlayerItem.Margin = new Thickness(0, YMargin, 250, 0);
        }
Exemplo n.º 8
0
        private void item_MouseMove(object sender, MouseEventArgs e)
        {
            MasteryItem item = (MasteryItem)sender;
            masteries playerItem = (masteries)item.Tag;
            if (PlayerItem == null)
            {
                PlayerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(PlayerItem);

                Panel.SetZIndex(PlayerItem, 4);

                //Only load once
                PlayerItem.ProfileImage.Source = playerItem.icon;
                PlayerItem.PlayerName.Content = playerItem.name;

                PlayerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                if (PlayerItem.PlayerName.DesiredSize.Width > 250) //Make title fit in item
                    PlayerItem.Width = PlayerItem.PlayerName.DesiredSize.Width;
                else
                    PlayerItem.Width = 250;

                PlayerItem.PlayerWins.Content = "Requires " + playerItem.treeRow * 4 + " points in " + playerItem.tree;

                bool IsAtRequirement = true;
                switch (playerItem.tree)
                {
                    case "Offense":
                        if (OffenseUsedPoints < playerItem.treeRow * 4)
                            IsAtRequirement = false;
                        break;
                    case "Defense":
                        if (DefenseUsedPoints < playerItem.treeRow * 4)
                            IsAtRequirement = false;
                        break;
                    default:
                        if (UtilityUsedPoints < playerItem.treeRow * 4)
                            IsAtRequirement = false;
                        break;
                }

                if (IsAtRequirement)
                {
                    if (playerItem.prereq != 0)
                    {
                        masteries prereqMastery = Client.Masteries.Find(x => playerItem.prereq == x.id);
                        PlayerItem.PlayerWins.Content = "Requires " + prereqMastery.ranks + " points in " + prereqMastery.name;
                    }
                }

                PlayerItem.PlayerLeague.Content = playerItem.id;
                PlayerItem.LevelLabel.Content = playerItem.selectedRank + "/" + playerItem.ranks;
                PlayerItem.UsingLegendary.Visibility = System.Windows.Visibility.Hidden;

                int SelectedRank = playerItem.selectedRank;
                if (SelectedRank == 0)
                    SelectedRank = 1;
                PlayerItem.PlayerStatus.Text = ((string)playerItem.description[SelectedRank - 1]).Replace("<br>", Environment.NewLine);

                PlayerItem.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
                PlayerItem.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            }

            Point MouseLocation = e.GetPosition(Client.MainGrid);

            double YMargin = MouseLocation.Y;

            double XMargin = MouseLocation.X;
            if (XMargin + PlayerItem.Width + 10 > Client.MainGrid.ActualWidth)
                XMargin = Client.MainGrid.ActualWidth - PlayerItem.Width - 10;

            PlayerItem.Margin = new Thickness(XMargin + 5, YMargin + 5, 0, 0);
        }
 void ProfileImage_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
 {
     if (PlayerItem != null)
     {
         Client.MainGrid.Children.Remove(PlayerItem);
         PlayerItem = null;
     }
 }
Exemplo n.º 10
0
        private void ChatPlayerMouseOver(object sender, MouseEventArgs e)
        {
            var item = (ChatPlayer)sender;
            var playerItem = (ChatPlayerItem)item.Tag;
            if (PlayerItem == null)
            {
                PlayerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(PlayerItem);
                Panel.SetZIndex(PlayerItem, 5);
                PlayerItem.Tag = playerItem;
                if (Client.PlayerNote.Any(x => x.Key == playerItem.Username))
                {
                    PlayerItem.Note.Text = Client.PlayerNote[playerItem.Username];
                    PlayerItem.Note.Foreground = Brushes.Green;
                    PlayerItem.Note.Visibility = Visibility.Visible;
                }
                PlayerItem.PlayerName.Content = playerItem.Username;
                PlayerItem.PlayerLeague.Content = playerItem.LeagueTier + " " + playerItem.LeagueDivision;
                PlayerItem.PlayerStatus.Text = playerItem.Status;
                if (playerItem.RankedWins == 0)
                    PlayerItem.PlayerWins.Content = playerItem.Wins + " Normal Wins";
                else
                    PlayerItem.PlayerWins.Content = playerItem.RankedWins + " Ranked Wins";

                PlayerItem.LevelLabel.Content = playerItem.Level;
                PlayerItem.UsingLegendary.Visibility = playerItem.UsingLegendary
                    ? Visibility.Visible
                    : Visibility.Hidden;

                //PlayerItem.Dev.Visibility = playerItem.IsLegendaryDev ? System.Windows.Visibility.Visible : System.Windows.Visibility.Hidden;
                string UriSource = Path.Combine(Client.ExecutingDirectory, "Assets", "profileicon",
                    playerItem.ProfileIcon + ".png");
                PlayerItem.ProfileImage.Source = Client.GetImage(UriSource);
                if (playerItem.Status != null)
                {
                }
                else if (playerItem.Status == null)
                {
                    Client.hidelegendaryaddition = true;
                }
                else
                {
                    PlayerItem.PlayerStatus.Text = "";
                }

                if (playerItem.GameStatus != "outOfGame")
                {
                    var elapsed = new TimeSpan();
                    if (playerItem.Timestamp != 0)
                        elapsed = DateTime.Now.Subtract(Client.JavaTimeStampToDateTime(playerItem.Timestamp));

                    switch (playerItem.GameStatus)
                    {
                        case "inGame":
                            champions inGameChamp = champions.GetChampion(playerItem.Champion);
                            if (inGameChamp != null)
                                PlayerItem.InGameStatus.Text = "In Game" + Environment.NewLine +
                                                               "Playing as " + inGameChamp.displayName +
                                                               Environment.NewLine +
                                                               "For " +
                                                               string.Format("{0} Minutes and {1} Seconds",
                                                                   elapsed.Minutes, elapsed.Seconds);
                            else
                                PlayerItem.InGameStatus.Text = "In Game";
                            break;
                        case "hostingPracticeGame":
                            PlayerItem.InGameStatus.Text = "Creating Custom Game";
                            break;
                        case "inQueue":
                            PlayerItem.InGameStatus.Text = "In Queue" + Environment.NewLine +
                                                           "For " +
                                                           string.Format("{0} Minutes and {1} Seconds", elapsed.Minutes,
                                                               elapsed.Seconds);
                            break;
                        case "spectating":
                            PlayerItem.InGameStatus.Text = "Spectating";
                            break;
                        case "championSelect":
                            PlayerItem.InGameStatus.Text = "In Champion Select" + Environment.NewLine +
                                                           "For " +
                                                           string.Format("{0} Minutes and {1} Seconds", elapsed.Minutes,
                                                               elapsed.Seconds);
                            break;
                        case "hostingRankedGame":
                            PlayerItem.InGameStatus.Text = "Creating Ranked Game";
                            break;
                        case "teamSelect":
                            PlayerItem.InGameStatus.Text = "In Team Select";
                            break;
                        case "hostingNormalGame":
                            PlayerItem.InGameStatus.Text = "Creating Normal Game";
                            break;
                        case "hostingCoopVsAIGame":
                            PlayerItem.InGameStatus.Text = "Creating Co-op vs. AI Game";
                            break;
                        case "inTeamBuilder":
                            PlayerItem.InGameStatus.Text = "In Team Builder";
                            break;
                        case "tutorial":
                            PlayerItem.InGameStatus.Text = "In Tutorial";
                            break;
                    }
                    PlayerItem.InGameStatus.Visibility = Visibility.Visible;
                }

                PlayerItem.Width = 300;
                PlayerItem.HorizontalAlignment = HorizontalAlignment.Right;
                PlayerItem.VerticalAlignment = VerticalAlignment.Top;
            }

            Point mouseLocation = e.GetPosition(Client.MainGrid);
            double yMargin = mouseLocation.Y;
            if (yMargin + 195 > Client.MainGrid.ActualHeight)
                yMargin = Client.MainGrid.ActualHeight - 195;
            PlayerItem.Margin = new Thickness(0, yMargin, 250, 0);
        }
Exemplo n.º 11
0
        private void player_MouseLeave(object sender, MouseEventArgs e)
        {
            if (PlayerItem == null)
                return;

            Client.MainGrid.Children.Remove(PlayerItem);
            PlayerItem = null;
        }
Exemplo n.º 12
0
        private void item_MouseMove(object sender, MouseEventArgs e)
        {
            var playerItem = (runes) ((RuneItem) sender).Tag;
            if (this.playerItem == null)
            {
                this.playerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(this.playerItem);

                Panel.SetZIndex(this.playerItem, 4);

                //Only load once
                this.playerItem.ProfileImage.Source = playerItem.icon;
                this.playerItem.PlayerName.Content = playerItem.name;

                this.playerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                this.playerItem.Width = this.playerItem.PlayerName.DesiredSize.Width > 250
                    ? this.playerItem.PlayerName.DesiredSize.Width
                    : 250;
                this.playerItem.PlayerLeague.Content = playerItem.id;
                this.playerItem.UsingLegendary.Visibility = Visibility.Hidden;

                this.playerItem.PlayerWins.Content = playerItem.description.Replace("<br>", Environment.NewLine);
                this.playerItem.PlayerStatus.Text = string.Empty;
                this.playerItem.LevelLabel.Content = string.Empty;
                this.playerItem.HorizontalAlignment = HorizontalAlignment.Left;
                this.playerItem.VerticalAlignment = VerticalAlignment.Top;
            }

            var mouseLocation = e.GetPosition(Client.MainGrid);

            var yMargin = mouseLocation.Y;

            var xMargin = mouseLocation.X;
            if (xMargin + this.playerItem.Width + 10 > Client.MainGrid.ActualWidth)
            {
                xMargin = Client.MainGrid.ActualWidth - this.playerItem.Width - 10;
            }

            this.playerItem.Margin = new Thickness(xMargin + 5, yMargin + 5, 0, 0);
        }
Exemplo n.º 13
0
        private void img_MouseMove(object sender, MouseEventArgs e)
        {
            var item = (Image) sender;
            var playerItem = (ProfilePage.KeyValueItem) item.Tag;
            if (this.playerItem == null)
            {
                var Item = items.GetItem(Convert.ToInt32(playerItem.Value));
                this.playerItem = new LargeChatPlayer();
                Client.MainGrid.Children.Add(this.playerItem);


                this.playerItem.PlayerName.Content = Item.name;

                this.playerItem.PlayerName.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
                this.playerItem.Width = this.playerItem.PlayerName.DesiredSize.Width > 250
                    ? this.playerItem.PlayerName.DesiredSize.Width
                    : 250;

                this.playerItem.PlayerWins.Content = Item.price + " gold (" + Item.sellprice + " sell)";
                this.playerItem.PlayerLeague.Content = "Item ID " + Item.id;
                this.playerItem.LevelLabel.Content = string.Empty;
                this.playerItem.UsingLegendary.Visibility = Visibility.Hidden;

                var parsedDescription = Item.description;
                parsedDescription = parsedDescription.Replace("<br>", Environment.NewLine);
                parsedDescription = Regex.Replace(parsedDescription, "<.*?>", string.Empty);
                this.playerItem.PlayerStatus.Text = parsedDescription;

                var UriSource = new System.Uri(Path.Combine(Client.ExecutingDirectory, "Assets", "item", Item.id + ".png"),
                    UriKind.RelativeOrAbsolute);
                this.playerItem.ProfileImage.Source = new BitmapImage(UriSource);

                this.playerItem.HorizontalAlignment = HorizontalAlignment.Left;
                this.playerItem.VerticalAlignment = VerticalAlignment.Top;
            }

            var mouseLocation = e.GetPosition(Client.MainGrid);

            var yMargin = mouseLocation.Y;

            var xMargin = mouseLocation.X;
            if (xMargin + this.playerItem.Width + 10 > Client.MainGrid.ActualWidth)
            {
                xMargin = Client.MainGrid.ActualWidth - this.playerItem.Width - 10;
            }

            this.playerItem.Margin = new Thickness(xMargin + 5, yMargin + 5, 0, 0);
        }