コード例 #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);
     }
 }
コード例 #2
0
 public void setStates(SavedMedicalStates states)
 {
     clearStates();
     foreach (MedicalState state in states.getStates())
     {
         this.states.Add(state);
         if (StateAdded != null)
         {
             StateAdded.Invoke(this, state);
         }
     }
 }
コード例 #3
0
 protected PatientData(LoadInfo info)
 {
     savedMedicalStates = info.GetValue <SavedMedicalStates>("MedicalStates");
 }