private void InitializeFormWithData() { _inventoryPresenter = new InventoryPresenter(new InventoryServices()); IEnumerable <Almacenes> almacenes = _inventoryPresenter.GetAllAlmacenes(); almacenComboBox.ItemsSource = almacenes.ToList(); almacenComboBox.SelectedIndex = 0; productosAlmacenGrid.ItemsSource = productoAlmacenList; }
public MainWindowPresenter() { _repo = new ZoneRepo(); _inventory = new Inventory.Inventory(10); _inventoryPresenter = new InventoryPresenter(_inventory); _viewmodel = new MainWindowViewModel() { OpenItemsListCommand = new DelegateCommand(OpenItemsListAction) }; _view = new MainWindowView() { DataContext = _viewmodel, Inventory = { Content = _inventoryPresenter.ViewContent } }; }
public void Start() { _items = GetComponentInChildren <InventoryPresenter>(); _interface = GetComponentInChildren <PauseInterface>(); _presenter = GetComponentInChildren <PausePresenter>(); _settings = GetComponentInChildren <SettingsPresenter>(); _member = GetComponentInChildren <MemberStatPresenter>(); _equipment = GetComponentInChildren <EquipmentPresenter>(); _magic = GetComponentInChildren <MagicPresenter>(); _memberSelect = GetComponentInChildren <MemberSelectPresenter>(); _party = PartyManager.Instance; _controls = ControlManager.Instance; _inventory = InventoryManager.Instance; if (_interface == null) { DebugMessage("Could not find a Pause Interface in the children of " + gameObject.name + "!", LogLevel.Warning); } if (_presenter == null) { DebugMessage("Could not find a Pause Presenter in the children of " + gameObject.name + "!", LogLevel.Warning); } if (_settings == null) { DebugMessage("Could not find a Settings Presenter in the children of " + gameObject.name + "!", LogLevel.Warning); } if (_equipment == null) { DebugMessage("Could not find an Equipment Presenter in the children of " + gameObject.name + "!", LogLevel.Warning); } if (_magic == null) { DebugMessage("Could not find an Magic Presenter in the children of " + gameObject.name + "!", LogLevel.Warning); } }