Exemplo n.º 1
0
        public void SetSize()
        {
            CadastroUsuário telaUsuario        = new CadastroUsuário();
            int             larguraTelaUsuario = telaUsuario.Width;
            int             larguraBotoes      = larguraTelaUsuario / 7;
            int             posX = 1;
            int             posY = telaUsuario.Height - btnTelaUsuario.Height;
            int             IncX = larguraBotoes + 1;

            btnTelaUsuario.Width     = larguraBotoes;
            btnTelaVeiculo.Width     = larguraBotoes;
            btnTelaFuncionario.Width = larguraBotoes;
            btnTelaLocar.Width       = larguraBotoes;
            btnTelaFrota.Width       = larguraBotoes;
            btnTelaFinanceiro.Width  = larguraBotoes;
            btnTelaManutencao.Width  = larguraBotoes;
            btnTelaUsuario.Location  = new Point(posX, posY);
            posX = posX + IncX;
            btnTelaVeiculo.Location = new Point(posX, posY);
            posX = posX + IncX;
            btnTelaFuncionario.Location = new Point(posX, posY);
            posX = posX + IncX;
            btnTelaLocar.Location = new Point(posX, posY);
            posX = posX + IncX;
            btnTelaFrota.Location = new Point(posX, posY);
            posX = posX + IncX;
            btnTelaFinanceiro.Location = new Point(posX, posY);
            posX = posX + IncX;
            btnTelaManutencao.Location = new Point(posX, posY);
        }
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            this.Hide();
            CadastroUsuário telaUsuario = new CadastroUsuário();

            telaUsuario.ShowDialog();
        }