Пример #1
0
        private void StartTask_Click(object sender, EventArgs e)
        {
            if (this.TaskInfoDataView.SelectedRows.Count > 1)
            {
                MessageBox.Show("当前版本暂时每次只能启动一个任务:(", "提示");
                return;
            }
            TaskDataInfoPacket taskInfoPacket = new TaskDataInfoPacket();
            if (forwardInstantRadio.Checked)
            {
               // for (int i = 0; i < this.TaskInfoDataView.SelectedRows.Count; i++)//遍历所有选中的行
               // {
                    //this.TaskInfoDataView.SelectedRows[i].Cells[0].EditedFormattedValue.ToString();
               // }
                taskInfoPacket.forward_type = 1; //Instant Forward
                taskInfoPacket.forward_num = Convert.ToInt32(forwardNumCtrl.Value);
                taskInfoPacket.preCountUseOnlyOne = forwardLimitCheckbox.Checked;
                taskInfoPacket.forward_IntervalForm = Convert.ToInt32(forwardIntevalFromCtrl.Value);
                taskInfoPacket.forward_IntervalTo = Convert.ToInt32(forwardIntevalToCtrl.Value);
                taskInfoPacket.restAfterNumber = Convert.ToInt32(forwardRestNumCtrl.Value);
                taskInfoPacket.restMinute = Convert.ToInt32(forwardRestIntervalCtrl.Value);
                taskInfoPacket.useADSLChange = useADSLCheckBox.Checked;
                taskInfoPacket.useProxyIP = useProxyIPCheckBox.Checked;
                taskInfoPacket.forward_num_changeIP = Convert.ToInt32(forwardNumChangeIP.Value);
                taskInfoPacket.followAfterforward = useFollowAuthorCheckbox.Checked;
                taskInfoPacket.commitContent = selectCommitType.SelectedIndex;
                taskInfoPacket.useAddRandomEmote = useRandomAtUserCheckbox.Checked;
                taskInfoPacket.useAddRandomNumber = useRandomNumCheckbox.Checked;
                taskInfoPacket.useRandomATOnlineuser = useRandomAtUserCheckbox.Checked;
                taskInfoPacket.usePraiseAfterforward = usePariseCheckbox.Checked;
                if (mAccountLoginCoreHandle!=null)
                    taskInfoPacket.passLoginAccount = mAccountLoginCoreHandle;

                TaskRunningHandle mainTaskHandle = new TaskRunningHandle(taskInfoPacket, TaskInfoDataView);
                switch (Convert.ToInt32(this.TaskInfoDataView.SelectedCells[TaskInfoDataView.SelectedCells.Count - 1].OwningRow
                    .Cells["tasktype"].Value.ToString()))
                {
                    case 1:
                         (new Thread(new ThreadStart(mainTaskHandle.ExecuteTaskByForwardTypeOne))).Start();
                       // {
                       // }
                        break;
                    case 2:
                        break;
                    case 3:
                        break;
                }

            }
            else if (delayForwardRadio.Checked)
            {

            }
        }
Пример #2
0
 public TaskRunningHandle(TaskDataInfoPacket UITaskInfo,DataGridView fromParentDataGridView )
 {
     mCurrentUITaskInfo = UITaskInfo;
     mParentDataGridViewCtrl = fromParentDataGridView;
 }