예제 #1
0
        //选择后
        protected override void OnAfterSelect(TreeViewEventArgs e)
        {
            if (this.IsInUpdateState)
            {
                return;
            }

            base.OnAfterSelect(e);

            if (this.dataManager == null)
            {
                return;
            }
            IList list = this.dataManager.List;

            if (this.SelectedNode == null)
            {
                //this.dataManager.Position = -1;
                I3CurrencyManagerUtil.UpdatePosition(this.dataManager, -1);
            }
            else
            {
                int index = list.IndexOf(this.SelectedNode.Tag);
                //this.dataManager.Position = index;
                I3CurrencyManagerUtil.UpdatePosition(this.dataManager, index);
            }
        }
예제 #2
0
 public new void EndUpdate()
 {
     if (this.updateCount == 0)
     {
         return;
     }
     this.updateCount--;
     if (this.updateCount == 0)
     {
         base.EndUpdate();
         if (this.SelectedNode != null && this.dataManager != null)
         {
             int index = this.dataManager.List.IndexOf(this.SelectedNode.Tag);
             I3CurrencyManagerUtil.UpdatePosition(this.dataManager, index);
         }
     }
 }