예제 #1
0
        public RegularMailService()
        {
            InitializeComponent();

            //初始化调度器工厂
            ISchedulerFactory sf = SchedulerManager.GetSchedulerFactory();
            //获取默认调度器
            IScheduler scheduler = SchedulerManager.GetScheduler();

            SchedulerManager.GetScheduler().AddGlobalJobListener(SchedulerManager.GetJobListener());
        }
예제 #2
0
파일: Form1.cs 프로젝트: radtek/RegularMail
        public Form1()
        {
            InitializeComponent();

            Control.CheckForIllegalCrossThreadCalls = false;

            //初始化调度器工厂
            ISchedulerFactory sf = SchedulerManager.GetSchedulerFactory();
            //获取默认调度器
            IScheduler scheduler = SchedulerManager.GetScheduler();

            //安装全局任务监视器
            SchedulerManager.GetScheduler().AddGlobalJobListener(SchedulerManager.GetJobListener());
            //启动调度器
            scheduler.Start();
        }