public BehaviorModel(UCWebBrowserEx wb, BeforeAddBehavior methodBeforeAddBehavior, AfterAddBehavior methodAfterAddBehavior, ThrowException methodThrowException, OnClick methodOnClick, MouseOverOnBrowser methodMouseOverOnBrowser) { this._webBrowser = wb; this._methodBeforeAddBehavior = methodBeforeAddBehavior; this._methodAfterAddBehavior = methodAfterAddBehavior; this._methodThrowException = methodThrowException; this._methodClick = methodOnClick; this._methodMouseOverOnBrowser = methodMouseOverOnBrowser; this.AttachEvent(); }
public void AddBehaviorModel(BeforeAddBehavior methodBeforeAddBehavior, AfterAddBehavior methodAfterAddBehavior, ThrowException methodThrowException, OnClickOnBrowser methodOnClickOnBrowser, MouseOverOnBrowser methodMouseOverOnBrowser) { if (this.behaviorModel == null) { this._methodBeforeAddBehavior = methodBeforeAddBehavior; this._methodAfterAddBehavior = methodAfterAddBehavior; this._methodThrowException = methodThrowException; this._methodOnClickOnBrowser = methodOnClickOnBrowser; this._methodMouseOverOnBrowser = methodMouseOverOnBrowser; this._methodMouseOverOnBrowser = methodMouseOverOnBrowser; this._methodOnClickOnBrowser = methodOnClickOnBrowser; this.behaviorModel = new BehaviorModel(this, this.methodBeforeAddBehavior, this.methodAfterAddBehavior, this.methodThrowExcepotion, this.methodOnClickOnBrowser, this.methodMouseOverOnBrowser); } else { this.behaviorModel.RestartBehavior(); } }