コード例 #1
0
 private void BotonConfiguracionAvanzada_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     using (Config.ConfigurarBd ConfigBD = new Config.ConfigurarBd()) {
         this.Hide();
         if (ConfigBD.ShowDialog() == DialogResult.Cancel)
         {
             this.Show();
         }
         else
         {
             this.DialogResult = System.Windows.Forms.DialogResult.OK;
             this.Close();
         }
     }
 }
コード例 #2
0
ファイル: Inicial.cs プロジェクト: solutema/ultralight
 private void BotonConfiguracionAvanzada_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
         using (Config.ConfigurarBd ConfigBD = new Config.ConfigurarBd()) {
                 this.Hide();
                 if (ConfigBD.ShowDialog() == DialogResult.Cancel) {
                         this.Show();
                 } else {
                         this.DialogResult = System.Windows.Forms.DialogResult.OK;
                         this.Close();
                 }
         }
 }
コード例 #3
0
ファイル: Inicial.cs プロジェクト: solutema/ultralight
 private void BotonSiguiente_Click(object sender, EventArgs e)
 {
         switch (Paso) {
                 case Inicial.Pasos.Inicio:
                         if (RadioInicioInstalacionLocal.Checked)
                                 Paso = Inicial.Pasos.InstalarServidor;
                         else if (RadioInicioConexionRemota.Checked)
                                 Paso = Inicial.Pasos.Deteccion;
                         break;
                 case Inicial.Pasos.Deteccion:
                         Paso = Inicial.Pasos.SeleccionarAlmacen;
                         break;
                 case Inicial.Pasos.SeleccionarAlmacen:
                         if (CheckEsteEquipo.Checked) {
                                 Paso = Inicial.Pasos.PruebaServidor;
                         } else if (CheckOtroEquipo.Checked) {
                                 Paso = Inicial.Pasos.NombreServidor;
                         } else if (CheckInstalarAhora.Checked) {
                                 Paso = Inicial.Pasos.InstalarServidor;
                         } else if (CheckConfigAvanzada.Checked) {
                                 using (Config.ConfigurarBd ConfigBD = new Config.ConfigurarBd()) {
                                         this.Hide();
                                         if (ConfigBD.ShowDialog() == DialogResult.Cancel) {
                                                 this.Show();
                                         } else {
                                                 this.DialogResult = System.Windows.Forms.DialogResult.OK;
                                                 this.Close();
                                         }
                                 }
                         }
                         break;
                 case Inicial.Pasos.NombreServidor:
                         if (EntradaServidor.Text.Length == 0) {
                                 Lui.Forms.MessageBox.Show("Por favor escriba el nombre del equipo.", "Error");
                         } else {
                                 Paso = Inicial.Pasos.PruebaServidor;
                         }
                         break;
                 case Inicial.Pasos.PruebaServidor:
                         if (Lfx.Workspace.Master.MasterConnection.IsOpen() && Lfx.Workspace.Master.IsPrepared()) {
                                 int PaisActual = Lfx.Workspace.Master.CurrentConfig.ReadGlobalSetting<int>("Sistema.Pais", 0);
                                 if (PaisActual == 0)
                                         Paso = Pasos.DatosEmpresa;
                                 else
                                         Paso = Pasos.Final;
                         } else {
                                 Paso = Inicial.Pasos.Final;
                         }
                         break;
                 case Pasos.DatosEmpresa:
                         if (EntradaPais.Elemento == null || EntradaEmpresaNombre.Text.Length < 3 || EntradaEmpresaEmail.Text.Length < 3 || EntradaEmpresaEmail.Text.IndexOf('@') < 0) {
                                 Lui.Forms.MessageBox.Show("Por favor proporcione los datos de la empresa antes de continuar.", "Error");
                         } else {
                                 Paso = Pasos.Final;
                         }
                         break;
                 case Inicial.Pasos.Final:
                         this.DialogResult = System.Windows.Forms.DialogResult.OK;
                         this.Close();
                         return;
                 case Inicial.Pasos.InstalarServidor:
                         if (BotonInstalar.Enabled)
                                 BotonInstalar.PerformClick();
                         else
                                 this.Paso = 0;
                         break;
         }
         this.MostrarPaneles();
 }
