Developing User Interfaces
CMSC 498B
Spring 2005
Prof. Ben Bederson
Project #3
Due April 7, 2005


Purpose

The purpose of this program is to develop an understanding of internationalization and threaded GUI program structure.

The Problem

You must create an internationalized version of an application that fetches search results from Google and performs that search in a background thread that allows the application GUI to continue to function while the search is being performed.  In addition, the GUI must be updated as the data comes in.  Essentially, you are building a dedicated search application.  There are two conceptual parts of this application - the internationalized GUI, and the threaded searching.

For the GUI part, you can design the application as you choose, but it must have at least the following elements:

For the threaded searching part:

Hints

private void button1_Click(object sender, System.EventArgs e) {
    Google.GoogleSearchResult result;

    Google.GoogleSearchService search = new Google.GoogleSearchService();
    result = search.doGoogleSearch(keyBox.Text, searchBox.Text, 0, 10, true, "", true, "", "", "");
    Google.ResultElement[] elements = result.resultElements;
    string[] resultStrings = new string[elements.Length];
    int i = 0;
    foreach (Google.ResultElement element in elements) {
        resultStrings[i++] = element.URL + element.snippet;
    }
    resultsBox.Lines = resultStrings;

    search.BegindoGoogleSearch(keyBox.Text, searchBox.Text, 0, 10, true, "", true, "", "", "", new AsyncCallback(Callback), search);
}

void Callback(IAsyncResult syncResult) {
    Google.GoogleSearchService search = (Google.GoogleSearchService)syncResult.AsyncState;
    Google.GoogleSearchResult result = search.EnddoGoogleSearch(syncResult);
    Console.WriteLine(result.resultElements.Length);
}

Submitting

Submit following the same rules as Project #2, but make the subject line of your email contain "DUI: Proj #3 submission".  As before, any submissions after the deadline will be ignored.  If multiple submissions are made, then only the last one before the deadline will be looked at.

The zip file you submit must contain all files within a directory named "proj3-<name>.zip" where you replace <name> with your last name.