Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 public void AddStrategy(IBackgroundStrategy strategy)
 {
     Strategies.AddLast(strategy);
 }
Ejemplo n.º 3
0
 public void Init(BackgroundOptions ops)
 {
     _backgroundStrategy = StrategyFactory.CreateStrategy(false);
     _backgroundStrategy.Init(ops);
     _backgroundStrategy.Worker.DoWork += (o, eventArgs) => DoRecognize();
     DoScan();
     _backgroundStrategy.Run();
 }