//Read and display the data from internal source public List <string> getData() { //Read the unfiltered options from data, then filter and store List <RegOption[]> avalibleOptions = getOptions(); //Read location data and create object array of each avalible choice List <RegLocation> locationList = new List <RegLocation>(); foreach (string[] array in InternalData.locationData) { //Select the correct set of options for the machine RegOption[] options = allOptionsSearch(avalibleOptions, array[0]); RegLocation loc = new RegLocation(array, options); locationList.Add(loc); } this.locations = locationList.ToArray(); //Return list of each avalible location List <string> avalibleLocations = new List <string>(); foreach (RegLocation loc in locationList) { string output = loc.locationName; avalibleLocations.Add(output); } return(avalibleLocations); }
//Update the window based on the location selected public List <string> updateWindow(string locString) { RegLocation loc = searchLocations(locString); this.selectedLoc = loc; List <string> avalibleOptions = new List <string>(); //Write the avalible options to option combobox foreach (RegOption opt in loc.options) { string output = opt.optionName; avalibleOptions.Add(output); } return(avalibleOptions); }