// Load SOP Titles for the add buttons on the button right void AddSOPTypes(DebrisFlowSOP sop) { List<string> titleList = sop.SOPTypes; // takes the list of data types from SOP and add it to the list foreach (string title in titleList) { sopTypes.Add(new SOPDisplay() { Title = title, Command = AddDialog }); } }
// load / initialize all the variables public DebrisFlowMapViewModel(MainMap map, DebrisFlowRecord debrisFlowRecord, DebrisFlowCollection debrisFlowCollection) { this.debrisFlowRecord = debrisFlowRecord; this.debrisFlowCollection = debrisFlowCollection; this.dialogCoordinator = new DialogCoordinator(); //set up map controller mapController = new MapController(map); mapController.LocationChanged += OnLocationChanged; //Set up SOP var debrisflowsop = new DebrisFlowSOP(); this.sop = debrisflowsop.GetSOP(); this.sopDisplay = new SOPDisplay(); AddSOPTypes(debrisflowsop); SetUpSOPLocation(sop); }