コード例 #4
0
        private void BotonSiguiente_Click(object sender, EventArgs e)
        {
            switch (Paso)
            {
            case Inicial.Pasos.Inicio:
                if (RadioInicioInstalacionLocal.Checked)
                {
                    Paso = Inicial.Pasos.InstalarServidor;
                }
                else if (RadioInicioConexionRemota.Checked)
                {
                    Paso = Inicial.Pasos.Deteccion;
                }
                break;

            case Inicial.Pasos.Deteccion:
                Paso = Inicial.Pasos.SeleccionarAlmacen;
                break;

            case Inicial.Pasos.SeleccionarAlmacen:
                if (CheckEsteEquipo.Checked)
                {
                    Paso = Inicial.Pasos.PruebaServidor;
                }
                else if (CheckOtroEquipo.Checked)
                {
                    Paso = Inicial.Pasos.NombreServidor;
                }
                else if (CheckInstalarAhora.Checked)
                {
                    Paso = Inicial.Pasos.InstalarServidor;
                }
                else if (CheckConfigAvanzada.Checked)
                {
                    using (Config.ConfigurarBd ConfigBD = new Config.ConfigurarBd()) {
                        this.Hide();
                        if (ConfigBD.ShowDialog() == DialogResult.Cancel)
                        {
                            this.Show();
                        }
                        else
                        {
                            this.DialogResult = System.Windows.Forms.DialogResult.OK;
                            this.Close();
                        }
                    }
                }
                break;

            case Inicial.Pasos.NombreServidor:
                if (EntradaServidor.Text.Length == 0)
                {
                    Lui.Forms.MessageBox.Show("Por favor escriba el nombre del equipo.", "Error");
                }
                else
                {
                    Paso = Inicial.Pasos.PruebaServidor;
                }
                break;

            case Inicial.Pasos.PruebaServidor:
                if (Lfx.Workspace.Master.MasterConnection.IsOpen() && Lfx.Workspace.Master.IsPrepared())
                {
                    int PaisActual = Lfx.Workspace.Master.CurrentConfig.ReadGlobalSetting <int>("Sistema.Pais", 0);
                    if (PaisActual == 0)
                    {
                        Paso = Pasos.DatosEmpresa;
                    }
                    else
                    {
                        Paso = Pasos.Final;
                    }
                }
                else
                {
                    Paso = Inicial.Pasos.Final;
                }
                break;

            case Pasos.DatosEmpresa:
                if (EntradaPais.Elemento == null || EntradaEmpresaNombre.Text.Length < 3 || EntradaEmpresaEmail.Text.Length < 3 || EntradaEmpresaEmail.Text.IndexOf('@') < 0)
                {
                    Lui.Forms.MessageBox.Show("Por favor proporcione los datos de la empresa antes de continuar.", "Error");
                }
                else
                {
                    Paso = Pasos.Final;
                }
                break;

            case Inicial.Pasos.Final:
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
                return;

            case Inicial.Pasos.InstalarServidor:
                if (BotonInstalar.Enabled)
                {
                    BotonInstalar.PerformClick();
                }
                else
                {
                    this.Paso = 0;
                }
                break;
            }
            this.MostrarPaneles();
        }
コード例 #5
0
        private void BotonSiguiente_Click(object sender, EventArgs e)
        {
            switch (Paso)
            {
            case Inicial.Pasos.Inicio:
                //Se Configura la base de datos.
                using (Config.ConfigurarBd ConfigBD = new Config.ConfigurarBd()) {
                    this.Hide();
                    if (ConfigBD.ShowDialog() == DialogResult.Cancel)
                    {
                        this.Show();
                    }
                    else
                    {
                        this.DialogResult = System.Windows.Forms.DialogResult.OK;
                        this.Close();
                        Paso = Inicial.Pasos.PruebaServidor;
                    }
                }
                break;

            case Inicial.Pasos.Password:

                //Paso = Inicial.Pasos.Inicio;
                break;

            case Inicial.Pasos.PruebaServidor:
                //Prueba si el servidor se encuentra bíen
                if (Lfx.Workspace.Master.MasterConnection.IsOpen() && Lfx.Workspace.Master.IsPrepared())
                {
                    int PaisActual = Lfx.Workspace.Master.CurrentConfig.ReadGlobalSetting <int>("Sistema.Pais", 0);
                    if (PaisActual == 0)
                    {
                        Paso = Pasos.DatosEmpresa;
                    }
                    else
                    {
                        Paso = Pasos.Final;
                    }
                }
                else
                {
                    Paso = Inicial.Pasos.Final;
                }
                break;

            case Pasos.DatosEmpresa:
                //Si esta bíen el servidor y es primera vez se ingresa empresa.
                if (EntradaPais.Elemento == null || EntradaEmpresaNombre.Text.Length < 3 || EntradaEmpresaEmail.Text.Length < 3 || EntradaEmpresaEmail.Text.IndexOf('@') < 0)
                {
                    Lui.Forms.MessageBox.Show("Por favor proporcione los datos de la empresa antes de continuar.", "Error");
                }
                else
                {
                    Paso = Pasos.Final;
                }
                break;

            case Inicial.Pasos.Final:
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
                return;
            }
            this.MostrarPaneles();
        }