예제 #1
0
 protected void TreeView1_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
 {
     if (e.Node.Text == "Food Lovers")
     {
         e.Node.Parent.ChildNodes.Remove(e.Node);
     }
 }
예제 #2
0
    public void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
    {
        if (e.Node.Depth > 4)
			return;

        for (int n = 0; n < (e.Node.Depth+1) * 2; n++)
        {
			string label = string.Empty;
			if (e.Node.Depth < 1) 
				label = "Node";
			else
				label = e.Node.Text;
	
			if (Char.IsDigit(label.ToCharArray()[label.Length-1])) {
				label += " " + (char)(n + 65);
			} else {
				label += " " + n;

			}
			TreeNode nod = new TreeNode(label);
            //TreeNode nod = new TreeNode("Node " + e.Node.Depth + " " + n);
            nod.PopulateOnDemand = true;
            e.Node.ChildNodes.Add(nod);
        }
    }
예제 #3
0
 protected void Treeview1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     if (base.IsCallback && (e.Node.ChildNodes.Count == 0))
     {
         this.LoadChildNode(e.Node);
     }
 }
    protected void MenuTreeView_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
    {
        int i = 0;
        if (e.Node.Parent == null)
        {
            i = this.MenuTreeView.Nodes.IndexOf(e.Node);
        }
        else
        {
            i = this.MenuTreeView.Nodes.IndexOf(e.Node.Parent);
        }

        Session["NodeIndex"] = i.ToString();

        TreeNodeCollection ts = null;
        if (e.Node.Parent == null)
        {
            ts = ((TreeView)sender).Nodes;
        }
        else
            ts = e.Node.Parent.ChildNodes;
        foreach (TreeNode node in ts)
        {
            if (node != e.Node)
            {
                node.Collapse();
            }
        }
    }
 void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     if (e.Node.Value.EndsWith("\\"))
     {
         AddNodes(e.Node.Value, e.Node);
     }
 }
예제 #6
0
 protected override void OnTreeNodeCollapsed(TreeNodeEventArgs e)
 {
     base.OnTreeNodeCollapsed(e);
     if (this.ShowNodeImages)
     {
         e.Node.ImageUrl = this.FolderClosedImage;
     }
 }
예제 #7
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.WebControls.TreeView.TreeNodePopulate"/> event of the <see cref="T:System.Web.UI.WebControls.TreeView"/> control.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Web.UI.WebControls.TreeNodeEventArgs"/> that contains event data.</param>
        protected override void OnTreeNodePopulate(TreeNodeEventArgs e)
        {
            base.OnTreeNodePopulate(e);

            int parentId = int.Parse(e.Node.Value);

            CreateChildNodes(e.Node.ChildNodes, parentId);
        }
        protected void check_changed(object sender, TreeNodeEventArgs e)
        {
            string clickedNode = e.Node.Text;

            System.Diagnostics.Debugger.Break();
            //System.Diagnostics.Debugger.Break();
            txtnomCategoria.Value = clickedNode;
        }
예제 #9
0
 protected void trvDept_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
 {
     strEmpArr = "";
     foreach (TreeNode tn in trvDept.CheckedNodes)
     {
         strEmpArr += tn.Value + ";";
     }
 }
예제 #10
0
 protected void MainTree_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     if (_IsAjax)
     {
         //Ajax 才需動態產生子節點
         BuildChildNode(e.Node);
     }
 }
    protected void uxCategoryNavListTreeView_DataBound(object sender, EventArgs e)
    {
        TreeNodeEventArgs ee = (TreeNodeEventArgs)e;
        XmlElement        xe = (XmlElement)ee.Node.DataItem;

        ee.Node.Text         = xe.Attributes["DisplayThisText"].Value;
        ee.Node.SelectAction = TreeNodeSelectAction.Expand;
    }
예제 #12
0
 protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
 {
     SetChildChecked(e.Node);
     if (e.Node.Parent != null)
     {
         SetParentChecked(e.Node);
     }
 }
예제 #13
0
 protected void tree_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
 {
     foreach (TreeNode node in e.Node.ChildNodes)
     {
         CheckNode(node, e.Node.Checked);
     }
     mpeTree.Show();
 }
