public ScreenHost(NamedType key, TBaseView view, IScreen screen, Func <TBaseView, IScreenHost> createScreen, Func <TBaseView, PopupAttribute, IScreenHost> createPopup, PopupAttribute popupAttribute) { _key = key; _view = view; _screen = screen; _createScreen = createScreen; _createPopup = createPopup; _popupAttribute = popupAttribute; _screen.PropertyChanged += OnPropertyChanged; }
public ScreenHost(NamedType key, TBaseView view, IScreen screen, Func <TBaseView, IScreenHost> createScreen, Func <TBaseView, PopupAttribute, IScreenHost> createPopup, PopupAttribute popupAttribute) { this.key = key; this.view = view; this.screen = screen; this.createScreen = createScreen; this.createPopup = createPopup; this.popupAttribute = popupAttribute; this.screen.TitleChanged += OnTitleChanged; }
public ScreenHost(NamedType key, TBaseView view, IScreen screen, Func <TBaseView, TScreen> createScreen, Action <TScreen> showScreen, Func <TBaseView, PopupAttribute, TPopup> createPopup, Action <TPopup> showPopup, PopupAttribute popupAttribute) { Key = key; _view = view; _screen = screen; _createScreen = createScreen; _showScreen = showScreen; _createPopup = createPopup; _showPopup = showPopup; _popupAttribute = popupAttribute; _screen.PropertyChanged += OnPropertyChanged; }
public bool TryCreate(string instanceId, Func <IInternalScreen, object> getParameter, out IScreen logic, out TBaseView view, out Exception ex) { ex = null; try { logic = _resolve(_idType) as IScreen; if (logic is IInternalScreen internalScreen) { internalScreen.Setup(instanceId); internalScreen.Parameter = getParameter(internalScreen); } view = _factory(logic); return(true); } catch (Exception e) { logic = null; view = null; ex = e; return(false); } }
public bool TryCreate(string instanceId, object parameter, out IScreen logic, out TBaseView view, out Exception ex) { ex = null; try { logic = _resolve(_idType) as IScreen; var setupable = logic as IInternalScreen; if (setupable != null) { setupable.Setup(instanceId); setupable.Parameter = parameter; } view = _factory(logic); return(true); } catch (Exception e) { logic = null; view = null; ex = e; return(false); } }