Esempio n. 1
0
        private void InitializeComponent()
        {
            this.components = new Container();
            this.ClientSize = new Size(500, 550);
            this.Text       = "FlowLP # 3";
            this.BackColor  = ColorTranslator.FromHtml("#8f8caf");

            this.FlowLayoutPanel               = new FlowLayoutPanel();
            this.FlowLayoutPanel.Dock          = DockStyle.Fill;
            this.FlowLayoutPanel.FlowDirection = FlowDirection.TopDown;
            this.FlowLayoutPanel.BorderStyle   = BorderStyle.Fixed3D;
            this.FlowLayoutPanel.Visible       = true;

            // Label e MonthCalendar (Selecionar Ínicio e Fim)
            this.lb_MonthCalendar      = new Library.Label();
            this.lb_MonthCalendar.Text = "MonthCalendar";
            this.FlowLayoutPanel.Controls.Add(this.lb_MonthCalendar);

            // Calendário p/ escolha de um período
            DateTime dt_DataLocacao = new DateTime(2020, 05, 16);

            this.mc_MonthCal = new MonthCalendar();
            this.mc_MonthCal.MaxSelectionCount = 10;
            this.mc_MonthCal.MinDate           = new DateTime(2019, 01, 01);
            this.mc_MonthCal.MaxDate           = new DateTime(2020, 12, 31);
            this.mc_MonthCal.SelectionRange    = new SelectionRange(dt_DataLocacao, new DateTime(2020, 05, 19));
            this.FlowLayoutPanel.Controls.Add(this.mc_MonthCal);
            this.mc_MonthCal.Anchor = AnchorStyles.Top;

            // Label e WebBrowser
            this.lbl_Web      = new Library.Label();
            this.lbl_Web.Text = "WebBrowser";
            this.FlowLayoutPanel.Controls.Add(this.lbl_Web);

            this.wb_ExWebBrowser      = new WebBrowser();
            this.wb_ExWebBrowser.Size = new Size(480, 300);
            this.wb_ExWebBrowser.Navigate("https://github.com/KaduFloresta");
            this.FlowLayoutPanel.Controls.Add(this.wb_ExWebBrowser);
            this.wb_ExWebBrowser.Anchor   = AnchorStyles.Bottom;
            this.wb_ExWebBrowser.TabIndex = 3;

            this.Controls.Add(this.FlowLayoutPanel);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
0
        // Consult registered customers
        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.Dock      = DockStyle.Fill;
            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_ConsultaCliente          = new Library.Label();
            this.lbl_ConsultaCliente.Text     = "Buscar Cliente :";
            this.lbl_ConsultaCliente.Location = new Point(30, 80);
            this.Controls.Add(lbl_ConsultaCliente);

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

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

            // ListView - Customer
            this.lv_ListaClientes          = new Library.ListView();
            this.lv_ListaClientes.Location = new Point(20, 130);
            this.lv_ListaClientes.Size     = new Size(440, 350);
            List <ClienteModels> listaCliente = (from cliente in ClienteController.GetClientes() where cliente.NomeCliente.Contains(rtxt_ConsultaCliente.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);

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

            t.Start();

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

            // 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(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(btn_ListaSairClick);
            this.Controls.Add(btn_ListaSair);
        }
        private void InitializeComponent()
        {
            this.components = new Container();
            this.ClientSize = new Size(500, 550);
            this.Text       = "TableLP # 1";
            this.BackColor  = ColorTranslator.FromHtml("#8f8caf");

            this.TableLayoutPanel             = new TableLayoutPanel();
            this.TableLayoutPanel.BorderStyle = BorderStyle.Fixed3D;
            this.TableLayoutPanel.ColumnCount = 3;
            this.TableLayoutPanel.RowCount    = 15;
            this.TableLayoutPanel.Dock        = DockStyle.Fill;
            this.TableLayoutPanel.BackColor   = ColorTranslator.FromHtml("#8f8caf");
            this.TableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40f));
            this.TableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40f));
            this.TableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40f));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 120F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset;

            // PictureBox
            this.pb_Imagem1            = new PictureBox();
            this.pb_Imagem1.Size       = new Size(460, 100);
            this.pb_Imagem1.ClientSize = new Size(460, 100);
            this.pb_Imagem1.Load("Imagem.jpg");
            this.pb_Imagem1.SizeMode = PictureBoxSizeMode.StretchImage;
            this.TableLayoutPanel.Controls.Add(this.pb_Imagem1, 0, 0);
            this.TableLayoutPanel.SetColumnSpan(pb_Imagem1, 3);
            this.pb_Imagem1.Anchor = AnchorStyles.None;

            // ToolTip - RichTextBox
            this.tt_Exemplo.AutoPopDelay = 10000;
            this.tt_Exemplo.InitialDelay = 100;
            this.tt_Exemplo.ReshowDelay  = 500;
            this.tt_Exemplo.ShowAlways   = true;

            // Label e RichTextBox
            this.lbl_Rich      = new Library.Label();
            this.lbl_Rich.Text = "RichTextBox";
            this.TableLayoutPanel.Controls.Add(this.lbl_Rich, 0, 1);

            this.rtxt_RichTB = new RichTextBox();
            this.rtxt_RichTB.SelectionFont  = new Font("Tahoma", 10, FontStyle.Bold);
            this.rtxt_RichTB.SelectionColor = System.Drawing.Color.Blue;
            this.rtxt_RichTB.Font           = new Font(rtxt_RichTB.Font, FontStyle.Bold);
            this.rtxt_RichTB.Size           = new Size(300, 20);
            this.tt_Exemplo.SetToolTip(rtxt_RichTB, "Informe o nome");
            this.TableLayoutPanel.Controls.Add(this.rtxt_RichTB, 1, 1);
            this.TableLayoutPanel.SetColumnSpan(rtxt_RichTB, 2);
            this.rtxt_RichTB.Anchor = AnchorStyles.None;

            // Label e NumericUpDown
            this.lbl_NumericUd      = new Library.Label();
            this.lbl_NumericUd.Text = "NumericUpDown: ";
            this.TableLayoutPanel.Controls.Add(this.lbl_NumericUd, 0, 3);

            this.lbl_ExUm           = new Label();
            this.lbl_ExUm.Text      = "Ex.: 2 Digitos";
            this.lbl_ExUm.Font      = new Font(lbl_ExUm.Font, FontStyle.Bold);
            this.lbl_ExUm.ForeColor = Color.Red;
            this.TableLayoutPanel.Controls.Add(this.lbl_ExUm, 1, 3);
            this.lbl_ExUm.Anchor = AnchorStyles.None;

            // Seleção de números - Casa 1
            this.num_Numeric1           = new NumericUpDown();
            this.num_Numeric1.ForeColor = Color.Black;
            this.num_Numeric1.Minimum   = 1;
            this.num_Numeric1.Maximum   = 99;
            this.TableLayoutPanel.Controls.Add(this.num_Numeric1, 2, 3);

            this.lbl_ExDois           = new Label();
            this.lbl_ExDois.Text      = "Ex.: 3 Digitos";
            this.lbl_ExDois.Font      = new Font(lbl_ExDois.Font, FontStyle.Bold);
            this.lbl_ExDois.ForeColor = Color.Red;
            this.TableLayoutPanel.Controls.Add(this.lbl_ExDois, 1, 4);
            this.lbl_ExDois.Anchor = AnchorStyles.None;

            // Seleção de números - Casa 2
            this.num_Numeric2           = new NumericUpDown();
            this.num_Numeric2.ForeColor = Color.Black;
            this.num_Numeric2.Minimum   = 100;
            this.num_Numeric2.Maximum   = 999;
            this.TableLayoutPanel.Controls.Add(this.num_Numeric2, 2, 4);

            this.lbl_ExTres           = new Label();
            this.lbl_ExTres.Text      = "Ex.: 4 Digitos";
            this.lbl_ExTres.Font      = new Font(lbl_ExTres.Font, FontStyle.Bold);
            this.lbl_ExTres.ForeColor = Color.Red;
            this.TableLayoutPanel.Controls.Add(this.lbl_ExTres, 1, 5);
            this.lbl_ExTres.Anchor = AnchorStyles.None;

            // Seleção de números - Casa 3
            this.num_Numeric3           = new NumericUpDown();
            this.num_Numeric3.ForeColor = Color.Black;
            this.num_Numeric3.Minimum   = 1000;
            this.num_Numeric3.Maximum   = 9999;
            this.TableLayoutPanel.Controls.Add(this.num_Numeric3, 3, 5);

            // Label e MaskedTextBox
            this.lbl_Masked      = new Library.Label();
            this.lbl_Masked.Text = "MaskedTextBox";
            this.TableLayoutPanel.Controls.Add(this.lbl_Masked, 0, 7);

            this.rtxt_Masked           = new MaskedTextBox();
            this.rtxt_Masked.Mask      = "(00) 00000 - 0000";
            this.rtxt_Masked.Size      = new Size(150, 20);
            this.rtxt_Masked.Font      = new Font(rtxt_Masked.Font, FontStyle.Bold);
            this.rtxt_Masked.ForeColor = Color.Black;
            this.TableLayoutPanel.Controls.Add(this.rtxt_Masked, 1, 7);

            this.lbl_Combo          = new Library.Label();
            this.lbl_Combo.Text     = "ComboBox";
            this.lbl_Combo.AutoSize = true;
            this.TableLayoutPanel.Controls.Add(this.lbl_Combo, 0, 9);

            // ComboBox - Seleção Cascata
            this.cb_Combo = new ComboBox();
            this.cb_Combo.Items.Add("Ítem A");
            this.cb_Combo.Items.Add("Ítem B");
            this.cb_Combo.Items.Add("Ítem C");
            this.cb_Combo.Items.Add("Ítem D");
            this.cb_Combo.Items.Add("Ítem E");
            this.cb_Combo.AutoCompleteMode = AutoCompleteMode.Append;
            this.cb_Combo.ForeColor        = Color.Black;
            this.TableLayoutPanel.Controls.Add(this.cb_Combo, 1, 9);

            // Label e RadioButton
            this.lbl_Radio      = new Library.Label();
            this.lbl_Radio.Text = "RadioButton";
            this.TableLayoutPanel.Controls.Add(this.lbl_Radio, 0, 11);
            this.lbl_Radio.Anchor = AnchorStyles.None;

            this.rb_RadioUm      = new Library.RadioButton();
            this.rb_RadioUm.Text = "Ítem - 1";
            this.TableLayoutPanel.Controls.Add(this.rb_RadioUm, 0, 12);

            this.rb_RadioDois      = new Library.RadioButton();
            this.rb_RadioDois.Text = "Ítem - 2";
            this.TableLayoutPanel.Controls.Add(this.rb_RadioDois, 0, 13);

            this.rb_RadioTres      = new Library.RadioButton();
            this.rb_RadioTres.Text = "Ítem - 3";
            this.TableLayoutPanel.Controls.Add(this.rb_RadioTres, 0, 14);

            // LinkLabel - Link de acesso
            this.link_help              = new System.Windows.Forms.LinkLabel();
            this.link_help.AutoSize     = true;
            this.link_help.Font         = new Font(link_help.Font, FontStyle.Bold);
            this.link_help.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkForHelp_LinkClicked);
            this.link_help.Text         = "Ajuda com LinkLabel";
            this.TableLayoutPanel.Controls.AddRange(new System.Windows.Forms.Control[] { this.link_help });
            this.TableLayoutPanel.Controls.Add(this.link_help, 1, 13);
            this.link_help.Anchor = AnchorStyles.None;

            // Label e CheckBox - Múltiplas escolhas
            this.lbl_Check      = new Library.Label();
            this.lbl_Check.Text = "CheckBox";
            this.TableLayoutPanel.Controls.Add(this.lbl_Check, 2, 11);
            this.lbl_Check.Anchor = AnchorStyles.None;

            this.chk_Um      = new Library.CheckBox();
            this.chk_Um.Text = "Opção - X";
            this.TableLayoutPanel.Controls.Add(this.chk_Um, 2, 12);

            this.chk_Dois      = new Library.CheckBox();
            this.chk_Dois.Text = "Opção - Y";
            this.TableLayoutPanel.Controls.Add(this.chk_Dois, 2, 13);

            this.chk_Tres      = new Library.CheckBox();
            this.chk_Tres.Text = "Opção - Z";
            this.TableLayoutPanel.Controls.Add(this.chk_Tres, 2, 14);

            this.Controls.Add(this.TableLayoutPanel);
        }
        // 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);
        }
