コード例 #1
0
 public ClothesController(
     IClothesService clothes,
     UserManager <User> userManager)
 {
     this.clothes     = clothes;
     this.userManager = userManager;
 }
コード例 #2
0
 public ClothesController(IClothesService clothes, IWebHostEnvironment enviroments, IAsyncRepository <Clothes> clothesStore, IAsyncRepository <Brand> brands, IAsyncRepository <Size> sizes, IAsyncRepository <ClothesMark> marks, ISizeMarksService sizesService)
 {
     _clothes      = clothes;
     _enviroments  = enviroments;
     _clothesStore = clothesStore;
     _brands       = brands;
     _sizes        = sizes;
     _marks        = marks;
     _sizesService = sizesService;
 }
コード例 #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            SetContentView(Resource.Layout.Main);
            base.OnCreate(savedInstanceState);

            _clothesService = new ClothesService(_filesystem);

            _clothesItems         = _clothesService.GetAll().ToCT1ItemList();
            _filteredClothesItems = new List <CT1Item> ();

            _listView         = FindViewById <ListView> (Resource.Id.accountList);
            _listView.Adapter = new CT1TextAdapter(this, _clothesItems);
            _listView.DescendantFocusability = DescendantFocusability.AfterDescendants;

            var sb = FindViewById <SearchView> (Resource.Id.searchView);

            sb.QueryTextChange += (s, e) => {
                string text = e.NewText.ToLower();
                _filteredClothesItems = _clothesItems.Where(ac => ac.Name.ToLower().Contains(text)).ToList();
                (_listView.Adapter as CT1TextAdapter).Update(_filteredClothesItems);
            };

            sb.SetQueryHint(Resources.GetText(Resource.String.search_text));

            var toolbar = FindViewById <Toolbar> (Resource.Id.toolbar);

            toolbar.SetNavigationIcon(Resource.Mipmap.back);
            SetActionBar(toolbar);

            toolbar.NavigationOnClick += (s, e) => GoBack(s, e);

            var title = (TextView)toolbar.FindViewById(Resource.Id.toolbar_title);

            title.Text = _brandService.Get(AppSettings.SelectedBrandId).Name;

            _listView.RequestFocus();
        }
コード例 #4
0
 public ClothesController(IClothesService clothesService)
 {
     _clothesService = clothesService;
 }
コード例 #5
0
 public HomeController(ILogger <HomeController> logger, ITopClothesService topService, IClothesService clothes)
 {
     _logger     = logger;
     _topService = topService;
     _clothes    = clothes;
 }
コード例 #6
0
 public ClothesVC(IntPtr handle) : base(handle)
 {
     _clothesService       = new ClothesService(new IosFileSystem());
     _clothesItems         = _clothesService.GetAll();
     _filteredClothesItems = new List <ClothesItem>();
 }
コード例 #7
0
 public HomeController(ApplicationDbContext dbContext, ApplicationUserManager userManager, IClothesService clothesService)
 {
     this.dbContext      = dbContext;
     this.userManager    = userManager;
     this.clothesService = clothesService;
 }
コード例 #8
0
 public ClothesController(IClothesService service)
 {
     _service = service;
 }