//------------- metods------------------------------ public AllDataAppRepository() { clients = new ObservableCollection<Client>(); clients.Add(new Client() {Cash = 100m, IsCalculate = true, IsShowList = true, IsLearning = false, Name = "TestClient1"}); // products = myArticlesRepository.GenerSomeOfProducts(imagePath); _articlesFromDatabase = new ArticlesFromDatabase(imagePath); products = myArticlesRepository.GenerSomeOfProductsDB(imagePath, _articlesFromDatabase.ArticleDB); articles = new ObservableCollection<Article>(); productsForShoping = myArticlesRepository.SetToShoping(imagePath); MyDragDropData = new DragDropData(products); }
public PlaceWindow(StarWindow startWindow) { InitializeComponent(); brushcolor = AllArticles.BorderBrush; //zdarzena obslugujace dodawanie elementow do list ((INotifyCollectionChanged) lbDesk1.Items).CollectionChanged += lbDesk1_CollectionChanged; ((INotifyCollectionChanged)lbDesk2.Items).CollectionChanged += lbDesk2_CollectionChanged; ((INotifyCollectionChanged)lbDesk3.Items).CollectionChanged += lbDesk3_CollectionChanged; ((INotifyCollectionChanged)lbDesk4.Items).CollectionChanged += lbDesk4_CollectionChanged; this.startWindow = startWindow; articleDragDrop=startWindow.DataRepoAll.MyDragDropData; DataContext = articleDragDrop; }