public void TestInitialize()
        {
            _module = new ModuleViewModel(new Module());
            ProductViewModel itemViewModel1 = new ProductViewModel(new Product()
            {
                ID = 1, Description = "TEST",
            });
            ProductViewModel itemViewModel2 = new ProductViewModel(new Product()
            {
                ID = 2, Description = "TEST2"
            });

            _module.Add(itemViewModel1);
            _module.Add(itemViewModel2);

            _block = new BlockViewModel(new Block());
            _block.Add(_module);
            _items = new ObservableCollection <ItemViewModel>();

            _hierarchyDataGrid = new HierarchyDataGrid(_items);
        }
Пример #2
0
        public void TestInitialize()
        {
            ProductViewModel product1 = new ProductViewModel(new Model.Product());
            ProductViewModel product2 = new ProductViewModel(new Model.Product());
            ModuleViewModel  module   = new ModuleViewModel(new Model.Module());

            module.Add(product1);
            module.Add(product2);

            HierarchyDataGrid hierarchyDataGrid = new HierarchyDataGrid(new ObservableCollection <ItemViewModel>());

            hierarchyDataGrid.Add(module);
            _dataGridItemModule = hierarchyDataGrid.DataGridItems[0];
            hierarchyDataGrid.Remove(module);

            BlockViewModel block = new BlockViewModel(new Model.Block());

            block.Add(module);
            hierarchyDataGrid.Add(block);

            _dataGridItemBlock = hierarchyDataGrid.DataGridItems[0];
        }