首页 > 代码库 > BaseWizardForm

BaseWizardForm

using System;using System.Collections.Generic;using System.Linq;using System.Text;using WindowsFormsApplication3.DataStorge;using WindowsFormsApplication3.Jobs;using WindowsFormsApplication3.Enums;using System.Threading;namespace WindowsFormsApplication3.FormPage.UserMode{    public class BaseWizardForm    {        protected List<BaseJob> jobs;         protected delegate void WizardRadioSelectedHanlder(BaseWizardForm selectedform);        public event WizardRadioSelectedHanlder WizardRadioSelected;        public void ReportRadioSelected(BaseWizardForm selectedform)        {            if (WizardRadioSelected != null)                WizardRadioSelected(selectedform);        }             protected CheckoutContext checkoutContext;        protected WizardPageType wizardPageType;        public BaseWizardForm(CheckoutContext checkoutContext,WizardPageType wizardPageType) {            this.checkoutContext = checkoutContext;            this.wizardPageType = wizardPageType;            jobs = new List<BaseJob>();        }        public virtual void Execute(object obj)        {            foreach (BaseJob job in jobs)            {                ThreadPool.QueueUserWorkItem(new WaitCallback(job.Execute), null);            }        }    }}