コード例 #1
0
ファイル: loadCache.cs プロジェクト: SKDon/Triphulcas
        public override void Render(ref XmlTree tree)
        {
            Hashtable ht = Cache.ReturnCacheItemsOrdred();

            foreach (string key in ht.Keys)
            {
                //each child will need to load a CacheItem instead of a Cache tree so
                //we'll create a loadCacheItem object in order to get it's serivce url and alias properties
                loadCacheItem loadCacheItemTree = new loadCacheItem(this.app);
                int           itemCount         = ((ArrayList)ht[key]).Count;
                XmlTreeNode   xNode             = XmlTreeNode.Create(loadCacheItemTree);
                xNode.NodeID      = key;
                xNode.Text        = key + " (" + itemCount + ")";
                xNode.Action      = string.Empty;
                xNode.Source      = loadCacheItemTree.GetTreeServiceUrl(key);
                xNode.Icon        = "developerCacheTypes.gif";
                xNode.OpenIcon    = "developerCacheTypes.gif";
                xNode.HasChildren = itemCount > 0;

                OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
                if (xNode != null)
                {
                    tree.Add(xNode);
                    OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
                }
            }
        }
コード例 #2
0
ファイル: loadCache.cs プロジェクト: elrute/Triphulcas
        public override void Render(ref XmlTree tree)
        {
            Hashtable ht = Cache.ReturnCacheItemsOrdred();

            foreach (string key in ht.Keys)
            {
                //each child will need to load a CacheItem instead of a Cache tree so
                //we'll create a loadCacheItem object in order to get it's serivce url and alias properties
                loadCacheItem loadCacheItemTree = new loadCacheItem(this.app);
				int itemCount = ((ArrayList)ht[key]).Count;
                XmlTreeNode xNode = XmlTreeNode.Create(loadCacheItemTree);
                xNode.NodeID = key;
				xNode.Text = key + " (" + itemCount + ")";
				xNode.Action = string.Empty;
                xNode.Source = loadCacheItemTree.GetTreeServiceUrl(key);
                xNode.Icon = "developerCacheTypes.gif";
                xNode.OpenIcon = "developerCacheTypes.gif";
				xNode.HasChildren = itemCount > 0;

                OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
                if (xNode != null)
                {
                    tree.Add(xNode);
                    OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
                }
                
            }
        }