Beispiel #1
0
        private void btnNovaConsulta_Click(object sender, EventArgs e)
        {
            //this.Close();

            DaoCaso dao = new DaoCaso();

            List <Caso> casos = dao.getAll();

            CMaxMin maxMin = new CMaxMin();

            PropertyInfo[] nomeAtribs = casos[0].GetType().GetProperties();

            MaxMinimos mm = MaxMinimos.getInstance();


            for (int i = 3; i < nomeAtribs.Length - 1; i++)
            {
                List <double> valores = new List <double>();

                valores = maxMin.maxMinCol(casos, nomeAtribs[i]);

                mm.table.Add(nomeAtribs[i].Name, valores);
            }



            SelecionaAtributos st = new SelecionaAtributos();

            st.Show();
            this.Hide();
        }
        private double[] maxMinCol(String label)
        {
            MaxMinimos maxMin = MaxMinimos.getInstance();

            List <double> valores = (List <double>)maxMin.table[label];

            valores.Sort();

            double[] valNumerico = new double[2];

            valNumerico[0] = Convert.ToInt32(valores.First());
            valNumerico[1] = Convert.ToInt32(valores.Last());

            return(valNumerico);
        }