private void Populate(ItemModelBase model, ItemModelBase selectionModel = null, bool setParent = true) { selectedId = 0; if (setParent) { currentVariation = model.ParentId; if (selectionModel != null) { parent = selectionModel.Id; } else { parent = model.Id; iconView.IconName = "REMOVED.BMP"; } } iconView.ClearAdapter(); IconViewAdapter <ItemModelBase> adapter = new IconViewAdapter <ItemModelBase>(model, selectionModel); if (selectionModel != null) { adapter.HasSelections = true; adapter.Subselectable = true; iconView.Clickable = false; } else { iconView.Clickable = true; } iconView.Adapter = adapter; }
private void Populate(IngredientsModel model) { iconView.ClearAdapter(); IconViewAdapter <IngredientsModelBase> adapter = new IconViewAdapter <IngredientsModelBase>(model, null); iconView.Adapter = adapter; }
private void Populate(ItemModelBase model, ItemModelBase selectionModel = null, bool setParent = true) { selectedId = 0; if (setParent) { if (selectionModel != null) { parent = selectionModel.Id; } else { parent = model.Id; if (level == 1) { iconView.IconName = "REMOVED.BMP"; } } } iconView.ClearAdapter(); IconViewAdapter <ItemModelBase> adapter = new IconViewAdapter <ItemModelBase>(model, selectionModel); if (selectionModel != null) { adapter.HasSelections = true; adapter.Subselectable = true; iconView.Clickable = false; } else { iconView.Clickable = true; } details.DisableGroup(); details.DisablePortions(); iconView.Adapter = adapter; }