//Choose your Type and go to the NewTherapyPanel public void ChooseType(int typeIndex) { therapieTyp = (TherapieTyp)typeIndex; therapieTypCanvas.SetActive(false); therapieNeuCanvas.SetActive(true); Reset(); ShowActiveImage(); if (therapieTyp == TherapieTyp.MEDIKAMENT) { imageNextColor.gameObject.SetActive(true); imagePreviousColor.gameObject.SetActive(true); imageNextImage.gameObject.SetActive(true); imagePreviousImage.gameObject.SetActive(true); ShowActiveColor(); } }
public void EditTherapie(Therapie _therapie) { Reset(); therapieName = _therapie.Name; inputName.text = therapieName; times = _therapie.Times; _therapie.Weekdays.CopyTo(weekdays, 0); for (int i = 0; i < 7; i++) { tgWeekDays[i].isOn = weekdays[i]; } if (_therapie is Medikament) { therapieTyp = TherapieTyp.MEDIKAMENT; Medikament medi = (_therapie as Medikament); counts = medi.Counts; imageIndex = medi.ImageIndex; FindColorIndex(medi.Color); ShowActiveColor(); manager.TherapiePlan.RemoveMedikament(medi); } else if (_therapie is Inhalation) { therapieTyp = TherapieTyp.INHALATION; Inhalation inha = (_therapie as Inhalation); durations = inha.Durations; manager.TherapiePlan.RemoveInhalation(inha); } else { therapieTyp = TherapieTyp.PHYSIOTHERAPIE; manager.TherapiePlan.RemovePhysiotherapie(_therapie as Physiotherapie); } ShowActiveImage(); therapiePlanCanvas.SetActive(false); therapieNeuCanvas.SetActive(true); timesListPanel.UpdateList(times, counts, durations); therapiePanel.UpdateList(manager.TherapiePlan.Therapien); manager.needsToSave = true; }