예제 #1
0
 protected void OnDeserializeSubSearch()
 {
     //initialize subsearches
     if (subsearch != null)
     {
         SearchItem item = (SearchItem)subsearch;
         item.searchDepth = searchDepth + 1;
         item.parent      = this;
         item.root        = root;
         item.OnDeserialization();
     }
 }
예제 #2
0
        public void AddCopy(SearchItem item)
        {
            SearchItem copy = (SearchItem)SerializationUtil.Copy(item);

            copy.OnDeserialization();
            int insertPoint = items.IndexOf(item);

            copy.sortIndex = insertPoint; //HACK! This will get overridden, but right now we can use this var for the insertion point.

            // This has to be done later because this will most likely occur during a Draw()
            // operation.
            // items.Insert(insertPoint, item);

            itemsToAdd.Add(copy);
        }
예제 #3
0
 public void AddNew(SearchItem item)
 {
     item.OnDeserialization(); //reduces the need for redundant ctor init.
     items.Add(item);
     sortItems();
 }