コード例 #1
0
ファイル: I3TreeView.cs プロジェクト: ie310mu/i3go_codemaker
        //选择后
        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
ファイル: I3TreeView.cs プロジェクト: ie310mu/i3go_codemaker
 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);
         }
     }
 }