예제 #1
0
		public WorkOnJobsMenu()
		{
			this.title = "Work On Jobs";

			menuItems = new MenuItem[2];
			menuItems[0] = new MenuItem(new MenuItem.MenuAction(workOnAJob), "Work on a job");
			menuItems[1] = new MenuItem(new MenuItem.MenuAction(completeAJob), "Complete a job");
		}
예제 #2
0
		public CreateJobMenu()
		{
			this.title = "Create New Job";

			menuItems = new MenuItem[5];
			menuItems[0] = new MenuItem(new MenuItem.MenuAction(createOilChange), "Oil change");
			menuItems[1] = new MenuItem(new MenuItem.MenuAction(createRadFlush), "Radiator flush");
			menuItems[2] = new MenuItem(new MenuItem.MenuAction(createValveAdjustment), "Valve adjustment");
			menuItems[3] = new MenuItem(new MenuItem.MenuAction(createTranmsissionReplacement), "Transmission replacement");
			menuItems[4] = new MenuItem(new MenuItem.MenuAction(createUnknownProblemJob), "Create unknown problem job");
		}
예제 #3
0
		public MainMenu()
		{
			this.title = "Main Menu";

			// Create an array of menu items for this main menu.

			menuItems = new MenuItem[3]; // ERROR: Array was initialized too small.

			menuItems[0] = new MenuItem(new MenuItem.MenuAction(createJob), "Create job");
			menuItems[1] = new MenuItem(new MenuItem.MenuAction(workOnJob), "Work on a job");
			menuItems[2] = new MenuItem(new MenuItem.MenuAction(viewJobsInProgress), "View jobs in progress");
		}
예제 #4
0
		public JobListMenu(string title, VehicleMaintJobs jobs)
		{
			this.title = title;

			if (jobs != null && jobs.Count > 0)
			{
				menuItems = new MenuItem[jobs.Count];

				for (int i = 0; i < jobs.Count; ++i)
				{
					menuItems[i] = new MenuItem(null, jobs[i].ToString());
				}
			}
		}