Example #1
0
        private void btn_load_Click(object sender, EventArgs e)
        {
            tbn_cancel.Enabled = true;
            if (lst_manual.SelectedItems.Count == 1)
            {
                EnumPTests test = (EnumPTests)int.Parse(lst_manual.SelectedItems[0].SubItems[0].Text);

               _exreport = new ExcelReport(_ge, _fe, test);
               this.pb_progress.Minimum = 0;
               this.pb_progress.Value = 0;
               this.pb_progress.Maximum = _exreport.FindTestsCount();
               this.pb_progress.Step = 1;
               _exreport.Worker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(Worker_ProgressChanged);
              _exreport.Create(this.dp_mindate.Value, this.dp_maxdate.Value);
            }
        }
Example #2
0
        private void lst_manual_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lst_manual.SelectedItems.Count == 1)
            {
               _test = (EnumPTests)int.Parse(lst_manual.SelectedItems[0].SubItems[0].Text);
               _exreport = new ExcelReport(_ge, _fe, _test);

               if (_exreport.FindTestsCount() != 0)
               {
                   this.dp_mindate.Value = _exreport.FindMinDate();
                   this.dp_maxdate.Value = _exreport.FindMaxDate();
                   this.EnabledButtons(true);
               }
               else
               {
                   this.dp_mindate.Value = this.dp_mindate.MinDate;
                   this.dp_maxdate.Value = this.dp_maxdate.MaxDate;
                   this.EnabledButtons(false);
               }

            }
        }