Example #1
0
        private void 未处理ToolStripMenuItemClick(object sender, EventArgs e)
        {
            IEnumerator enumerator = this.jobItemListView.SelectedItems.GetEnumerator();

            while (enumerator.MoveNext())
            {
                CxListViewItem current = (CxListViewItem)enumerator.Current;
                current.JobItem.State = JobState.NotProccessed;
            }
        }
Example #2
0
        private void DelButtonClick(object sender, EventArgs e)
        {
            IEnumerator enumerator = this.jobItemListView.SelectedItems.GetEnumerator();

            while (enumerator.MoveNext())
            {
                CxListViewItem current = (CxListViewItem)enumerator.Current;
                this.jobItemListView.Items.Remove(current);
                if (((this.workingJobItems != null) && this.workingJobItems.Contains(current.JobItem)) && (this.workingJobItems.IndexOf(current.JobItem) > this.workingJobItems.IndexOf(this.workingJobItem)))
                {
                    this.workingJobItems.Remove(current.JobItem);
                }
            }
        }
Example #3
0
        private List <JobItem> GetWorkingJobItems()
        {
            JobItem        jobItem;
            List <JobItem> list       = new List <JobItem>();
            IEnumerator    enumerator = this.jobItemListView.Items.GetEnumerator();

            while (enumerator.MoveNext())
            {
                CxListViewItem current = (CxListViewItem)enumerator.Current;
                jobItem = current.JobItem;
                if (jobItem.State == JobState.NotProccessed)
                {
                    jobItem.State = JobState.Waiting;
                }
                if (jobItem.State == JobState.Stop)
                {
                    if (this.configForm.chbSilentRestart.Checked)
                    {
                        jobItem.State = JobState.Waiting;
                    }
                    else if (MessageBox.Show(current.SubItems[1].Text + "\n该项已经中止。是否重新开始?\n", "项目中止", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.OK)
                    {
                        jobItem.State = JobState.Waiting;
                    }
                }
            }
            IEnumerator enumerator2 = this.jobItemListView.Items.GetEnumerator();

            while (enumerator2.MoveNext())
            {
                CxListViewItem item3 = (CxListViewItem)enumerator2.Current;
                jobItem = item3.JobItem;
                if (jobItem.State == JobState.Waiting)
                {
                    list.Add(jobItem);
                }
            }
            return(list);
        }
Example #4
0
        private void SettingButtonClick(object sender, EventArgs e)
        {
            CxListViewItem item    = (CxListViewItem)this.jobItemListView.SelectedItems[0];
            JobItem        jobItem = item.JobItem;

            if (jobItem.State == JobState.Working)
            {
                MessageBox.Show("项目正在工作中,无法设置。", "无效操作", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            JobItem[] items = new JobItem[] { jobItem };
            this.SetUpJobItems(items);
            if (this.jobSettingForm == null)
            {
                this.jobSettingForm = new JobSettingForm();
            }
            this.jobSettingForm.UpdateProfiles(ArrayBuilder.Build <string>(this.profileBox.Items), jobItem.ProfileName);
            this.jobSettingForm.SetUpFormForItem(jobItem);
            DialogResult result = this.jobSettingForm.ShowDialog();

            this.UpdateProfileBox(this.jobSettingForm.GetProfiles(), this.profileBox.Text);
            this.jobSettingForm.Clear();
        }