コード例 #1
0
    public MouthCellButtonViewModel CreateAndSetUpMouthCellButtonViewModel()
    {
        if (mouthCellButtonViewModel != null)
        {
            return(mouthCellButtonViewModel);
        }

        mouthCellButtonViewModel = new MouthCellButtonViewModel();
        mouthCellButtonViewModel.ButtonClickStream.Subscribe(selectionIntent.OnNext);

        return(mouthCellButtonViewModel);
    }
コード例 #2
0
 public void SetViewModel(MouthCellButtonViewModel viewModel)
 {
     disposeBag.ClearDisposables();
     this.viewModel = viewModel;
     disposeBag.AddDisposable(cellButton.OnClickAsObservable().Subscribe(viewModel.ButtonClickObserver));
 }