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);
            }
        }
    }
}

BaseWizardForm,布布扣,bubuko.com

时间: 2024-10-05 09:35:26

BaseWizardForm的相关文章

WizardEntry

using System; using System.Collections.Generic; using System.Linq; using System.Text; using WindowsFormsApplication3.FormPage.UserMode; namespace WindowsFormsApplication3.Model { public class WizardEntry { public BaseWizardForm fatherForm; public Bas