public static WebWeChatClient Build(NotifyEventListener notifyListener, ILogger logger = null) { if (logger == null) { logger = new EmptyLogger(); } return(new WebWeChatClient(notifyListener, logger)); }
public NotifyWindow(string title, string content, NotifyEventListener listener) { InitializeComponent(); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; tbContent.Text = content; lbTitle.Content = title; this.listener = listener; }
public HelpWindow(string title, string content, NotifyEventListener listener) { this.title = title; this.content = content; this.listener = listener; InitializeComponent(); initView(); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; }
private WebWeChatClient(NotifyEventListener notifyListener, ILogger logger) : this() { //注册日志 _builder.RegisterInstance(logger).As <ILogger>().SingleInstance(); //注册模块 _builder.RegisterInstance(new SessionModule()).SingleInstance(); _builder.RegisterInstance(new StoreModule()).SingleInstance(); _builder.Register <ILoginModule>(x => new LoginModule(this)).SingleInstance(); _builder.Register <IContactModule>(x => new ContactModule(this)).SingleInstance(); _builder.Register <IChatModule>(x => new ChatModule(this)).SingleInstance(); //注册事件 _builder.RegisterInstance(notifyListener); _container = _builder.Build(); _logger = _container.Resolve <ILogger>(); _notifyListener = _container.Resolve <NotifyEventListener>(); }
public static WebWeChatClient Build(NotifyEventListener notifyListener) { return(new WebWeChatClient(notifyListener)); }