public void UpdateDisplayObject(DisplayObjectViewModel item)
        {
            int index = DisplayObjects.IndexOf(item);

            if (index != -1)
            {
                DisplayObjects.Remove(item);
                DisplayObjects.Insert(index, item);
            }
        }
 public DisplayObjectViewModel RemoveDisplayObject(DisplayObject objectToRemove)
 {
     foreach (DisplayObjectViewModel displayObject in DisplayObjects)
     {
         if (displayObject.BaseObject == objectToRemove)
         {
             DisplayObjects.Remove(displayObject);
             return(displayObject);
         }
     }
     return(null);
 }
예제 #3
0
 public void RemovePasswordViewModel(GamePasswordViewModel passwordToRemove)
 {
     DisplayObjects.Remove(passwordToRemove);
 }
 public void RemoveDisplayObjectViewModel(DisplayObjectViewModel textViewModel)
 {
     DisplayObjects.Remove(textViewModel);
 }