コード例 #1
0
        protected override void InitFromBundle(IMvxBundle bundle)
        {
            // TODO get and cast incomming bundle to the parameter passed from FirstViewModel
            // details here
            // https://github.com/MvvmCross/MvvmCross/wiki/ViewModel--to-ViewModel-navigation
            string id = bundle.Data["id"];

            _books.GetById(id, result => Book = result ,error => { });

            base.InitFromBundle(bundle);
        }
コード例 #2
0
 protected override void InitFromBundle(IMvxBundle parameters)
 {
     // TODO get and cast incomming bundle to the parameter passed from FirstViewModel
     // details here
     // https://github.com/MvvmCross/MvvmCross/wiki/ViewModel--to-ViewModel-navigation
     base.InitFromBundle(parameters);
     if (parameters.Data.ContainsKey("BookId"))
     {
         string id = parameters.Data["BookId"];
         _books.GetBookDetails(id,result => Book = result,error => {});
     }
 }
コード例 #3
0
        protected override void InitFromBundle(IMvxBundle parameters)
        {
            // TODO get and cast incomming bundle to the parameter passed from FirstViewModel
            // details here
            // https://github.com/MvvmCross/MvvmCross/wiki/ViewModel--to-ViewModel-navigation

            base.InitFromBundle(parameters);

            BookId = parameters.Data["id"];
            _books.GetBookItem(BookId,
                result => Result = result,
                error => { });
        }
コード例 #4
0
 private void Update(string id)
 {
     _books.SelectAsync(id,
         result => Info = result,
         error => { });
 }
コード例 #5
0
 private void showDetails(BookSearchItem item)
 {
     ShowViewModel<DetailsViewModel>(new {id = item.id }); // pass "reference to the book" here
 }