Exemple #1
0
        // Customer data entry
        public void InitializeComponent(Form parent, bool isUpdate)
        {
            this.BackColor = ColorTranslator.FromHtml("#6d6a75");
            this.Font      = new Font(this.Font, FontStyle.Bold);
            this.Size      = new Size(500, 400);
            this.parent    = parent;

            if (isUpdate)
            {
                this.Load += new EventHandler(this.LoadForm);
            }

            // PictureBox - Using Property Bind
            this.pb_Cadastro            = new Library.PictureBox();
            this.pb_Cadastro.Location   = new Point(0, 10);
            this.pb_Cadastro.Size       = new Size(480, 100);
            this.pb_Cadastro.ClientSize = new Size(480, 80);
            this.pb_Cadastro.Load($"./Views/assets/{(isUpdate ? "alteracao" : "cadastra")}.jpg");
            this.Controls.Add(pb_Cadastro);

            // Fill orientation tip
            this.tt_Help = new Library.ToolTip();

            // Label
            this.lbl_Nome          = new Library.Label();
            this.lbl_Nome.Text     = "Nome :";
            this.lbl_Nome.Location = new Point(20, 100);
            this.Controls.Add(lbl_Nome);

            this.lbl_DataNasc          = new Library.Label();
            this.lbl_DataNasc.Text     = "Data de Nascimento :";
            this.lbl_DataNasc.Location = new Point(20, 140);
            this.Controls.Add(lbl_DataNasc);

            this.lbl_CPF          = new Library.Label();
            this.lbl_CPF.Text     = "CPF :";
            this.lbl_CPF.Location = new Point(20, 180);
            this.Controls.Add(lbl_CPF);

            this.lbl_DiasDevol          = new Library.Label();
            this.lbl_DiasDevol.Text     = "Dias P/ Devolução :";
            this.lbl_DiasDevol.Location = new Point(20, 220);
            this.Controls.Add(lbl_DiasDevol);

            // RichTextBox (Edited text)
            this.rtxt_NomeCliente = new Library.RichTextBox();
            this.tt_Help.SetToolTip(rtxt_NomeCliente, "Digite o nome completo");
            this.Controls.Add(rtxt_NomeCliente);

            // NumericUpDown
            this.num_DataNascDia          = new NumericUpDown();
            this.num_DataNascDia.Location = new Point(150, 140);
            this.num_DataNascDia.Size     = new Size(50, 20);
            this.num_DataNascDia.Enter   += new EventHandler(this.num_DataNascimento_Enter);
            this.num_DataNascDia.Minimum  = 0;
            this.num_DataNascDia.Maximum  = 31;
            this.Controls.Add(num_DataNascDia);

            this.num_DataNascMes          = new NumericUpDown();
            this.num_DataNascMes.Location = new Point(210, 140);
            this.num_DataNascMes.Size     = new Size(50, 20);
            this.num_DataNascMes.Enter   += new EventHandler(this.num_DataNascimento_Enter);
            this.num_DataNascMes.Minimum  = 0;
            this.num_DataNascMes.Maximum  = 12;
            this.Controls.Add(num_DataNascMes);

            this.num_DataNascAno          = new NumericUpDown();
            this.num_DataNascAno.Location = new Point(270, 140);
            this.num_DataNascAno.Size     = new Size(50, 20);
            this.num_DataNascAno.Enter   += new EventHandler(this.num_DataNascimento_Enter);
            this.num_DataNascAno.Minimum  = 1930;
            this.num_DataNascAno.Maximum  = 2020;
            this.Controls.Add(num_DataNascAno);

            // MaskedTextBox
            this.mtxt_CpfCLiente          = new Library.MaskedTextBox();
            this.mtxt_CpfCLiente.Mask     = "000,000,000-00";
            this.mtxt_CpfCLiente.ReadOnly = isUpdate;
            this.Controls.Add(mtxt_CpfCLiente);
            //mtxt_CpfCLiente.SelectionStart = mtxt_CpfCLiente.Text.Length + 1;

            // ComboBox
            this.cb_DiasDevol = new ComboBox();
            this.cb_DiasDevol.Items.Add("2 Dias");
            this.cb_DiasDevol.Items.Add("3 Dias");
            this.cb_DiasDevol.Items.Add("4 Dias");
            this.cb_DiasDevol.Items.Add("5 Dias");
            this.cb_DiasDevol.Items.Add("PLUS - 10 Dias");
            this.cb_DiasDevol.AutoCompleteMode = AutoCompleteMode.Append;
            this.cb_DiasDevol.Location         = new Point(150, 220);
            this.cb_DiasDevol.Size             = new Size(170, 20);
            this.Controls.Add(cb_DiasDevol);

            // Buttons
            this.btn_Confirmar          = new Library.Button();
            this.btn_Confirmar.Text     = "CONFIRMAR";
            this.btn_Confirmar.Location = new Point(80, 280);
            this.btn_Confirmar.Click   += new EventHandler(this.btn_ConfirmarClick);
            this.Controls.Add(btn_Confirmar);

            this.btn_Cancelar          = new Library.Button();
            this.btn_Cancelar.Text     = "CANCELAR";
            this.btn_Cancelar.Location = new Point(260, 280);
            this.btn_Cancelar.Click   += new EventHandler(this.btn_CancelarClick);
            this.Controls.Add(btn_Cancelar);
        }
