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