Пример #1
0
        protected override int AddItem(ViewStatePartBase item)
        {
            DropDownTreeItem item2 = (DropDownTreeItem)item;

            item2.DropDownTree = this.DropDownTree;
            item2.Owner        = this.Owner;
            item2.Init();
            return(base.AddItem(item2));
        }
Пример #2
0
 protected virtual void CopyFrom(ViewStatePartBase s)
 {
     if ((s != null) && !s.IsEmpty)
     {
         foreach (string str in s.ViewState.Keys)
         {
             this.ViewState.Add(str, s.ViewState[str]);
         }
     }
 }
Пример #3
0
 protected virtual void MergeWith(ViewStatePartBase s)
 {
     if ((s != null) && !s.IsEmpty)
     {
         foreach (string str in s.ViewState.Keys)
         {
             if (!this.IsSet(str))
             {
                 this.ViewState.Add(str, s.ViewState[str]);
             }
         }
     }
 }
Пример #4
0
 protected virtual int AddItem(ViewStatePartBase item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item", "item can't be null!");
     }
     if (this._isTrackingViewState)
     {
         item.TrackViewState();
         item.SetDirty();
     }
     base.InnerList.Add(item);
     return(base.InnerList.Count - 1);
 }
Пример #5
0
 public virtual void LoadViewState(object savedState)
 {
     if (savedState != null)
     {
         Pair      pair   = (Pair)savedState;
         ArrayList first  = (ArrayList)pair.First;
         ArrayList second = (ArrayList)pair.Second;
         for (int i = 0; i < first.Count; i++)
         {
             int num2 = (int)second[i];
             if (num2 < base.Count)
             {
                 ((ViewStatePartBase)base.InnerList[num2]).LoadViewState(first[i]);
             }
             else
             {
                 ViewStatePartBase item = this.NewItem();
                 item.LoadViewState(first[i]);
                 this.AddItem(item);
             }
         }
     }
 }