Ejemplo n.º 1
0
 private void button_startExport_Click(object sender, EventArgs e)
 {
     APIRequester.TaskDataConfig config = new APIRequester.TaskDataConfig()
     {
         pageIndex = (int)numericUpDown_pageIndex.Value,
         pageSize  = (int)numericUpDown_pageSize.Value
     };;
     if (radioButton_dataType.Checked)
     {
         config.dataType = 0;
     }
     if (radioButton_dataType2.Checked)
     {
         config.dataType = 1;
     }
     config.savePath = textBox_savePath.Text;
     if (listView_taskGroup.Items.Count > 0)
     {
         button_startExport.Enabled = false;
         listView_taskGroup.Enabled = false;
         SetProgressBarValue(0, 100);
         GetCheckedGroupAndTaskThread = new Thread(new ParameterizedThreadStart(GetCheckedGroupAndTask));
         GetCheckedGroupAndTaskThread.Start(config);
     }
 }
Ejemplo n.º 2
0
 private void GetCheckedGroupAndTask(object _config)
 {
     APIRequester.TaskDataConfig config = _config as APIRequester.TaskDataConfig;
     try
     {
         foreach (ListViewItem item in listView_taskGroup.Items)
         {
             if (item.Checked)
             {
                 config.groupIndex = item.Index;
                 _apiRequester.GetDataByGroupAndSave(config);
             }
         }
     }
     catch (Exception e)
     {
     }
     button_startExport.Enabled = true;
     listView_taskGroup.Enabled = true;
 }