コード例 #1
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            ContentControl contentArea = Helper.GetAncestorOfType <ContentControl>(this);

            if (contentArea != null)
            {
                this.Width  = contentArea.Width;
                this.Height = contentArea.Height;
            }

            AuctionTimer timer = new AuctionTimer();
        }
コード例 #2
0
        internal void AuctionControlClicked(AuctionControl auctionControl)
        {
            auctions = DB.LoadAuctions();
            Auction auction = auctions.Find(x => x.Id == auctionControl.AuctionId);

            ContentControl contentArea = Helper.GetAncestorOfType <ContentControl>(this);

            if (contentArea != null)
            {
                contentArea.Content = new FullAuctionControl(auction);
                if (auction.isExpired)
                {
                    AuctionTimer.DisableAuction(auction.Id);
                }
            }
        }