Esempio n. 1
0
        private bool SetNodeIco(TreeNode node, Module.M_DomCs cs)
        {
            switch (cs.IsType)
            {
            case Module.CsType.Cs: node.ImageIndex = node.SelectedImageIndex = 10; return(true);

            case Module.CsType.img: node.ImageIndex = node.SelectedImageIndex = 17; return(true);

            case Module.CsType.html: node.ImageIndex = node.SelectedImageIndex = 13; return(true);

            case Module.CsType.aspx: node.ImageIndex = node.SelectedImageIndex = 14; return(true);

            case Module.CsType.config: node.ImageIndex = node.SelectedImageIndex = 16; return(true);

            case Module.CsType.resource: node.ImageIndex = node.SelectedImageIndex = 18; return(true);

            case Module.CsType.winform: node.ImageIndex = node.SelectedImageIndex = 8; return(true);

            case Module.CsType.js: node.ImageIndex = node.SelectedImageIndex = 11; return(true);

            case Module.CsType.css: node.ImageIndex = node.SelectedImageIndex = 12; return(true);

            case Module.CsType.disco: node.ImageIndex = node.SelectedImageIndex = 19; return(true);

            case Module.CsType.wsdl: node.ImageIndex = node.SelectedImageIndex = 20; return(true);

            case Module.CsType.map: node.ImageIndex = node.SelectedImageIndex = 21; return(true);

            case Module.CsType.settings: node.ImageIndex = node.SelectedImageIndex = 21; return(true);

            case Module.CsType.defaults:; return(false);    //垃圾文件,不显示出来
            }
            return(false);
        }
Esempio n. 2
0
 private void SetNodeChildIco(TreeNode node, Module.M_DomCs csdom)
 {
     for (int i = 0; i < csdom._cslist.Count; i++)
     {
         TreeNode childnode = new TreeNode();
         childnode.Text               = csdom._cslist[i].FileName;
         childnode.ImageIndex         = 9;
         childnode.SelectedImageIndex = 9;
         node.Nodes.Add(childnode);
     }
 }