public void SetHazardList(HazardList list) { AddMoreHazards.Children.Clear(); foreach (HazardAccordionView hazard in list.Hazards) { AddMoreHazards.Children.Add(new HazardView(hazard)); } }
public HazardList GetHazardList() { HazardList list = new HazardList(); for (int i = 0; i < AddMoreHazards.Children.Count; i++) { HazardView view = (HazardView)AddMoreHazards.Children.ElementAt(i); list.Hazards.Add(view.GetHazard()); } return(list); }