protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
             SetContentView(Resource.Layout.activity_b);
            scrollView = (ScrollView)FindViewById<ScrollView>(Resource.Id.tools_scrlllview);
            shopAdapter = new ShopAdapter(SupportFragmentManager);
            inflater = LayoutInflater.From(this);
            ShowToolsView();
            InitPager();
        }
예제 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_b);
            scrollView  = (ScrollView)FindViewById <ScrollView>(Resource.Id.tools_scrlllview);
            shopAdapter = new ShopAdapter(SupportFragmentManager);
            inflater    = LayoutInflater.From(this);
            ShowToolsView();
            InitPager();
        }
예제 #3
0
        static void Main(string[] args)
        {
            // dependency injection
            var warehouse = new FoodWarehouse(new BaseWarehouse());

            warehouse.AddProduct(new Food("ADGDGDAREQ", "Abc", 53));
            warehouse.AddProduct(new Food("AAA", "AAA", 40));
            warehouse.PrintProducts();

            // adapter
            Shop       store        = new Shop();
            IWarehouse storeAdapter = new ShopAdapter(store);

            storeAdapter.AddProduct(new Food("FADF", "EEE", 3441));
            storeAdapter.PrintProducts();

            // iterator
            foreach (var element in warehouse)
            {
                Console.WriteLine(element);
            }
        }