예제 #14
0
 protected void TreeView_Scope_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
 {
     //TreeNode senderNode = sender as TreeNode;
     //foreach (TreeNode n in senderNode.ChildNodes)
     //{
     //    n.Checked = senderNode.Checked;
     //}
 }
예제 #15
0
 protected void onTreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     e.Node.SelectAction = TreeNodeSelectAction.Expand;
     if (Request.Cookies[PREFIX + e.Node.Text] != null)
     {
         Response.Cookies[PREFIX + e.Node.Text].Value = "true";
     }
 }
        /// <summary>
        /// Called when the user expands a menu that hasn't been expanded before.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubmitTree_TreeNodePopulate(object sender, TreeNodeEventArgs e)
        {
            string[] nodeData = e.Node.Value.Split(',');
            MenuType menuType = (MenuType)Int32.Parse(nodeData[0]);
            int      menuID   = Int32.Parse(nodeData[1]);
            string   menuName = nodeData[2];

            PopulateMenuNode(e.Node.ChildNodes, menuType, menuName, menuID);
        }
예제 #17
0
    protected void treeDir_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
    {
        TreeNode tn = e.Node;

        if (tn.Checked == true)
        {
            TreeNodeCheck(tn);
        }
    }
    protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
    {
        //TreeView1.TreeNodeCheckChanged -= new TreeNodeEventHandler(TreeView1_TreeNodeCheckChanged);

        //updateDownNodeCheckBox(e.Node, e.Node.Checked);
        //updateUpNodeCheckBox(e.Node, e.Node.Checked);

        //TreeView1.TreeNodeCheckChanged += new TreeNodeEventHandler(TreeView1_TreeNodeCheckChanged);
    }
예제 #19
0
 protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     if (e.Node.ChildNodes.Count > 0)
     {
         e.Node.ChildNodes.Clear();
         DirectoryInfo dir = new DirectoryInfo(e.Node.Value);
         AppendSubNode(dir, e.Node);
     }
 }
예제 #20
0
        private void RefreshTreeView()
        {
            TreeNode parent = PMTreeView.Nodes[0];

            parent.ChildNodes.Clear();
            TreeNodeEventArgs ea = new TreeNodeEventArgs(parent);

            PopulateNode(this, ea);
        }
예제 #21
0
 protected void treeProductGroup_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
 {
     Controller.DeleteProductInGroups(ProductId);
     foreach (TreeNode node in treeProductGroup.CheckedNodes)
     {
         int ProductGroupId = Convert.ToInt32(node.Value.Substring(1));
         Controller.NewProductInGroup(ProductId, ProductGroupId);
     }
 }
예제 #22
0
파일: AvlTree.cs 프로젝트: radtek/datawf
        protected virtual void OnNodeRemoved(TreeNodeEventArgs e)
        {
            var handler = this.NodeRemoved;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        protected void rtvSiteMap_NodeCheck(object sender, TreeNodeEventArgs e)
        {
            TreeNodeCheck(e.Node);

            //Need to think about SettingAttribute thepermission
            //InititializeDBTree();

            InititializeSiteMapTree();
        }
예제 #24
0
        private void OnNodeChanged(TreeNodeEventArgs e)
        {
            var handler = NodeChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #25
0
        //Обработка ивента изменения статуса ноды (открыта, закрыта),
        //отрабатывает когда пользователь открывает или закрывает ноду.
        //Изменившаяся нода добавляется в словарь состояния дерева (если она там уже была - сначала удаляется.
        protected void MyTreeView_TreeNodeStateChanged(object sender, TreeNodeEventArgs e)
        {
            if (treeViewState.ContainsKey(e.Node.Text))
            {
                _ = treeViewState.Remove(e.Node.Text);
            }

            treeViewState.Add(e.Node.Text, e.Node.Expanded);
        }
예제 #26
0
        protected void trvCategorias_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
        {
            OnTreeNodeCheckChanged(e);

            if (IsRadio)
            {
                hdnIdCategoriaRadio.Value = IdsCategoriasMarcadas.FirstOrDefault().ToString();
            }
        }
예제 #27
0
        protected void Tree1_NodeDataBound(object sender, TreeNodeEventArgs e)
        {
            XmlAttribute attr = e.XmlNode.Attributes["Highlight"];

            if (attr != null && Convert.ToBoolean(attr.Value))
            {
                e.Node.Text = String.Format("<span class=\"highlight\">{0}</span>", e.Node.Text);
            }
        }
예제 #28
0
 protected void TrvCedentes_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     switch (e.Node.Depth)
     {
     case 0:
         FunLlenarCiudadCedente(e.Node);
         break;
     }
 }
예제 #29
0
        protected void PopulateNode(Object sender, TreeNodeEventArgs e)
        {
            Debug.WriteLine("Begin PopulateNode");
            Debug.WriteLine(e.Node.Value);

            AddNodes(e.Node.Value, e.Node.ChildNodes);

            Debug.WriteLine("End PopulateNode");
        }
예제 #30
0
 protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     if (IsPostBack)
     {
         List<string> list = new List<string>(16);
         SaveTreeViewState(TreeView1.Nodes, list);
         Session["TreeViewState"] = list;
     }
 }
