コード例 #1
0
ファイル: CartActivity.cs プロジェクト: Norby125/HotDog
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here

            SetContentView(Resource.Layout.CartView);

            _cartDataService      = new CartDataService();
            _cartListView         = FindViewById <ListView>(Resource.Id.cartListView);
            _cartItems            = _cartDataService.GetCart().CartItems;
            _cartListView.Adapter = new CartAdapter(this, _cartItems);
        }
コード例 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.CartView);

            cartDataService = new CartDataService();

            cartListView = FindViewById <ListView>(Resource.Id.cartListView);

            var orderButton = FindViewById <Button>(Resource.Id.placeOrderButton);

            orderButton.Click += OrderButton_Click;

            cartItems            = cartDataService.GetCart().CartItems;
            cartListView.Adapter = new CartAdapter(this, cartItems);
        }
コード例 #3
0
        public CartViewPage()
        {
            InitializeComponent();

            cartDataService = new CartDataService();
            Items           = new ObservableCollection <Models.CartItem>();

            MyListView.ItemsSource = cartDataService.GetCart().CartItems;

            MyListView.HasUnevenRows = true;

            TotalLabel.Text = cartDataService.GetCartTotal().ToString("C2");

            CheckoutButton.Clicked += CheckoutButton_Clicked;

            ContinueOrderingButton.Clicked += ContinueOrderingButton_Clicked;
        }
コード例 #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.CartView);

            cartDataService = new CartDataService();

            FindViews();

            cartItems            = cartDataService.GetCart().CartItems;
            cartListView.Adapter = new CartAdapter(this, cartItems);

            BindData();

            HandleEvents();
        }
コード例 #5
0
 public CartDataSource()
 {
     cartDataService = new CartDataService();
     cartItems       = cartDataService.GetCart().CartItems;
 }
コード例 #6
0
ファイル: CartViewModel.cs プロジェクト: TarikBeg/TestAppUno
 private void InitializeData()
 {
     CartItems = CartDataService.GetCart().CartItems.ToObservableCollection();
 }