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(); }
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(); }
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); } }