listSelectObjects

this.listSelectObjects.Clear();
            foreach (var item in TradeModelManager.Instance.DescriptolList)
            {
                this.listSelectObjects.Add(new SelectObject(item.Name,item));
            }

            TreeNode node = this.SelectedItem as TreeNode;
            if (node!=null)
            {
                bool flag = false;
                foreach (var item in TradeModelManager.Instance.DescriptolList)
                {
                    if (item==node.Tag)
                    {
                        flag = true;
                        break;
                    }
                }

                if (!flag)
                {
                    this.SelectedItem = null;
                }
            }

posted @ 2013-05-14 19:28  Predator  阅读(99)  评论(0编辑  收藏  举报