public static void FillTemplate(ICollection<Person> persons, WordFillerOptions options) { _fillerStatusStrategy = StrategyFactory.CreateStrategy(options.IsBackground); _fillerStatusStrategy.Init(options.BackgroundOps); _fillerStatusStrategy.Worker.DoWork += (o, eventArgs) => FillTemplate(options.TemplateName, persons, options.SavePath); _fillerStatusStrategy.Run(); }
public void Init(BackgroundOptions ops) { _backgroundStrategy = StrategyFactory.CreateStrategy(false); _backgroundStrategy.Init(ops); _backgroundStrategy.Worker.DoWork += (o, eventArgs) => DoRecognize(); DoScan(); _backgroundStrategy.Run(); }