private void setLeiloes(string words, string categ, string sortText)
        {
            int sortby = 1;

            if (sortText == "Preço maior")
            {
                sortby = -1;
            }

            Leiloes_StackPanel.Children.Clear();

            Leilao[] leiloes = ahref.getLeiloes(words, categ, sortby, username);
            foreach (Leilao lei in leiloes)
            {
                Leiloes_StackPanel.Children.Add(new Leiloes_leilao(this, lei));
            }
        }
        private void setLeiloes(string words, string categ, string sortText)
        {
            int sortby = 1;

            if (sortText == "Preço maior")
            {
                sortby = -1;
            }

            Leiloes_StackPanel.Children.Clear();

            Leilao[] leiloes = ahref.getLeiloes(words, categ, sortby, null);
            foreach (Leilao lei in leiloes)
            {
                /*if(lei.hasLicitacoes())
                 * {
                 *  Leiloes_StackPanel.Children.Add(new Leiloes_leilao(this, lei));
                 * }*/

                if (lei.hasLicitacoes() && lei.isBidding(username))
                {
                    if (lei.Owner != username && ahref.getLastLicitacaoUser(lei) == username)
                    {
                        Leiloes_StackPanel.Children.Add(new Leiloes_leilao(this, lei, "leading"));
                    }
                    else
                    {
                        Leiloes_StackPanel.Children.Add(new Leiloes_leilao(this, lei, "losing"));
                    }
                }
                else
                {
                    Leiloes_StackPanel.Children.Add(new Leiloes_leilao(this, lei, ""));
                }
            }
        }