protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); HomePageParams param = (HomePageParams)e.Parameter; this._param = param; Increment.rx_Tap() .Select(x => new MainAction(action: MainAction.Action.Increment)) .Bind(to: this._param.Dependency._reactor.action) .DisposeBag(bag: this.disposeBag); Decrement.rx_Tap() .Select(x => new MainAction(action: MainAction.Action.Decrement)) .Bind(to: this._param.Dependency._reactor.action) .DisposeBag(bag: this.disposeBag); InputText.rx_TextChanged() .Select(x => MainAction.Dispatcher(MainAction.Action.didMessage, x)) .Bind(to: this._param.Dependency._reactor.action) .DisposeBag(bag: this.disposeBag); this._param.Dependency._reactor.state .Select(state => state.Counter.ToString()) .Bind(to: Indicator.rx_Text()) .DisposeBag(bag: this.disposeBag); this._param.Dependency._reactor.state .Select(state => state.Message) .Bind(to: MessageIndicator.rx_Text()) .DisposeBag(bag: this.disposeBag); }
public MessageIndicator CreateMessageIndicator() { var indicator = new MessageIndicator { Reference = $"ID-REX-{Helper.RandomNumber(12)}", IsEnded = false, DateCreated = DateTime.Now, DateModified = DateTime.Now, }; _context.MessageIndicators.Add(indicator); Save(); return(indicator); }