public void remove(bodyPart part, symptom sym) { List <symptom> tempList = new List <symptom> (); if (symptomsList.TryGetValue(part, out tempList)) { if (tempList.Contains(sym)) { symptomsList.Remove(part); tempList.Remove(sym); if (tempList.Count != 0) { symptomsList.Add(part, tempList); } } } //else should be an error refresh(); }
public void toggleSymptom(symptom sym) { //Toggle symptom in symptom list if (!selectedSymptoms.Contains(sym)) { selectedSymptoms.Add(sym); lManag.lightActivate(currentPart); textManager.add(currentPart, sym); } else { selectedSymptoms.Remove(sym); if (selectedSymptoms.Count == 0) { lManag.lightDeactivate(currentPart); } textManager.remove(currentPart, sym); } }
public void add(bodyPart part, symptom sym) { List <symptom> tempList = new List <symptom> (); if (symptomsList.TryGetValue(part, out tempList)) { if (!tempList.Contains(sym)) { symptomsList.Remove(part); tempList.Add(sym); symptomsList.Add(part, tempList); } } else { tempList = new List <symptom>() { sym }; symptomsList.Add(part, tempList); } refresh(); }
public string getName(symptom part) { //TODO: Check for missing translation return(symptomTrans[(int)currentLanguage, (int)part]); }