Posts Tagged ‘Microsoft Surface’

DavisTUI: Progress Report 5

December 12th, 2009

While running the newest version of our prototype, I ran into some unexpected difficulties. Whenever I touched a Word object to see the associated artwork thumbnails, the application would halt with an Operation Exception. After some investigation, I realized that the thumbnail images in each grid were previously assigned as logical children of the grid generated from previous contact with the same Word object.

I had designed the Word class to generate, remove, and regenerate a grid for each contact up and contact down event on a Word object. I couldn’t find a simple way to logically disconnect the thumbnail images from each grid after each Contact Up.

I later realized that the getImage() function in our Art class simply returned the image instance variable generated with the Art object. So, I revised the getImage() function to return a new Image object generated from the thumbnail image file.

The new method:

public Image getImage()
{
Image image = new Image();
String path = "Resources\\" + imgFile;
image.Source = new BitmapImage(new Uri(path, UriKind.Relative));
return image;
}

Afterwards, I:

  • Continued to finesse the look and feel of the grids populated form the Word objects,
  • Removed canned data and got the surface to display working results for my parsing of the Artworks.xml file,
  • Wrote event handlers that would display the associated for the “Movement” and “Medium” tags,
  • Got screen to display working results for tag event handlers from my parsing of my Collections.xml file.

I still had some problems to solve regarding each token’s tag event handlers. Previously, when a “Movement” or “Medium” token was placed on the surface, all of the items were cleared from the screen, including any Art and Panel objects that were generated. In the intended version of our application, only the Word objects populated on the native screen would be replaced by the Word objects associated with “Movement” or “Medium”.

The solution was a RemoveWord() function that removed each Word object’s ScatterViewItem from the main ScatterView, which was kept track of in a List structure of ScatterViewItems.

private void RemoveWords()
{
foreach (ScatterViewItem svi in sviList) {scatter.Items.Remove(svi);}
}

Given the high volume of programming that had to be done in 3 weeks, Lia and I can both agree that this project provided a valuable opportunity to practice our programming logic and modularize the problems at hand. Although we often worked on separate tasks, we found it necessary to communicate with each other about our programming problems and put our minds together to solve them.

Our desire to enhance the way people see and interact with the world, aided by our tenacity to make it happen, has allowed us to produce this final functional prototype of DavisTUI:

DavisTUI: Progress Report 3

November 30th, 2009
Native screen of our DavisTUI application

Native screen of our DavisTUI application

With regards to the Word objects, which are essentially ScatterViewItems displayed on the native screen, I finally decided to display each word (e.g. “Baroque”, “Renaissance”) using a String datatype, rather than a SurfaceButton or Label data structure. This design choice was made primarily because String datatype was the simplest to implement and sufficient for our purposes. Although conveniently equipped with contact event handlers, the priorly used SurfaceButton data structure had a toggle-like appearance on contact and consequently could not be moved across the ScatterView. Labels were also more complex than Strings than required for the purposes of our Word object.

The grid of thumbnails appears when the user makes contact with a Word object.

Thumbnails appears when the user touches a Word object.

From there, I implemented the Contact Down event handler for the Word object, which gives the appearance of generating a selection of artworks about which to learn more. Rather, the event handler replaces the String in the ScatterView Item with a Grid object. The grid is populated with the word originally presented in the form of a String and, additionally, with the thumbnails of related artwork surrounding the word. For the purposes of the prototype demonstration to take place tomorrow in class, I used canned images for each of the thumbnails.

Towards enhancing the look and feel of our application, I also found a great background — a beautiful blue and black gradient that is darker along the edges. I am happy to report that, at this point, we have achieved high fidelity in the of the look and feel of our native screen!

DavisTUI: Progress Report 2

November 24th, 2009

As I set back to work on the SurfaceWindow1 file, I debated whether I should use Labels or SurfaceButtons to display the content of each Word object. I decided to use SurfaceButtons, because I knew I could rely on there being built-in the Contact Down, Changed, and Up events.

I also contemplated what the best way to populate thumbnails around each Word would be. Playing around with each of the built-in Microsoft Surface applications, I finally discovered Element Menus, which had a sleek and sexy look and feel. Unfortunately, I wasn’t able to figure out how customize each menu in a way that was helpful to our project, so I instead decided to use Grid objects to display the appropriate artwork thumbnails surrounding each word.

I had some difficulty making the Grid object appear. I ran many tests on the Grid generating function, as well as the event handler for Contact Down. At some point, I could make the cell dividers from inside the Grids appear independently. But I eventually realized that the issue was with updating the width and height of the ScatterViewItem containing the Grid to those of the Grid itself.