private void BTN_NewUser_Click(object sender, EventArgs e)
        {
            PageUserAdd = new PageUserEditandAdd(true, null, idioma, false);

            PageUserAdd.ShowDialog();

            GRID_USERS_VIEW.DataSource = manipulaUsuarios.GetUsers();

            //usuarios = ObterUsers.GetUsuarios(null, null, null, 0);
            //GRID_USERS_VIEW.DataSource = usuarios;
        }
        private void BTN_Edit1_Click(object sender, EventArgs e)
        {
            if (ContLinhasGrid() < 1)
            {
                return;
            }

            selectedUserName = GRID_USERS_VIEW.CurrentRow.Cells[3].Value.ToString();

            PageUserAdd = new PageUserEditandAdd(false, selectedUserName, idioma, false);

            PageUserAdd.ShowDialog();
            //usuarios = ObterUsers.GetUsuarios(null, null, null, 0);
            //GRID_USERS_VIEW.DataSource = usuarios;
            GRID_USERS_VIEW.DataSource = manipulaUsuarios.GetUsers();
        }
        private void BTN_Salvar_Click(object sender, EventArgs e)
        {
            bool returns = false;

            if (TXT_folderPath.Text == "")
            {
                TXT_folderPath.BackColor = Color.OrangeRed;
                returns = true;
            }
            if (TXT_Server.Text == "")
            {
                TXT_Server.BackColor = Color.OrangeRed;
                returns = true;
            }
            if (TXT_NomeBanco.Text == "")
            {
                TXT_NomeBanco.BackColor = Color.OrangeRed;
                returns = true;
            }
            if (TXT_User.Text == "")
            {
                TXT_User.BackColor = Color.OrangeRed;
                returns            = true;
            }
            if (TXT_Pass.Text == "")
            {
                TXT_Pass.BackColor = Color.OrangeRed;
                returns            = true;
            }
            if (returns)
            {
                return;
            }

            //ajsuta CS app
            AjustaCSConfig();

            ConfigurationManager.RefreshSection("connectionStrings");

            //Configuração Inicial
            AjustaConfigTrue();

            //LOG
            AjustaConfigLog();

            ConfigurationManager.RefreshSection("appSettings");


            //criar Banco de dados
            if (CHB_CriaBanco.Checked)
            {
                criaBanco.CriaBancoDeDados(TXT_NomeBanco.Text);
                CHB_GeraTabelas.Checked = true;
                CHB_GeraTabelas.Enabled = false;
            }

            //criar tabelas
            if (CHB_GeraTabelas.Checked)
            {
                CriaTabelas();
                PageUserEditandAdd pageUser = new PageUserEditandAdd(true, null, UserIdioma.Portugues, true);
                pageUser.ShowDialog();
            }



            this.Close();
        }