Xbox 360 Retail Store Inventory Monitor #1

This post is the first in a series about my application for finding the very rare Xbox 360 on retail store shelves in the United States.  It uses all three of the core WinFX technologies and demonstrates

  • how the Windows Presentation Foundation can be used to have a visceral impact on the user
  • how the Windows Communication Foundation can be used to incorporate data from diverse sources, homogenizing them
  • how the Windows Workflow Foundation can be used to synthesize the several components of a solution


A similar application, using the .NET Framework 2.0, but not WinFX, was released on in January 2006.  Here is screenshot of that application:


It examines the Web sites of the United States national electronic retailers, Best Buy and Circuit City, and Canada’s Future Shop, to determine whether their stores in the region identified by a given postal code have Xbox 360s available for sale.  The ingenuity of the application is in treating the retailer’s sites as if they are Web services: applications that make information available for automated retrieval via Internet protocols.  Because the sites were not designed as Web services, they are awkward to use as services: the application has to navigate its way through the sites with a sequence of HTTP POST commands, and must parse the HTML of the sites to determine whether stock is available. 


The only shortcoming of the application for locating inventory of Xbox 360s is that it somewhat underestimates the magnitude of the Xbox 360 shortage.  It is not enough to try to find units in a given region.  If one really wants an Xbox 360, then one must search the entire country!  That is what my version does: it searches for Xbox 360s at any Best Buy or Circuit City store in the United States.  Its real purpose, however, is to demonstrate the capabilities of WinFX. 


Here is a screenshot of my Xbox 360 inventory monitor:



Stores without inventory are listed in the top left of the sole window of the application, while stores with inventory are lower down on the left.  Selecting any store in either list will cause a map to be displayed in the lower part of the screen showing the area in which the selected store is located.  One can toggle between the map and an aerial photograph of the region.  A rotating three-dimensional cube with the Xbox logo is in the top right-hand corner and serves no purpose other than to have a visual impact on the user.  You will see that the cube is truly three-dimensional in the sense that, as it rotates, a light source that is above and to the right in front of the cube will periodically cause the metallic logo on the cube to glint.  


You can download my source code from this location.  The executable is \Xb0x360InventoryViewer\bin\debug\Xbox360InventoryViewer.exe.  It should just work on any English-US system that has an Internet connection and which has the February CTP release of WinFX and MSMQ properly installed.  If you have problems then check that the project for building the Xbox360InventoryViewer is referencing the right version of Crossbow, as explained here.  And whenever you build, don't just build, but instead rebuild, to work around an interesting quirk in how the Windows Presentation Foundation handles resources.  Also, to provide for a speedier demo, I have restricted the application to only searching for Xbox360s in 12 states.  You can have it search the entire U.S. by changing the value of the RegionLimit setting in Xbox360InventoryViewer.exe.config from 12 to 50. 


Subsequent posts in this series will walk you through the code, which is the interesting part. 

Comments (12)
  1. n00b says:

    Very cool, I stumbled upon this when searching for the query which would return Xbox 360 availability info for a given zip code. How did you get the sku and productidentifier information? Was this discoverable from Best Buy’s website, or was this just information that was passed along?

    Just curious because I can’t even figure out how to find out the Xbox 360 availability from the Best Buy website. Unlike other products where they present a link to check availability, they just send you to some page where they explain that the 360 is in short supply. Annoying.

    Anyway, I’m still on the hunt for a 360 myself, so I just broke out the BestBuyInventoryChecker and CircuitCityInventoryChecker parts of your code to make a little command-line app for myself. It’s nice for familiarizing myself with C# net code, I’m more of a dabbler with it and used to scripting languages. As long as I can’t play any games, I’d like to see about maybe turning it into a gadget or Yahoo widget. 🙂

    Thanks for the great write-ups!

    PS. Thankfully the site didn’t complain about it (so it’s probably not even needed), but I noticed an typo in the BestBuyInventoryChecker.cs. Line 102, "Refrerer" should obviously be "Referer".

  2. untitled says:

    Awsome man! I’m glad my app inspired you to code this. I’m also messing with WinFX – Nice work 😉

  3. untitled, it is MAJOR relief to me that you are cool with this demo, which is intended as a tribute riffing on your work.  Your app crackled like lightning through building 18 on the Microsoft campus, and I personally know two people for whom you helped to find Xbox 360s!  You ROCK!

  4. UJ says:

    Hi Craig, The zip file I downloaded is not working. I am using Winzip to open it. Any suggestions. Thanks UJ

  5. Jap says:

    it works??

  6. Noel says:

    how come im not recieving text messages or email?

  7. Richard says:

    This thing doesn’t work.  It came back with a list of BestBuy stores in my area and said it was in stock for all of them.  Surprise!  All of them don’t have any.

  8. So, everybody out there probably saw this XBox 360 tracker application from …

  9. Have you been looking at this WinFX thing and scratching your head when envisioning how to us it all…

  10. My other life is gaming – so I was rather pleased to see an opportunity to think about gaming while working….

Comments are closed.

Skip to main content