Exemplo n.º 1
0
        public MenuViewModel(IMenuRegistry registry)
        {
            IMenuContainer container = registry.Register("Product Catalog").ToContainer();
            IMenuContainer menuContainer = container.Register("Menu Item").ToContainer();
            menuContainer.Register("MenuItem2").ToScreen<TestScreen>();
            menuContainer.Register("MenuItem2").ToScreen<TestScreen2>();

            Menus = new ObservableCollection<MenuItemViewModel>();

            new ObservableCollectionSynchronizer<IMenuItem, MenuItemViewModel>(registry, Menus,
                                                                               (x) => new MenuItemViewModel(x));
        }
Exemplo n.º 2
0
        public MenuViewModel(IMenuRegistry registry)
        {
            IMenuContainer container     = registry.Register("Product Catalog").ToContainer();
            IMenuContainer menuContainer = container.Register("Menu Item").ToContainer();

            menuContainer.Register("MenuItem2").ToScreen <TestScreen>();
            menuContainer.Register("MenuItem2").ToScreen <TestScreen2>();

            Menus = new ObservableCollection <MenuItemViewModel>();

            new ObservableCollectionSynchronizer <IMenuItem, MenuItemViewModel>(registry, Menus,
                                                                                (x) => new MenuItemViewModel(x));
        }
 public void Start()
 {
     _menuRegistry.Register(this);
 }
Exemplo n.º 4
0
 public void Initialize()
 {
     _container.Configure(x => x.AddRegistry(new ProcurementRegistry()));
     _registry.Register("Procurement").ToScreen <PurchaseOrderScreen>();
 }