Ejemplo n.º 1
0
        private void SellButtonClick(object sender, RoutedEventArgs e)
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking
            //Update auctionlist
            this.Auctions = new ObservableCollection <Auction>(_auctionService.GetAll());
        }
Ejemplo n.º 2
0
        // Add-New-Auction Click Event Handler
        // Hier soll Add-New-Auction View geöffent werden
        private void NewAuctionBtn_Click(object sender, RoutedEventArgs e)
        {
            var addAuctionView = new SellView();

            addAuctionView.ShowDialog();

            // Update View
            var allAuctionsFromService = this.auctionService.GetAll();

            this.Auctions = new ObservableCollection <Auction>(allAuctionsFromService);
        }
        private void AddNewAuctionButtonClick(object sender, RoutedEventArgs e)
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking

            var allAuctionsFromService = this.auctionService.GetAll();

            /* Option A: Full Update via INotifyPropertyChanged, not performant */
            /* ================================================================ */
            this.Auctions = new ObservableCollection <Auction>(allAuctionsFromService);

            /////* Option B: Let WPF only update the List and detect the additions */
            /////* =============================================================== */
            ////var toAdd = allAuctionsFromService.Where(a => !this.auctions.Contains(a));
            ////foreach (var auction in toAdd)
            ////{
            ////    this.auctions.Add(auction);
            ////}
        }
Ejemplo n.º 4
0
        private void SellButtonClick(object sender, RoutedEventArgs e)
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking
        }
Ejemplo n.º 5
0
 public void OpenSellView(object sender, RoutedEventArgs e)
 {
     var sellView = new SellView(this.Auctions);
     sellView.ShowDialog();
 }
Ejemplo n.º 6
0
        private void NewAuction_Click(object sender, RoutedEventArgs e)
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking
        }