public FrmAjusteFunciones(MetodologiaAjuste metodologia, Segmentacion segmentacion, List <Double> intervalos, int flagIntervalos, Origen proyecto)
 {
     InitializeComponent();
     this.metodologia    = metodologia;
     this.segmentacion   = segmentacion;
     this.intervalos     = intervalos;
     this.flagIntervalos = flagIntervalos;
     this.proyecto       = proyecto;
 }
        private void btnCalcularFDP_Click(object sender, EventArgs e)
        {
            if (eventos.Count() >= 15)
            {
                try
                {
                    MetodologiaAjuste metodologia  = MetodologiaAjuste.EVENTO_A_EVENTO;
                    Segmentacion      segmentacion = Segmentacion.SEGUNDO;
                    int flagIntervalos             = 0;

                    if (rbFecha.Checked)
                    {
                        metodologia  = rbEventoAEvento.Checked ? MetodologiaAjuste.EVENTO_A_EVENTO : MetodologiaAjuste.DT_CONSTANTE;
                        segmentacion = rbDia.Checked ? Segmentacion.DIA : (rbHora.Checked ? Segmentacion.HORA : (rbMinuto.Checked ? Segmentacion.MINUTO : Segmentacion.SEGUNDO));
                        FrmAjusteFunciones frm = new FrmAjusteFunciones(metodologia, segmentacion, eventos, flagIntervalos, this.proyecto);
                        this.Visible = false;
                        frm.ShowDialog();
                        this.Visible = true;
                    }
                    else if (rbIntervalos.Checked)
                    {
                        metodologia    = MetodologiaAjuste.EVENTO_A_EVENTO;
                        flagIntervalos = 1;
                        FrmAjusteFunciones frm = new FrmAjusteFunciones(metodologia, segmentacion, intervalosParciales, flagIntervalos, this.proyecto);
                        this.Visible = false;
                        frm.ShowDialog();
                        this.Visible = true;
                    }
                }
                catch
                {
                    mostrarMensaje("Error al calcular funciones", Color.FromArgb(255, 89, 89));
                }
            }
            else
            {
                mostrarMensaje("Debe haber al menos 15 eventos en el proyecto", Color.FromArgb(255, 255, 0));
            }
        }