public void ToolsHistoryClick() { Debug.Assert(_view.WorkUnitHistoryMenuEnabled); if (_historyPresenter == null) { _historyPresenter = _presenterFactory.GetHistoryPresenter(); _historyPresenter.Initialize(); _historyPresenter.PresenterClosed += (sender, args) => { _presenterFactory.Release(_historyPresenter); _historyPresenter = null; }; } if (_historyPresenter != null) { _historyPresenter.Show(); } }
public void ToolsHistoryClick() { Debug.Assert(_view.WorkUnitHistoryMenuEnabled); if (_historyPresenter == null) { _historyPresenter = ServiceLocator.Resolve<HistoryPresenter>(); _historyPresenter.Initialize(); _historyPresenter.PresenterClosed += delegate { _historyPresenter = null; }; } _historyPresenter.Show(); }