Exemple #1
0
        /// <summary>
        /// Add something to the display list. TODO: Rename this method?
        /// </summary>
        /// <param name="dlistItem">The item to add.</param>
        public void AddTag(IDisplayListItem dlistItem)
        {
            this.displayList.Add(dlistItem);

            PlaceObject po = dlistItem as PlaceObject;

            if (po != null && po.Name != null)
            {
                this.placeObjectMap.Add(po.Name, po);
            }
        }
Exemple #2
0
        internal void RemoveDisplayListItem(IDisplayListItem dli)
        {
            this.displayList.Remove(dli);

            PlaceObject po = dli as PlaceObject;

            if (po != null && po.Name != null)
            {
                this.placeObjectMap.Remove(po.Name);
            }
        }
 /// <summary>
 /// Turns a display list item into text.
 /// </summary>
 /// <param name="dli">The item</param>
 /// <param name="nest">Any current log output nesting level</param>
 /// <param name="sb">The string buffer to write the text into.</param>
 public static void ToStringModelView(IDisplayListItem dli, int nest, StringBuilder sb)
 {
     if (dli is PlaceObject)
     {
         ((PlaceObject)dli).ToStringModelView(nest, sb);
     }
     else if (dli is RemoveObject)
     {
         ((RemoveObject)dli).ToStringModelView(nest, sb);
     }
     else
     {
         throw new Exception("*** ERROR: CAN'T DUMP: " + dli.ToString());
     }
 }
Exemple #4
0
        /// <summary>
        /// Add something to the display list. TODO: Rename this method?
        /// </summary>
        /// <param name="dlistItem">The item to add.</param>
        public void AddTag(IDisplayListItem dlistItem)
        {
            this.displayList.Add(dlistItem);

            PlaceObject po = dlistItem as PlaceObject;

            if (po != null && po.Name != null)
            {
                this.placeObjectMap.Add(po.Name, po);
            }
        }
Exemple #5
0
        internal void RemoveDisplayListItem(IDisplayListItem dli)
        {
            this.displayList.Remove(dli);

            PlaceObject po = dli as PlaceObject;

            if (po != null && po.Name != null)
            {
                this.placeObjectMap.Remove(po.Name);
            }
        }