The thread was create by quartz(.net),I want to show a new flash form within a work thread.like this:
Code: Select all
class WidgetJob : IJob
{
public virtual void Execute(JobExecutionContext context) {
try {
JobDataMap data = context.JobDetail.JobDataMap;
//string xml = data.GetString("swf");
Form1 form = new Form1();
ISynchronizeInvoke synchronizer;
synchronizer = form;
MethodInvoker invoker = new MethodInvoker(form.Show);
Global.mainForm.Invoke(invoker, null);
} catch (JobExecutionException e) {
throw new NotImplementedException();
}
}
}
the quartz configure like this:
properties["quartz.scheduler.instanceName"] = "PriorityExampleScheduler";
properties["quartz.threadPool.threadCount"] = "1";
properties["quartz.threadPool.type"] = "Quartz.Simpl.SimpleThreadPool, Quartz";
properties["quartz.jobStore.type"] = "Quartz.Simpl.RAMJobStore, Quartz";