Ejemplo n.º 1
0
        //ok button
        private void button3_Click(object sender, EventArgs e)
        {
            int startMonth, startYear, endMonth, endYear;

            //historical period
            startMonth = comboBox1.SelectedIndex + 1;
            startYear  = int.Parse(comboBox5.SelectedItem.ToString());
            endMonth   = comboBox2.SelectedIndex + 1;
            endYear    = int.Parse(comboBox6.SelectedItem.ToString());
            dates[0]   = new ProcessData.DateRange(startMonth, startYear, endMonth, endYear);

            if (dates.Count == 1)
            {
                startMonth = comboBox3.SelectedIndex + 1;
                startYear  = int.Parse(comboBox7.SelectedItem.ToString());
                endMonth   = comboBox4.SelectedIndex + 1;
                endYear    = int.Parse(comboBox8.SelectedItem.ToString());
                dates.Add(new ProcessData.DateRange(startMonth, startYear, endMonth, endYear));
            }

            if (comboBox9.SelectedIndex == 0)
            {
                summerOnly = true;
            }
            else
            {
                summerOnly = false;
            }

            this.Hide();

            processor.generateChangeFactors();
        }
Ejemplo n.º 2
0
        public void updateList()
        {
            List <string> list = new List <string>();

            for (int i = 1; i < dates.Count(); i++)
            {
                ProcessData.DateRange range = dates[i];
                list.Add(range.ToString());
            }

            listBox1.DataSource = null;
            listBox1.DataSource = list;
        }