예제 #1
0
    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();
    }
예제 #2
0
 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);
     }
 }
예제 #3
0
    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();
    }
예제 #4
0
 public string getName(symptom part)
 {
     //TODO: Check for missing translation
     return(symptomTrans[(int)currentLanguage, (int)part]);
 }