//private readonly IAddressModelService _modelService; #endregion #region Constructors public StatePresenter(IStateView view, Estado estado, IUnityContainer container) { if (view == null) { throw new ArgumentNullException("view"); } if (estado == null) { throw new ArgumentNullException("estado"); } if (container == null) { throw new ArgumentNullException("container"); } //if (modelService == null) //{ // throw new ArgumentNullException("modelService"); //} this._container = container; //this._modelService = modelService; this.SubmitCommand = new DelegateCommand <object>(this.Submit, this.CanSubmit); this.CancelCommand = new DelegateCommand <object>(this.Cancel); this.SearchCountryCommand = new DelegateCommand <object>(this.SearchCountry); this.Estado = estado; this._view = view; this._view.SetPresenter(this); OnPropertyChanged("Estado"); // para executar a validação dos dados }
public StatePresenter(IStateView stateView, IMessageHub aggregator, IGame game) { _stateView = stateView; _stateView.SunClicked += OnSunClicked; _game = game; _aggregator = aggregator; _aggregator.Subscribe <GameFinishedMessage>(m => OnGameFinished(m.Game)); _aggregator.Subscribe <FlaggedCountChangedMessage>(m => OnFlaggedCountChanged(m.Game)); }
public StateController(IStateView i_View) { r_StateView = i_View; initMessageMap(); }