public void openPatientFile(PatientDataFile dataFile) { if (dataFile.loadData()) { SavedMedicalStates states = dataFile.PatientData.MedicalStates; if (states != null) { standaloneController.changeScene(MedicalConfig.SceneDirectory + "/" + states.SceneName); medicalStateController.setStates(states); if (states.DefaultState != null) { medicalStateController.blendTo(states.DefaultState, 0.0f); } } else { MessageBox.show(String.Format("Error loading file {0}.\nCould not read state information.", dataFile.BackingFile), "Load Error", MessageBoxStyle.Ok | MessageBoxStyle.IconError); } CurrentData = dataFile; } else { MessageBox.show(String.Format("Error loading file {0}.\nCould not load patient data.", dataFile.BackingFile), "Load Error", MessageBoxStyle.Ok | MessageBoxStyle.IconError); } }
public void setStates(SavedMedicalStates states) { clearStates(); foreach (MedicalState state in states.getStates()) { this.states.Add(state); if (StateAdded != null) { StateAdded.Invoke(this, state); } } }
protected PatientData(LoadInfo info) { savedMedicalStates = info.GetValue <SavedMedicalStates>("MedicalStates"); }