Esempio n. 9
0
        private void InitializeComponent()
        {
            this.components = new Container();
            this.ClientSize = new Size(500, 550);
            this.Text       = "TableLP # 2";
            this.BackColor  = ColorTranslator.FromHtml("#0fe3ef");

            this.TableLayoutPanel             = new TableLayoutPanel();
            this.TableLayoutPanel.BorderStyle = BorderStyle.Fixed3D;
            this.TableLayoutPanel.ColumnCount = 3;
            this.TableLayoutPanel.RowCount    = 14;
            this.TableLayoutPanel.Dock        = DockStyle.Fill;
            this.TableLayoutPanel.BackColor   = ColorTranslator.FromHtml("#8f8caf");
            this.TableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40f));
            this.TableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40f));
            this.TableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40f));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 120F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 50F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 15F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F));
            this.TableLayoutPanel.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset;

            // Label e ListBox - 1 coluna
            this.lbl_ListBox      = new Library.Label();
            this.lbl_ListBox.Text = "ListBox";
            this.TableLayoutPanel.Controls.Add(this.lbl_ListBox, 0, 0);

            this.lb_ListBox      = new ListBox();
            this.lb_ListBox.Size = new Size(100, 120);
            this.lb_ListBox.Items.Add("Ítem - A");
            this.lb_ListBox.Items.Add("Ítem - B");
            this.lb_ListBox.Items.Add("Ítem - C");
            this.lb_ListBox.Items.Add("Ítem - D");
            this.lb_ListBox.Items.Add("Ítem - E");
            this.lb_ListBox.SelectionMode = SelectionMode.MultiExtended;
            this.lb_ListBox.MultiColumn   = true;
            this.lb_ListBox.Anchor        = AnchorStyles.None;
            this.TableLayoutPanel.Controls.Add(this.lb_ListBox, 0, 1);

            // Label e ListView - 1 ou mais colunas
            this.lbl_ListView      = new Library.Label();
            this.lbl_ListView.Text = "ListView";
            this.TableLayoutPanel.Controls.Add(this.lbl_ListView, 1, 0);

            this.lv_ListView      = new ListView();
            this.lv_ListView.Size = new Size(150, 120);
            this.lv_ListView.View = View.Details;
            ListViewItem desc1 = new ListViewItem("A");

            desc1.SubItems.Add("Ítem #1");
            ListViewItem desc2 = new ListViewItem("B");

            desc2.SubItems.Add("Ítem #2");
            ListViewItem desc3 = new ListViewItem("C");

            desc3.SubItems.Add("Ítem #3");
            ListViewItem desc4 = new ListViewItem("D");

            desc4.SubItems.Add("Ítem #4");
            ListViewItem desc5 = new ListViewItem("E");

            desc5.SubItems.Add("Ítem #4");
            this.lv_ListView.Items.AddRange(new ListViewItem[] { desc1, desc2, desc3, desc4, desc5 });
            this.lv_ListView.FullRowSelect      = true;
            this.lv_ListView.GridLines          = true;
            this.lv_ListView.AllowColumnReorder = true;
            this.lv_ListView.Sorting            = SortOrder.Ascending;
            this.lv_ListView.Columns.Add("Coluna 1", -2, HorizontalAlignment.Left);
            this.lv_ListView.Columns.Add("Coluna 2", -2, HorizontalAlignment.Left);
            this.lv_ListView.Anchor = AnchorStyles.None;
            this.TableLayoutPanel.Controls.Add(this.lv_ListView, 1, 1);

            // Label e CheckedListBox - Coluna com caixa de seleção
            this.lbl_CheckedListBox      = new Library.Label();
            this.lbl_CheckedListBox.Text = "CheckedListBox";
            this.TableLayoutPanel.Controls.Add(this.lbl_CheckedListBox, 2, 0);

            this.clb_CheckedLB      = new CheckedListBox();
            this.clb_CheckedLB.Size = new Size(100, 120);
            string[] pagtos = { "Opção A", "Opção B", "Opção C", "Opção D", "Opção E" };
            this.clb_CheckedLB.Items.AddRange(pagtos);
            this.clb_CheckedLB.ItemCheck    += new ItemCheckEventHandler(this.Clb_CheckedLB_ItemCheck);
            this.clb_CheckedLB.SelectionMode = SelectionMode.One;
            this.clb_CheckedLB.CheckOnClick  = true;
            this.clb_CheckedLB.Anchor        = AnchorStyles.None;
            this.TableLayoutPanel.Controls.Add(this.clb_CheckedLB, 2, 1);

            // Label e "OpenFile" Button - Abrir arquivos
            this.lbl_Open      = new Library.Label();
            this.lbl_Open.Text = "Button Open File";
            this.TableLayoutPanel.Controls.Add(this.lbl_Open, 0, 3);

            this.btn_OpenFile           = new Button();
            this.btn_OpenFile.Text      = "OPEN FILE";
            this.btn_OpenFile.Size      = new Size(180, 40);
            this.btn_OpenFile.BackColor = ColorTranslator.FromHtml("#4e4786");
            this.btn_OpenFile.Font      = new Font(btn_OpenFile.Font, FontStyle.Bold);
            this.btn_OpenFile.ForeColor = Color.White;
            this.btn_OpenFile.Click    += new EventHandler(this.Btn_OpenFileClick);
            this.TableLayoutPanel.Controls.Add(this.btn_OpenFile, 1, 3);
            this.TableLayoutPanel.SetColumnSpan(btn_OpenFile, 2);
            this.btn_OpenFile.Anchor = AnchorStyles.None;

            //Label e ProgressBar
            this.lbl_Barra2      = new Library.Label();
            this.lbl_Barra2.Text = "ProgressBar";
            this.TableLayoutPanel.Controls.Add(this.lbl_Barra2, 0, 5);

            this.pb_Barra         = new ProgressBar();
            this.pb_Barra.Size    = new Size(300, 20);
            this.pb_Barra.Visible = true;
            this.pb_Barra.Value   = 0;
            //this.pb_Barra.Minimum = 0;
            this.pb_Barra.Maximum = 100;
            this.pb_Barra.Step    = 1;
            this.pb_Barra.Style   = ProgressBarStyle.Marquee;
            this.pb_Barra.MarqueeAnimationSpeed = 100;
            this.TableLayoutPanel.Controls.Add(this.pb_Barra, 1, 5);
            this.TableLayoutPanel.SetColumnSpan(pb_Barra, 2);
            this.pb_Barra.Anchor = AnchorStyles.None;

            // Label e DateTimePicker - Data específica
            this.lbl_DataTP      = new Library.Label();
            this.lbl_DataTP.Text = "DateTimePicker";
            this.TableLayoutPanel.Controls.Add(this.lbl_DataTP, 0, 7);

            this.dp_DataTP              = new DateTimePicker();
            this.dp_DataTP.Size         = new Size(300, 20);
            this.dp_DataTP.Format       = DateTimePickerFormat.Time;
            this.dp_DataTP.Format       = DateTimePickerFormat.Custom;
            this.dp_DataTP.CustomFormat = "dd MMMM yyyy - dddd";
            // this.dt_DataLocacao.ShowCheckBox = true;
            // this.dt_DataLocacao.ShowUpDown = true;
            this.TableLayoutPanel.Controls.Add(this.dp_DataTP, 1, 7);
            this.TableLayoutPanel.SetColumnSpan(dp_DataTP, 2);
            this.dp_DataTP.Anchor = AnchorStyles.None;

            // Labels E TrackBar
            this.lbl_TrackB      = new Library.Label();
            this.lbl_TrackB.Text = "TrackBar";
            this.TableLayoutPanel.Controls.Add(this.lbl_TrackB, 0, 9);

            this.lbl_TrackBar           = new Label();
            this.lbl_TrackBar.Text      = "   0% <---------------------------> 100%";
            this.lbl_TrackBar.AutoSize  = true;
            this.lbl_TrackBar.Font      = new Font(lbl_TrackBar.Font, FontStyle.Italic);
            this.lbl_TrackBar.ForeColor = Color.Black;
            this.TableLayoutPanel.Controls.Add(this.lbl_TrackBar, 1, 9);
            this.TableLayoutPanel.SetColumnSpan(lbl_TrackBar, 2);
            this.lbl_TrackBar.Anchor = AnchorStyles.None;

            // Barra de seleção gradual
            this.tb_ExTrackBar               = new TrackBar();
            this.tb_ExTrackBar.Size          = new System.Drawing.Size(200, 45);
            this.tb_ExTrackBar.Maximum       = 100;
            this.tb_ExTrackBar.TickFrequency = 10;
            this.tb_ExTrackBar.LargeChange   = 10;
            this.tb_ExTrackBar.SmallChange   = 10;
            this.tb_ExTrackBar.Scroll       += new EventHandler(Tb_ExTrackBar_Scroll);
            this.TableLayoutPanel.Controls.Add(this.tb_ExTrackBar, 1, 10);
            this.TableLayoutPanel.SetColumnSpan(tb_ExTrackBar, 2);
            this.tb_ExTrackBar.Anchor = AnchorStyles.None;

            // Display do numérico do TrackBar
            this.tb_TrackBar      = new TextBox();
            this.tb_TrackBar.Size = new System.Drawing.Size(50, 40);
            this.TableLayoutPanel.Controls.Add(this.tb_TrackBar, 1, 11);
            this.TableLayoutPanel.SetColumnSpan(tb_TrackBar, 2);
            this.tb_TrackBar.Anchor = AnchorStyles.Top;

            // Label e ErrorProvider - 1 coluna
            this.lbl_Error      = new Library.Label();
            this.lbl_Error.Text = "   ErrorProvider\n(Somente Letras)";
            this.TableLayoutPanel.Controls.Add(this.lbl_Error, 0, 13);

            this.txt_ErrorBox      = new TextBox();
            this.txt_ErrorBox.Size = new Size(100, 40);
            this.TextError         = new ErrorProvider();
            this.TextError.SetIconAlignment(this.txt_ErrorBox, ErrorIconAlignment.MiddleRight);
            this.TextError.SetIconPadding(this.txt_ErrorBox, 25);
            this.TextError.BlinkStyle = ErrorBlinkStyle.NeverBlink;
            this.TableLayoutPanel.Controls.Add(this.txt_ErrorBox, 1, 13);
            this.txt_ErrorBox.Anchor = AnchorStyles.Left;

            // Botões de decisões
            this.btn_TesteErro           = new Button();
            this.btn_TesteErro.Text      = "TESTAR ERRO";
            this.btn_TesteErro.Size      = new Size(100, 40);
            this.btn_TesteErro.BackColor = ColorTranslator.FromHtml("#4e4786");
            this.btn_TesteErro.Font      = new Font(btn_TesteErro.Font, FontStyle.Bold);
            this.btn_TesteErro.ForeColor = Color.White;
            this.btn_TesteErro.Click    += new EventHandler(this.Btn_TesteErro_Click);
            this.TableLayoutPanel.Controls.Add(this.btn_TesteErro, 2, 13);
            this.btn_TesteErro.Anchor = AnchorStyles.None;

            this.Controls.Add(this.TableLayoutPanel);
        }