コード例 #1
0
        private void editAuction()
        {
            SellView edit = new SellView {
                DataContext = new SellViewModel(this.CurrentAuction)
            };

            edit.ShowDialog();
            this.refreshCurrAuction();
        }
コード例 #2
0
        private void newAuction()
        {
            SellView sell = new SellView {
                DataContext = new SellViewModel(new Auction())
            };

            sell.ShowDialog();
            this.loadAuctions();
        }
コード例 #3
0
        void SellExecute()
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking
            //Update auctionlist
            this.Auctions = new ObservableCollection <AuctionViewModel>();
            foreach (var auction in this._auctionService.GetAll())
            {
                auctions.Add(new AuctionViewModel(auction));
            }
        }
コード例 #4
0
        private void ShowSellViewExecute()
        {
            var sellView = new SellView();

            sellView.ShowDialog();
            var allAuctions = auctionService.GetAll();
            var newAuctions = allAuctions.Where(a => auctions.All(vm => vm.Auction != a));

            foreach (var auction in newAuctions)
            {
                var auctionVm = new AuctionViewModel(auction);
                auctions.Add(auctionVm);
            }
        }
コード例 #5
0
        private void AddNewAuctionAction()
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking

            // Find & add new auction
            var allAuctions = this.auctionService.GetAll().ToList();
            var newAuctions = allAuctions.Where(a => this.auctions.All(vm => vm.Auction != a));

            foreach (var auction in newAuctions)
            {
                var auctionVm = new AuctionViewModel(auction);
                this.auctions.Add(auctionVm);
            }
        }
コード例 #6
0
        private void SellButtonClick(object sender, RoutedEventArgs e)
        {
            var sellView = new SellView();

            sellView.ShowDialog(); // Blocking
        }