Example #1
0
 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);
     }
 }