Exemple #2
0
        // Rent data entry
        public void InitializeComponent(Form parent)
        {
            // Window parameters
            this.BackColor = ColorTranslator.FromHtml("#6d6a75");
            this.Font      = new Font(this.Font, FontStyle.Bold);
            this.Size      = new Size(500, 580);
            this.parent    = parent;

            // PictureBox
            this.pb_Cadastro = new Library.PictureBox();
            this.pb_Cadastro.Load($"./Views/assets/cadastra.jpg");
            this.Controls.Add(pb_Cadastro);

            this.lbl_BuscaCliente          = new Library.Label();
            this.lbl_BuscaCliente.Text     = "Busca Cliente :";
            this.lbl_BuscaCliente.Location = new Point(30, 80);
            this.Controls.Add(lbl_BuscaCliente);

            this.lbl_BuscaFilme          = new Library.Label();
            this.lbl_BuscaFilme.Text     = "Busca Filme :";
            this.lbl_BuscaFilme.Location = new Point(30, 270);
            this.Controls.Add(lbl_BuscaFilme);

            // Fill orientation tip
            this.tt_BuscaCliente = new Library.ToolTip();

            // RichTextBox (Edited text - Keypress mode to filter a customer in ListView)
            this.rtxt_BuscaCliente          = new Library.RichTextBox();
            this.rtxt_BuscaCliente.Location = new Point(150, 80);
            this.Controls.Add(rtxt_BuscaCliente);
            this.tt_BuscaCliente.SetToolTip(rtxt_BuscaCliente, "Digite o nome ou selecione abaixo");
            this.rtxt_BuscaCliente.KeyPress += new KeyPressEventHandler(keypressed1);

            // Fill orientation tip
            this.tt_BuscaFilme = new Library.ToolTip();

            // RichTextBox (Edited text - Keypress mode to filter a movie in ListView)
            this.rtxt_BuscaFilme          = new Library.RichTextBox();
            this.rtxt_BuscaFilme.Location = new Point(150, 270);
            this.Controls.Add(rtxt_BuscaFilme);
            this.tt_BuscaFilme.SetToolTip(rtxt_BuscaFilme, "Digite o título ou selecione abaixo");
            this.rtxt_BuscaFilme.KeyPress += new KeyPressEventHandler(keypressed2);

            // ListView - Customer
            this.lv_ListaClientes          = new Library.ListView();
            this.lv_ListaClientes.Location = new Point(40, 130);
            this.lv_ListaClientes.Size     = new Size(400, 120);
            List <ClienteModels> listaCliente = (from cliente in ClienteController.GetClientes() where cliente.NomeCliente.Contains(rtxt_BuscaCliente.Text) select cliente).ToList();
            ListViewItem         clientes     = new ListViewItem();

            foreach (ClienteModels cliente in ClienteController.GetClientes())
            {
                ListViewItem lv_ListaCliente = new ListViewItem(cliente.IdCliente.ToString());
                lv_ListaCliente.SubItems.Add(cliente.NomeCliente);
                lv_ListaCliente.SubItems.Add(cliente.DataNascimento);
                lv_ListaCliente.SubItems.Add(cliente.CpfCliente);
                lv_ListaCliente.SubItems.Add(cliente.DiasDevolucao.ToString());
                lv_ListaClientes.Items.Add(lv_ListaCliente);
            }
            this.lv_ListaClientes.MultiSelect = false;
            this.lv_ListaClientes.Columns.Add("ID", -2, HorizontalAlignment.Center);
            this.lv_ListaClientes.Columns.Add("Nome", -2, HorizontalAlignment.Left);
            this.lv_ListaClientes.Columns.Add("Data Nascimento", -2, HorizontalAlignment.Center);
            this.lv_ListaClientes.Columns.Add("CPF", -2, HorizontalAlignment.Center);
            this.lv_ListaClientes.Columns.Add("Dias Devolução", -2, HorizontalAlignment.Center);
            this.Controls.Add(lv_ListaClientes);

            // ListView grouping box
            this.gb_ListaCliente          = new Library.GroupBox();
            this.gb_ListaCliente.Location = new Point(30, 110);
            this.gb_ListaCliente.Size     = new Size(420, 150);
            this.gb_ListaCliente.Text     = "LISTA DE CLIENTES";
            this.Controls.Add(gb_ListaCliente);

            // ListView - Movies
            this.lv_ListaFilmes            = new Library.ListView();
            this.lv_ListaFilmes.Location   = new Point(40, 320);
            this.lv_ListaFilmes.Size       = new Size(400, 120);
            this.lv_ListaFilmes.CheckBoxes = true;
            List <FilmeModels> listaFilme = (from filme in FilmeController.GetFilmes() where filme.Titulo.Contains(rtxt_BuscaFilme.Text) select filme).ToList();
            ListViewItem       filmes     = new ListViewItem();

            foreach (FilmeModels filme in FilmeController.GetFilmes())
            {
                ListViewItem lv_ListaFilme = new ListViewItem(filme.IdFilme.ToString());
                lv_ListaFilme.SubItems.Add(filme.Titulo);
                lv_ListaFilme.SubItems.Add(filme.DataLancamento);
                lv_ListaFilme.SubItems.Add(filme.ValorLocacaoFilme.ToString());
                lv_ListaFilme.SubItems.Add(filme.EstoqueFilme.ToString());
                lv_ListaFilme.SubItems.Add(filme.Sinopse);
                lv_ListaFilmes.Items.Add(lv_ListaFilme);
            }
            this.lv_ListaFilmes.Columns.Add("ID", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Título", -2, HorizontalAlignment.Left);
            this.lv_ListaFilmes.Columns.Add("Data Lançamento", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Preço", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Estoque", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Sinopse", -2, HorizontalAlignment.Left);
            this.Controls.Add(lv_ListaFilmes);

            Task t = new Task(new Action(() => { RefreshForm(); }));

            t.Start();

            // ListView grouping box
            this.gb_ListaFilme          = new Library.GroupBox();
            this.gb_ListaFilme.Location = new Point(30, 300);
            this.gb_ListaFilme.Size     = new Size(420, 150);
            this.gb_ListaFilme.Text     = "LISTA DE FILMES";
            this.Controls.Add(gb_ListaFilme);

            // Buttons
            this.btn_Confirmar          = new Library.Button();
            this.btn_Confirmar.Text     = "CONFIRMAR";
            this.btn_Confirmar.Location = new Point(80, 470);
            this.btn_Confirmar.Click   += new EventHandler(this.btn_ConfirmarClick);
            this.Controls.Add(btn_Confirmar);

            this.btn_Cancelar          = new Library.Button();
            this.btn_Cancelar.Text     = "CANCELAR";
            this.btn_Cancelar.Location = new Point(260, 470);
            this.btn_Cancelar.Click   += new EventHandler(this.btn_CancelarClick);
            this.Controls.Add(btn_Cancelar);
        }
Exemple #3
0
        // Consult registered movies
        public void InitializeComponent(Form parent)
        {
            // Window parameters
            this.BackColor = ColorTranslator.FromHtml("#6d6a75");
            this.Font      = new Font(this.Font, FontStyle.Bold);
            this.Size      = new Size(500, 620);
            this.parent    = parent;

            // PictureBox
            this.pb_Consulta = new Library.PictureBox();
            this.pb_Consulta.Load("./Views/assets/consulta.jpg");
            this.Controls.Add(pb_Consulta);

            // Label
            this.lbl_ConsultaFilme          = new Library.Label();
            this.lbl_ConsultaFilme.Text     = "Buscar Filme :";
            this.lbl_ConsultaFilme.Location = new Point(30, 80);
            this.Controls.Add(lbl_ConsultaFilme);

            // Fill orientation tip
            this.tt_ConsultaFilme = new Library.ToolTip();

            // RichTextBox (Edited text - Keypress mode to filter a movie in ListView)
            this.rtxt_ConsultaFilme          = new Library.RichTextBox();
            this.rtxt_ConsultaFilme.Location = new Point(150, 80);
            this.Controls.Add(rtxt_ConsultaFilme);
            this.tt_ConsultaFilme.SetToolTip(rtxt_ConsultaFilme, "Digite o título ou selecione abaixo");
            this.rtxt_ConsultaFilme.KeyPress += new KeyPressEventHandler(keypressed);

            // ListView - Movie
            this.lv_ListaFilmes          = new Library.ListView();
            this.lv_ListaFilmes.Location = new Point(20, 130);
            this.lv_ListaFilmes.Size     = new Size(440, 350);
            List <FilmeModels> listaFilme = (from filme in FilmeController.GetFilmes() where filme.Titulo.Contains(rtxt_ConsultaFilme.Text) select filme).ToList();
            ListViewItem       filmes     = new ListViewItem();

            foreach (FilmeModels filme in FilmeController.GetFilmes())
            {
                ListViewItem lv_ListaFilme = new ListViewItem(filme.IdFilme.ToString());
                lv_ListaFilme.SubItems.Add(filme.Titulo);
                lv_ListaFilme.SubItems.Add(filme.DataLancamento);
                lv_ListaFilme.SubItems.Add(filme.ValorLocacaoFilme.ToString());
                lv_ListaFilme.SubItems.Add(filme.EstoqueFilme.ToString());
                lv_ListaFilme.SubItems.Add(filme.Sinopse);
                lv_ListaFilmes.Items.Add(lv_ListaFilme);
            }
            this.lv_ListaFilmes.MultiSelect = false;
            this.lv_ListaFilmes.Columns.Add("ID", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Título", -2, HorizontalAlignment.Left);
            this.lv_ListaFilmes.Columns.Add("Data Lançamento", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Preço", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Estoque", -2, HorizontalAlignment.Center);
            this.lv_ListaFilmes.Columns.Add("Sinopse", -2, HorizontalAlignment.Left);
            this.Controls.Add(lv_ListaFilmes);

            Task t = new Task(new Action(() => { RefreshForm(); }));

            t.Start();

            // ListView grouping box
            this.gb_ListaFilme          = new Library.GroupBox();
            this.gb_ListaFilme.Location = new Point(10, 110);
            this.gb_ListaFilme.Size     = new Size(460, 380);
            this.gb_ListaFilme.Text     = "LISTA DE FILMES";
            this.Controls.Add(gb_ListaFilme);

            // Buttons
            this.btn_ListaConsulta          = new Library.Button();
            this.btn_ListaConsulta.Location = new Point(80, 510);
            this.btn_ListaConsulta.Text     = "CONSULTA";
            this.btn_ListaConsulta.Click   += new EventHandler(this.btn_ListaConsultaClick);
            this.Controls.Add(btn_ListaConsulta);

            this.btn_ListaSair          = new Library.Button();
            this.btn_ListaSair.Location = new Point(260, 510);
            this.btn_ListaSair.Text     = "SAIR";
            this.btn_ListaSair.Click   += new EventHandler(this.btn_ListaSairClick);
            this.Controls.Add(btn_ListaSair);
        }
Exemple #4
0
        // Movie data entry
        public void InitializeComponent(Form parent, bool isUpdate)
        {
            // Window parameters
            this.BackColor = ColorTranslator.FromHtml("#6d6a75");
            this.Font      = new Font(this.Font, FontStyle.Bold);
            this.Size      = new Size(500, 450);
            this.parent    = parent;

            if (isUpdate)
            {
                this.Load += new EventHandler(this.LoadForm);
            }

            // PictureBox
            this.pb_Cadastro            = new Library.PictureBox();
            this.pb_Cadastro.Location   = new Point(0, 10);
            this.pb_Cadastro.Size       = new Size(480, 100);
            this.pb_Cadastro.ClientSize = new Size(480, 80);
            this.pb_Cadastro.Load($"./Views/assets/{(isUpdate ? "alteracao" : "cadastra")}.jpg");
            this.Controls.Add(pb_Cadastro);

            // Label
            this.lbl_Titulo          = new Library.Label();
            this.lbl_Titulo.Text     = "Título :";
            this.lbl_Titulo.Location = new Point(20, 100);
            this.Controls.Add(lbl_Titulo);

            this.lbl_DataLancamento          = new Library.Label();
            this.lbl_DataLancamento.Text     = "Ano de Lançamento :";
            this.lbl_DataLancamento.Location = new Point(20, 140);
            this.Controls.Add(lbl_DataLancamento);

            this.lbl_Sinopse          = new Library.Label();
            this.lbl_Sinopse.Text     = "Sinopse :";
            this.lbl_Sinopse.Location = new Point(20, 180);
            this.Controls.Add(lbl_Sinopse);

            this.lbl_ValorLocacao          = new Library.Label();
            this.lbl_ValorLocacao.Text     = "Valor da Locação :";
            this.lbl_ValorLocacao.Location = new Point(20, 250);
            this.Controls.Add(lbl_ValorLocacao);

            this.lbl_QtdeEstoque          = new Library.Label();
            this.lbl_QtdeEstoque.Text     = "Quantidade Estoque :";
            this.lbl_QtdeEstoque.Location = new Point(20, 290);
            this.Controls.Add(lbl_QtdeEstoque);

            // Fill orientation tip
            this.tt_Titulo = new Library.ToolTip();

            // RichTextBox (Edited text)
            this.rtxt_Titulo = new Library.RichTextBox();
            this.tt_Titulo.SetToolTip(rtxt_Titulo, "Digite o título do filme");
            this.Controls.Add(rtxt_Titulo);

            // NumericUpDown
            this.num_DataLancDia          = new NumericUpDown();
            this.num_DataLancDia.Location = new Point(150, 140);
            this.num_DataLancDia.Size     = new Size(50, 20);
            this.num_DataLancDia.Enter   += new EventHandler(this.num_DataLancamento_Enter);
            this.num_DataLancDia.Minimum  = 0;
            this.num_DataLancDia.Maximum  = 31;
            this.Controls.Add(num_DataLancDia);

            this.num_DataLancMes          = new NumericUpDown();
            this.num_DataLancMes.Location = new Point(210, 140);
            this.num_DataLancMes.Size     = new Size(50, 20);
            this.num_DataLancMes.Enter   += new EventHandler(this.num_DataLancamento_Enter);
            this.num_DataLancMes.Minimum  = 0;
            this.num_DataLancMes.Maximum  = 12;
            this.Controls.Add(num_DataLancMes);

            this.num_DataLancAno          = new NumericUpDown();
            this.num_DataLancAno.Location = new Point(270, 140);
            this.num_DataLancAno.Size     = new Size(50, 20);
            this.num_DataLancAno.Enter   += new EventHandler(this.num_DataLancamento_Enter);
            this.num_DataLancAno.Minimum  = 1890;
            this.num_DataLancAno.Maximum  = 2020;
            this.Controls.Add(num_DataLancAno);

            // Fill orientation tip
            this.tt_Sinopse = new Library.ToolTip();

            // RichTextBox (Edited text)
            this.rtxt_Sinopse          = new Library.RichTextBox();
            this.rtxt_Sinopse.Location = new Point(150, 180);
            this.rtxt_Sinopse.Size     = new Size(300, 50);
            this.tt_Sinopse.SetToolTip(rtxt_Sinopse, "Digite a sinopse completa");
            this.Controls.Add(rtxt_Sinopse);

            // ComboBox
            this.cb_ValorLocacao = new ComboBox();
            this.cb_ValorLocacao.Items.Add("R$ 0.99");
            this.cb_ValorLocacao.Items.Add("R$ 1.99");
            this.cb_ValorLocacao.Items.Add("R$ 2.99");
            this.cb_ValorLocacao.Items.Add("R$ 3.99");
            this.cb_ValorLocacao.Items.Add("R$ 4.99");
            this.cb_ValorLocacao.Items.Add("R$ 5.99");
            this.cb_ValorLocacao.AutoCompleteMode = AutoCompleteMode.Append;
            this.cb_ValorLocacao.Location         = new Point(150, 250);
            this.cb_ValorLocacao.Size             = new Size(150, 20);
            this.Controls.Add(cb_ValorLocacao);

            // NumericUpDown
            this.num_QtdeEstoque          = new NumericUpDown();
            this.num_QtdeEstoque.Location = new Point(150, 290);
            this.num_QtdeEstoque.Size     = new Size(50, 20);
            this.num_QtdeEstoque.Minimum  = 1;
            this.num_QtdeEstoque.Maximum  = 100;
            this.Controls.Add(num_QtdeEstoque);

            // Buttons
            this.btn_Confirmar          = new Library.Button();
            this.btn_Confirmar.Location = new Point(80, 330);
            this.btn_Confirmar.Text     = "CONFIRMAR";
            this.btn_Confirmar.Click   += new EventHandler(this.btn_ConfirmarClick);
            this.Controls.Add(btn_Confirmar);

            this.btn_Cancelar          = new Library.Button();
            this.btn_Cancelar.Location = new Point(260, 330);
            this.btn_Cancelar.Text     = "CANCELAR";
            this.btn_Cancelar.Click   += new EventHandler(this.btn_CancelarClick);
            this.Controls.Add(btn_Cancelar);
        }
        // Consult registered rentals
        public void InitializeComponent(Form parent)
        {
            // Window parameters
            this.BackColor = ColorTranslator.FromHtml("#6d6a75");
            this.Font      = new Font(this.Font, FontStyle.Bold);
            this.Size      = new Size(500, 500);
            this.parent    = parent;

            // PictureBox
            this.pb_Consulta            = new Library.PictureBox();
            this.pb_Consulta.ClientSize = new Size(460, 80);
            this.pb_Consulta.Load("./Views/assets/locacao.jpg");
            this.Controls.Add(pb_Consulta);

            // Label
            this.lbl_NomeLocacao          = new Library.Label();
            this.lbl_NomeLocacao.Text     = "Busca Por Cliente :";
            this.lbl_NomeLocacao.Location = new Point(20, 100);
            this.Controls.Add(lbl_NomeLocacao);

            // Fill orientation tip
            this.tt_BuscaCliente = new Library.ToolTip();

            // RichTextBox (Edited text - Keypress mode to filter a rental by customer in ListView)
            this.rtxt_BuscaCliente          = new Library.RichTextBox();
            this.rtxt_BuscaCliente.Location = new Point(150, 100);
            this.Controls.Add(rtxt_BuscaCliente);
            this.tt_BuscaCliente.SetToolTip(rtxt_BuscaCliente, "Digite o nome ou selecione abaixo");
            this.rtxt_BuscaCliente.KeyPress += new KeyPressEventHandler(keypressed);

            // ListView - Rentals
            this.lv_ListaLocacoes          = new Library.ListView();
            this.lv_ListaLocacoes.Location = new Point(20, 170);
            this.lv_ListaLocacoes.Size     = new Size(440, 185);
            List <ClienteModels> listaCliente = (from cliente in ClienteController.GetClientes() where cliente.NomeCliente.Contains(rtxt_BuscaCliente.Text) select cliente).ToList();
            ListViewItem         locacoes     = new ListViewItem();

            foreach (LocacaoModels locacao in LocacaoController.GetLocacoes())
            {
                ListViewItem  lv_ListaLocacao = new ListViewItem(locacao.IdLocacao.ToString());
                ClienteModels cliente         = ClienteController.GetCliente(locacao.IdCliente);
                lv_ListaLocacao.SubItems.Add(cliente.NomeCliente.ToString());
                lv_ListaLocacao.SubItems.Add(cliente.CpfCliente.ToString());
                lv_ListaLocacao.SubItems.Add(locacao.DataLocacao.ToString("dd/MM/yyyy"));
                lv_ListaLocacao.SubItems.Add(locacao.CalculoDataDevol().ToString("dd/MM/yyyy"));
                lv_ListaLocacao.SubItems.Add(locacao.QtdeFilmes().ToString());
                lv_ListaLocacao.SubItems.Add(locacao.ValorTotal().ToString("C2"));
                lv_ListaLocacoes.Items.Add(lv_ListaLocacao);
            }
            this.lv_ListaLocacoes.MultiSelect = false;
            this.lv_ListaLocacoes.Columns.Add("ID", -2, HorizontalAlignment.Center);
            this.lv_ListaLocacoes.Columns.Add("Locatário", -2, HorizontalAlignment.Left);
            this.lv_ListaLocacoes.Columns.Add("CPF", -2, HorizontalAlignment.Center);
            this.lv_ListaLocacoes.Columns.Add("Data Locação", -2, HorizontalAlignment.Center);
            this.lv_ListaLocacoes.Columns.Add("Data Devolução", -2, HorizontalAlignment.Center);
            this.lv_ListaLocacoes.Columns.Add("Qtde Filmes", -2, HorizontalAlignment.Center);
            this.lv_ListaLocacoes.Columns.Add("Total", -2, HorizontalAlignment.Left);
            this.Controls.Add(lv_ListaLocacoes);

            Task t = new Task(new Action(() => { RefreshForm(); }));

            t.Start();

            // ListView grouping box
            this.gb_ConsultaLocacao          = new Library.GroupBox();
            this.gb_ConsultaLocacao.Location = new Point(10, 80);
            this.gb_ConsultaLocacao.Size     = new Size(460, 55);
            this.gb_ConsultaLocacao.Text     = "BUSCAR LOCAÇÃO";
            this.Controls.Add(gb_ConsultaLocacao);

            this.gb_ListaLocacoes          = new Library.GroupBox();
            this.gb_ListaLocacoes.Location = new Point(10, 150);
            this.gb_ListaLocacoes.Size     = new Size(460, 220);
            this.gb_ListaLocacoes.Text     = "LISTA DE LOCAÇÕES";
            this.Controls.Add(gb_ListaLocacoes);

            // Buttons
            this.btn_ListaConsulta          = new Library.Button();
            this.btn_ListaConsulta.Location = new Point(80, 390);
            this.btn_ListaConsulta.Text     = "CONSULTA";
            this.btn_ListaConsulta.Click   += new EventHandler(this.btn_ListaConsultaClick);
            this.Controls.Add(btn_ListaConsulta);

            this.btn_ListaSair          = new Library.Button();
            this.btn_ListaSair.Location = new Point(260, 390);
            this.btn_ListaSair.Text     = "CANCELAR";
            this.btn_ListaSair.Click   += new EventHandler(this.btn_ListaSairClick);
            this.Controls.Add(btn_ListaSair);
        }