private void OnExecuted(object sender, ExecutedRoutedEventArgs e) { e.Parameter.SaftyInvoke <IDocumentReference>(d => { if (_openedDocs.ContainsKey(d)) { _dockSitePresenter.Activate(_openedDocs[d]); return; } Show <Interfaces.IShiftComposerPresenter>(new Dictionary <string, object> { { "Schedule", d.Tag } }); _openedDocs[d] = _dockSitePresenter.ActivePresenter as IMetadataContainer; _dockSitePresenter.ActivePresenter.SaftyInvoke <ILifecycleNotifier>(w => { w.WasShutdown += delegate { _openedDocs.Remove(d); }; }); }); }
public virtual void Activate(object model) { _dockSitePresenter.Activate(model); }