public override void Load(Dictionary<string, string> parameters) { base.Load(parameters); this.Title = parameters.ContainsKey(CAR_NAME) ? parameters[CAR_NAME] : NO_CAR; this.BackButton = new iFactr.Core.Controls.Button(BACK, CAR_LIST); if (iApp.Session.ContainsKey(CAR)) { Car car = iApp.Session[CAR] as Car; iApp.Session.Remove(CAR); var menu = new iMenu(); menu.Add(new iItem { Text = car.Name, Subtext = car.VehicleClass.ToString()}); this.Items.Add(menu); } }
public override void Load(System.Collections.Generic.Dictionary<string, string> parameters) { this.Title = parameters.ContainsKey ("CatName") ? parameters ["CatName"] : "No Cat"; this.BackButton = new iFactr.Core.Controls.Button ("Back", "CatList"); if (iApp.Session.ContainsKey("Cat")) { Cat cat = iApp.Session ["Cat"] as Cat; iApp.Session.Remove ("Cat"); var menu = new iMenu (); menu.Add (new iItem { Text = cat.Name, Subtext = cat.Breed.ToString()}); this.Items.Add (menu); } }