public LOGIN()
        {
            InitializeComponent();

            crearDbTablas cdt = new crearDbTablas();

            if (!creadoDB)
            {
                cdt.creacion();
                creadoDB = true;
            }
        }
Esempio n. 2
0
        private async void EjecucionConsultas_Click(object sender, EventArgs e)
        {
            try
            {
                crearDbTablas cDBtablas = new crearDbTablas();
                await cDBtablas.creacion();

                this.Hide();
                configuraciones c = new configuraciones();
                c.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Espere, se sigue instalando la base de datos", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Esempio n. 3
0
        private async void timer1_Tick(object sender, EventArgs e)
        {
            if (progressBar1.Value < 100)
            {
                progressBar1.Value = progressBar1.Value + 10;
                label2.Text        = "" + progressBar1.Value + "%";
            }
            else
            {
                timer1.Enabled = false;
                this.Hide();

                RegistryView registryViewArchitecture;

                if (Environment.Is64BitOperatingSystem)
                {
                    registryViewArchitecture = RegistryView.Registry64;
                }
                else
                {
                    registryViewArchitecture = RegistryView.Registry32;
                }

                using (RegistryKey registryKeyLocalMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, registryViewArchitecture))
                {
                    RegistryKey registryKey = registryKeyLocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer\CurrentVersion", false);

                    if (registryKey != null)
                    {
                        crearDbTablas cbd = new crearDbTablas();
                        await cbd.creacion();

                        registroDiario a = new registroDiario();
                        a.Show();
                        this.Hide();
                    }
                    else
                    {
                        InstaladorSQLbd isql = new InstaladorSQLbd();
                        isql.Show();
                        this.Hide();
                    }
                }
            }
        }