Пример #1
0
 /// <summary>
 /// Use the current setup of the scene to create a "normal" state.
 /// </summary>
 public void sceneLoaded(SimScene scene)
 {
     sceneLoadNormalState                  = this.createState("Normal");
     sceneLoadNormalState.Notes.Notes      = "Normal";
     sceneLoadNormalState.Notes.DataSource = "Automatic";
     sceneLoadNormalState.Thumbnail        = imageRenderer.renderImage(imageProperties);
     states.Add(sceneLoadNormalState);
     if (StateAdded != null)
     {
         StateAdded.Invoke(this, sceneLoadNormalState);
     }
 }
Пример #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
 public void addState(MedicalState state)
 {
     //No states and normal state defined, add it as the first state.
     if (states.Count == 0)
     {
         states.Add(sceneLoadNormalState);
         if (StateAdded != null)
         {
             StateAdded.Invoke(this, sceneLoadNormalState);
         }
     }
     states.Add(state);
     if (state.Thumbnail == null)
     {
         state.Thumbnail = imageRenderer.renderImage(imageProperties);
     }
     if (StateAdded != null)
     {
         StateAdded.Invoke(this, state);
     }
 }