コード例 #1
0
        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (resultCode == Result.Ok && requestCode == 100)
            {
                var selectedDeal = dealDataService.GetDealById(data.GetIntExtra("selectedDealId", 0));

                var dialog = new AlertDialog.Builder(this);
                dialog.SetTitle("Confirmation");
                dialog.SetMessage(string.Format("You've added {0} time(s) the {1}", data.GetIntExtra("amount", 0), selectedDeal.Name));
                dialog.Show();
            }
        }
コード例 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.DealDetailView);


            //early demos
            DealDataService dataService = new DealDataService();


            var selectedDealId = Intent.Extras.GetInt("selectedDealId");

            selectedDeal = dataService.GetDealById(selectedDealId);

            // Create your application here

            FindViews();
            BindData();
            HandleEvents();
        }