public void Initialize(PluginInfo info) { pluginInfo = info; PluginConfig = JsonConvert.DeserializeObject <ConfigInfo>(info.Config); Operate.Init(); WebIoc.Register(b => b.Register(c => new Loger(PluginIoc.Container.Resolve <ILogOperate>())).As <ILoger>().SingleInstance(), assemblyGuid, info.Status == PluginStatus.Usable); }
public MainWindow() { InitializeComponent(); Loaded += MainWindow_Loaded; _Tool = new Operate(); _Tool.Init(); try { new Thread(() => { var time = new System.Timers.Timer(60000); time.AutoReset = true; time.Elapsed += (sender, ee) => { SetAllValids(); }; time.Start(); }).Start(); new Thread(() => { Log.ImagesClear(DateTime.Now.AddHours(-2.0)); }).Start(); } catch (Exception e) { Log.WriteLine("Exception" + e.Message); } }