public FaceUser(string name, string uid, string imagebase64, FaceGroup belongGroup = null, string userInfo = "") { this.name = name; this.uid = uid; this.imagebase64 = imagebase64; BelongGroup = belongGroup; UserInfo = userInfo; }
/// <summary> /// 切换为子节点的时候显示图片 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void treeView_group_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { //判断是子节点 TreeNode thisNode = treeView_group.SelectedNode; if (thisNode != null && thisNode.Level == 1) { FaceGroup belongGroup = FaceGroup.GroupList.GetGroupByname(thisNode.Parent.Text); FaceUser user = belongGroup.UserList.GetUserByName(thisNode.Text); Bitmap tmp = LocalImageHelp.Base64str2Image(user.imagebase64); pictureBox1.Image = tmp; } else { pictureBox1.Image = null; } }