예제 #31
0
    /// <summary>
    /// On populate create child nodes.
    /// </summary>
    protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e)
    {
        e.Node.ChildNodes.Clear();
        e.Node.PopulateOnDemand = false;

        int postId = ValidationHelper.GetInteger(e.Node.Value, 0);

        // Set the ForumID if not set already
        if (ForumContext.ForumID == 0)
        {
            ForumPostInfo postInfo = ForumPostInfoProvider.GetForumPostInfo(postId);
            if (postInfo != null)
            {
                ForumContext.ForumID = postInfo.PostForumID;
                ForumID = postInfo.PostForumID;
            }
        }

        // Get child nodes
        SiteMapNodeCollection childNodes = MapProvider.GetChildNodes(postId, RegularLoad);

        int index = 0;

        foreach (ForumPostTreeNode childNode in childNodes)
        {
            int childNodeId = (int)((DataRow)childNode.ItemData)["PostID"];
            if (childNodeId != postId)
            {
                TreeNode newNode          = CreateNode(childNode, index);
                bool?    originalExpanded = newNode.Expanded;

                // Force node to expand and load child posts
                if (DetailModeIE)
                {
                    newNode.PopulateOnDemand = true;
                    newNode.Expanded         = true;
                }

                e.Node.ChildNodes.Add(newNode);

                // Restore original expanded state
                if (DetailModeIE)
                {
                    newNode.Expanded = originalExpanded;
                }

                index++;
            }

            // Ensure there is only one 'click here for more' item
            if (UseMaxPostNodes && (MaxPostNodes > 0) && (index > MaxPostNodes))
            {
                break;
            }
        }
    }
예제 #32
0
 //展開TreeNode節點
 protected void tvProduct_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     if (IsPostBack)
     {
         if (e.Node.Expanded == true)
         {
             WebMessageBox.MessageBox.Show("Hi...您展開了" + e.Node.Text + "節點!");
         }
     }
 }
예제 #33
0
 protected void Tv1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     if (IsCallback == true)
     {
         if (e.Node.ChildNodes.Count == 0)
         {
             LoadChildNode(e.Node);
         }
     }
 }
예제 #34
0
 protected void TreeView1_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
 {
     //
     // Make top-level TreeView nodes nonselectable.
     //
     if (e.Node.Depth == 0)
     {
         e.Node.SelectAction = TreeNodeSelectAction.None;
     }
 }
예제 #35
0
 protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     lstNodes = (List <Node>)Session["TreeNodes"];
     if (lstNodes != null)
     {
         Node nd = lstNodes.Find(n => n.Id.ToString() == e.Node.Value);
         nd.IsExpanded        = true;
         Session["TreeNodes"] = lstNodes;
     }
 }
예제 #36
0
        protected void lnkCategoria_OnClick(object sender, EventArgs e)
        {
            var selectedNode = GetAllNodes().FirstOrDefault(node => node.Value == hdnIdCategoriaRadio.Value);

            if (selectedNode != null)
            {
                var args = new TreeNodeEventArgs(selectedNode);

                OnTreeNodeCheckChanged(args);
            }
        }
예제 #37
0
 protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     for (int i = 0; i < 3; i++)
     {
         TreeNode newNode = new TreeNode();
         newNode.Text = string.Format("动态加载的节点{0}", i);
         ////这里将新建的节点的PopulateOnDemand属性也设为True,将会形成一个无限递归
         newNode.PopulateOnDemand = true;
         //TreeNodeEventArgs中的Node属性表示当前的节点
         e.Node.ChildNodes.Add(newNode);
     }
 }
예제 #38
0
 protected void tTV_TreeNodeCheckChanged1(object sender, TreeNodeEventArgs e)
 {
     TreeNodeCollection node = e.Node.ChildNodes;
     if (e.Node.Parent != null)
     {
         CheckNodeParent(e.Node, e.Node.Checked);
     }
     foreach (TreeNode item in node)
     {
         item.Checked = e.Node.Checked;
         CheckNode(item.ChildNodes, e.Node.Checked);
     }
     e.Node.ExpandAll();
 }
        private void OnParentRemovingChild(object sender, TreeNodeEventArgs e)
        {
            // Setup initial conditions.
            if (e.Node != node) return;

            // Slide the list-tree back to the next remaining parent.
            if (parentList.RootNode != null)
            {
                ITreeNode ancestor = Helper.Tree.FirstRemainingParent(parentList.RootNode, node);
                parentList.SelectedParent = ancestor ?? parentList.RootNode;
            }

            // The node for this panel has been removed.  Dispose of the panel.
            Dispose();
        }
예제 #40
0
 protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     TreeNodeCollection ts = null;
     if (e.Node.Parent == null)
     {
         ts = ((TreeView)sender).Nodes;
     }
     else
         ts = e.Node.Parent.ChildNodes;
     foreach (TreeNode node in ts)
     {
         if (node != e.Node)
         {
             node.Collapse();
         }
     }
 }
예제 #41
0
 protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
 {
     //判断当前选择了多少个节点
     if (TreeView1.CheckedNodes.Count > 0)
     {
         Label1.Text = "当前选择了如下节点:: <br /><br />";
         //CheckedNodes代表当前选择的节点的集合
         foreach (TreeNode node in TreeView1.CheckedNodes)
         {
             Label1.Text += node.Text + "<br />";
         }
     }
     else
     {
         Label1.Text = "没有节点被选择。";
     }
 }
예제 #42
0
    protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
    {
        if (e.Node.Depth > 0)
        {
            if (e.Node.Depth == 1)
            {
                e.Node.ChildNodes.Clear();
                SelectDvs sd = new SelectDvs();
                DataSet ds = sd.Query(e.Node.Value);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dataRow in ds.Tables[0].Rows)
                    {
                        TreeNode tv = new TreeNode();
                        tv.Value = Convert.ToString(dataRow["id"]);
                        tv.Text = Convert.ToString(dataRow["Customername"]) + "<a target='right' href='ResEncoder.aspx?id=" + Convert.ToString(dataRow["id"]) + "'>编辑</a>";
                        TreeNode node = new TreeNode();
                        node.Text = "";
                        tv.ChildNodes.Add(node);
                        tv.Expanded = false;
                        e.Node.ChildNodes.Add(tv);

                    }
                }
            }
            else if (e.Node.Depth == 2)
            {
                e.Node.ChildNodes.Clear();
                SelectCameras sc = new SelectCameras();
                DataSet ds1 = sc.Query(e.Node.Value);

                foreach (DataRow dataRow in ds1.Tables[0].Rows)
                {
                    TreeNode tv = new TreeNode();
                    tv.Text = Convert.ToString(dataRow["dvsno"]) + "(" + Convert.ToString(dataRow["dvsport"]) + ")" + "<a target='right' href='ResCamera.aspx?id=" + Convert.ToString(dataRow["id"]) + "'>编辑</a>";
                    e.Node.ChildNodes.Add(tv);
                }
            }
        }
    }
예제 #43
0
 protected void tvwMenu_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     if (e.Node.ChildNodes.Count == 0)
     {
         string[] nodevalue = e.Node.ValuePath.Split('/');
         switch (nodevalue[0])
         {
             case "tndSite"://控制中心
                 switch (e.Node.Depth)//节点深度
                 {
                     case 0:
                         CreateSiteCategories(e.Node);
                         break;
                     case 1:
                         CreateProducts(e.Node);
                         break;
                 }
                 break;
             case "tndMIU"://重点怀疑对象
                 switch (e.Node.Depth)
                 {
                     case 0:
                         CreateMIUCategories(e.Node);
                         break;
                     case 1:
                         CreateProducts(e.Node);
                         break;
                 }
                 break;
             case "tndApp"://数据管理中心
                 //if (e.Node.Depth == 0)
                 //    CreateAppList(e.Node);
                 break;
             case "tndSystem"://系统日志
                 break;
         }
     }
 }
예제 #44
0
 /// <summary>
 /// Tree populate.
 /// </summary>
 /// <param name="sender">Sender</param>
 /// <param name="e">Arguments</param>
 protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     OnNodePopulate(e.Node);
 }
예제 #45
0
파일: Tree.cs 프로젝트: erpframework/FineUI
 /// <summary>
 /// 触发节点延迟加载事件
 /// </summary>
 /// <param name="e">事件参数</param>
 protected virtual void OnNodeLazyLoad(TreeNodeEventArgs e)
 {
     EventHandler<TreeNodeEventArgs> handler = Events[_nodeLazyLoadHandlerKey] as EventHandler<TreeNodeEventArgs>;
     if (handler != null)
     {
         handler(this, e);
     }
 }
예제 #46
0
    protected void tvRole_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
    {
        SiteMapNode node = e.Node.DataItem as SiteMapNode;
        if (Security.IsDeniedURL(node.Url, txtTargetCode.Text)) e.Node.ShowCheckBox = false;
        if (string.IsNullOrEmpty(node.Url))
        {
            e.Node.ShowCheckBox = false;
            e.Node.SelectAction = TreeNodeSelectAction.Expand;
            e.Node.Value = "";
        }
        else
        {
            e.Node.Checked = !Security.IsDeniedURL(node.Url, txtTargetCode.Text, ddlRoles.SelectedValue);
            e.Node.NavigateUrl = string.Format("TaskSetting.aspx?url={0}&app={1}&role={2}&&TB_iframe=true&height=250&width=510", node.Url, txtTargetCode.Text, ddlRoles.SelectedValue);
            //

            e.Node.Value = node.Url;
            e.Node.SelectAction = TreeNodeSelectAction.Select;
        }
    }
예제 #47
0
 private void AddZipsInZip(long id, TreeNodeEventArgs e)
 {
     EkJobDS.LocalizationJobFileDataTable dt = this.localizationApi.GetFilesInFile(id);
     foreach (EkJobDS.LocalizationJobFileRow data in dt.Rows)
     {
         e.Node.ChildNodes.Add(this.CreateZipNode(data));
     }
 }
 void TreeView1_TreeNodeCollapsed(object sender, TreeNodeEventArgs e)
 {
     //throw new Exception("The method or operation is not implemented.");
 }
예제 #49
0
    protected void TreeViewSystemObject_Collapsed(Object sender, TreeNodeEventArgs e)
    {
        if (e.Node != null)
        {
            Nullable<bool> expandState = e.Node.Expanded;

            if (expandState.HasValue && !expandState.Value)
            {
                SetCurrNodeExpandState(e.Node);
            }
            //e.Node.Collapse();
        }
    }
예제 #50
0
 protected void TreeViewSystemObject_NodePopulate(Object sender, TreeNodeEventArgs e)
 {
     try
     {
         if (e.Node.ChildNodes.Count == 0)
         {
             FSEyeObject obj = AdminServer.TheInstance.SecurityManager.Get(int.Parse(e.Node.Value));
             if (obj != null)
             {
                 BuildObjectTree(e.Node, obj);
             }
         }
     }
     catch (Exception ex)
     {
         FSEye.Util.DebugLog(ex.ToString());
     }
 }
예제 #51
0
 protected void ProgramsTree_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
 {
     if (Request.Cookies["TreeState"] == null)
     {
       HttpCookie hc = new HttpCookie("TreeState");
       hc.Expires = DateTime.Now.AddYears(1);
       hc.Value = "";
       Response.Cookies.Add(hc);
       return;
     }
     string[] values = Common.Functions.nvl(Request.Cookies["TreeState"].Value, "").ToString().Split('|');
     string Result = "";
     foreach (string s in values)
       if (s != e.Node.Value)
     Result += s + "|";
     Result = Result.Substring(0, Result.Length - 1);
     Response.Cookies["TreeState"].Expires = DateTime.Now.AddYears(1);
     Response.Cookies["TreeState"].Value = Result;
 }
예제 #52
0
 protected void ProgramsTree_TreeNodeCollapsed(object sender, TreeNodeEventArgs e)
 {
     if (Response.Cookies["TreeState"] == null)
     {
       HttpCookie hc = new HttpCookie("TreeState");
       Response.Cookies.Add(hc);
     }
     Response.Cookies["TreeState"].Expires = DateTime.Now.AddYears(1);
     Response.Cookies["TreeState"].Value = Request.Cookies["TreeState"].Value + "|" + e.Node.Value;
 }
 protected void folderTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     PopulateSubfodlers(e.Node);
 }
예제 #54
0
 protected void TOC_DataBound(object sender, TreeNodeEventArgs e)
 {
     try
     {
         if ((e != null) && (e.Node != null) && (Request.QueryString["content"] != null))
         {
             if ((e.Node.Depth < 2) || (Request.QueryString["content"].Contains(e.Node.Text)))
             {
                 e.Node.Expanded = true;
             }
             else
             {
                 e.Node.Expanded = false;
             }
         }
     }
     catch
     {
         return; //sometimes e is in an invalid state
     }
 }
예제 #55
0
    protected void TreeViewSystemObject_Expanded(Object sender, TreeNodeEventArgs e)
    {
        try
        {
            if (e.Node.ChildNodes.Count == 0)
            {
                FSEyeObject obj = AdminServer.TheInstance.SecurityManager.Get(int.Parse(e.Node.Value));
                if (obj != null)
                {
                    BuildObjectTree(e.Node, obj);
                    SetCurrNodeExpandState(e.Node);
                }
            }
            //Nullable<bool> expandState = e.Node.Expanded;

            //if (expandState.HasValue && !expandState.Value)
            //{
            //    SetCurrNodeExpandState(e.Node);
            //}

            SetCurrNodeExpandState(e.Node);
        }
        catch (Exception ex)
        {
            FSEye.Util.DebugLog(ex.ToString());
        }
    }
    protected void treeMenu_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
    {
        if (e != null
            && e.Node != null
            && e.Node.Depth >= 2
            )
        {

            int treeType = PubClass.GetShort(ExtendMethod.GetPageParam(this,"TreeType"));

            switch (treeType)
            {
                case (int)MenuTreeTypeEnum.Menu:
                    {

                    }
                    break;
                case (int)MenuTreeTypeEnum.Question:
                    {

                    }
                    break;
                case (int)MenuTreeTypeEnum.Answer:
                    {

                    }
                    break;
                default:
                    break;
            }
        }
    }
예제 #57
0
파일: View.ascx.cs 프로젝트: devxsid69/SSky
 protected void tvSiteMap_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
 }
예제 #58
0
    protected void modal_edit_treeview_TreeNodeCheckedChanged(object sender, TreeNodeEventArgs e)
    {
        if (e == null) return;
        if (e.Node == null) return;

        e.Node.Parent.CheckParent();
        foreach (TreeNode c in e.Node.ChildNodes) c.CheckChildren();
    }
    protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e)
    {
        e.Node.ChildNodes.Clear();
        e.Node.PopulateOnDemand = false;

        string nodePath = MediaLibraryHelper.EnsurePhysicalPath(e.Node.ValuePath);

        int rootEnd = nodePath.IndexOfCSafe('\\');
        if (rootEnd > -1)
        {
            nodePath = nodePath.Substring(rootEnd + 1);
        }

        // Bind tree nodes
        if (String.IsNullOrEmpty(MediaLibraryPath))
        {
            BindTreeView(RootFolderPath + DirectoryHelper.CombinePath(MediaLibraryFolder, nodePath), e.Node);
        }
        else
        {
            BindTreeView(DirectoryHelper.CombinePath(RootFolderPath, MediaLibraryPath, nodePath), e.Node);
        }
    }
예제 #60
0
 private void AddXlfsInZip(long id, TreeNodeEventArgs e)
 {
     EkJobDS.LocalizationTargetDataTable dt = this.localizationApi.GetInterchangeFilesInFile(id);
     foreach (EkJobDS.LocalizationTargetRow data in dt.Rows)
     {
         e.Node.ChildNodes.Add(this.CreateXlfNode(data));
     }
 }