private void btnLogin_Click(object sender, EventArgs e)
        {
            var t = Task.Run(async() =>
            {
                Thread.Sleep(500);
                return(await UsuarioController.GetAllUsuario());
            });

            t.ContinueWith((x) =>
            {
                foreach (Usuario u in x.Result)
                {
                    if (u.email.Equals(txtEmail.Text) && u.senha.Equals(txtSenha.Text))
                    {
                        usuarioLogin = u;

                        pnLogin.Visible     = false;
                        lblUsuario.Visible  = true;
                        lblBemVindo.Visible = true;
                        lblUsuario.Text     = usuarioLogin.firstName;
                        btnLogout.Visible   = true;
                        login = true;

                        if (usuarioLogin.privilege.Equals("Admin"))
                        {
                            toolListaPedidos.Visible  = true;
                            toolListaProdutos.Visible = true;
                            toolListaUsuarios.Visible = true;
                        }
                    }
                }
                if (login != true)
                {
                    lblResposta.Visible = true;
                    lblResposta.Text    = "Erro no login";
                }
                else
                {
                    lblResposta.Visible = false;
                }
                UsuarioController.LstUsuario = x.Result;
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }
        public void AtualizarLista()
        {
            lblException.Text = null;

            var t = Task.Run(async() =>
            {
                Thread.Sleep(500);
                return(await UsuarioController.GetAllUsuario());
            });


            t.ContinueWith((x) =>
            {
                LstVUsuario.Items.Clear();

                foreach (Usuario p in x.Result)
                {
                    LstVUsuario.Items.Add(p.toListViewItem());
                }

                UsuarioController.LstUsuario = x.Result;
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }