private void EmployeeTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { try { TreeNode thisNode = e.Node; if (thisNode.Tag.ToString() == "Dispatcher.GroupT") { Dispatcher.GroupT group = (Dispatcher.GroupT)thisNode.Tag; //GetGroupMember(group.dnsprefix, group.groupnum); Base.g_DialNum = group.dnsprefix + group.groupnum; this.txtDialNum.Text = Base.g_DialNum; } else if (thisNode.Tag.ToString() == "Dispatcher.UserT") { Dispatcher.UserT user = (Dispatcher.UserT)thisNode.Tag; Base.g_DialNum = user.dnsprefix + user.userid; this.txtDialNum.Text = Base.g_DialNum; } else if (thisNode.Tag.ToString() == "Dispatcher.VideoInfoElem") { Dispatcher.VideoInfoElem video = (Dispatcher.VideoInfoElem)thisNode.Tag; } } catch { //记录错误 } }
private TreeNode SetEmployeeTree(Dispatcher.UserT user) { TreeNode userNode = new TreeNode(); userNode.Name = user.dnsprefix + user.userid; userNode.Text = user.username; userNode.Tag = user; string strInfo = String.Format("DTS->DTC; KEY=USER; DNSPREFIX={0}; USERID={1}; USERNAME={2}; USERTYPE={3}; RSTATE={4} ", user.dnsprefix, user.userid, user.username, user.type.ToString(), user.rstate.ToString()); ShowDebugInfo(strInfo); return(userNode); }