예제 #1
0
        /// <summary>
        /// 접속자 명단 다시보기
        /// </summary>
        private void _RefreshListBoxSource()
        {
            try
            {
                string teamname = (String)ComboBoxTeam.SelectedItem;
                if (teamname == "기타")
                {
                    teamname = "";
                }

                Dictionary <string, MemberObj> teamMembers = Members.GetMembersByTeam(teamname);

                ListBoxSource.Items.Clear();
                foreach (var de in teamMembers)
                {
                    //string tempname = (String)de.Value;
                    string tempId = de.Key;
                    if (Members.ContainLoginUserNode(tempId))
                    {
                        //string item = tempname + "(" + tempid + ")";
                        MemberObj   userObj = Members.GetByUserId(tempId);
                        ListBoxItem item    = new ListBoxItem(userObj);
                        if (ListBox.NoMatches == ListBoxSelected.FindStringExact(item.Text))
                        {
                            ListBoxSource.Items.Add(item);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Logger.error(exception.ToString());
            }
        }
예제 #2
0
        /// <summary>
        /// 비접속자 포함 명단 다시보기
        /// </summary>
        private void _RefreshListBoxSourceAll()
        {
            try
            {
                string teamname = (String)ComboBoxTeam.SelectedItem;
                if (teamname == "기타")
                {
                    teamname = "";
                }

                Dictionary <string, MemberObj> memTable = Members.GetMembersByTeam(teamname);

                ListBoxSource.Items.Clear();
                foreach (var de in memTable)
                {
                    string tempid = (String)de.Key;

                    ListBoxItem item = new ListBoxItem(de.Value);

                    if (ListBox.NoMatches == ListBoxSelected.FindStringExact(item.Text))
                    {
                        ListBoxSource.Items.Add(item);
                    }
                }
            }
            catch (Exception exception)
            {
                Logger.error(exception.ToString());
            }
        }
예제 #3
0
        /// <summary>
        /// 팀정보를 서버로 부터 받은 경우 TreeView에 트리 생성
        /// </summary>
        /// <param name="team"></param>
        /// <param name="list"></param>
        private void GenerateTeamTreeOnTeamListReceived(object sender, CustomEventArgs e) //list[] {id!name}
        {
            try
            {
                string   team    = (string)e.GetItem;
                int      nodeNum = memTree.Nodes.Count;
                TreeNode node    = null;
                if (team.Length != 0)
                {
                    if (!memTree.Nodes.ContainsKey(team))
                    {
                        node           = memTree.Nodes.Add(team, "");//팀노드 추가
                        node.Text      = team;
                        node.NodeFont  = new Font("굴림", 9.75f, FontStyle.Bold);
                        node.ForeColor = Color.IndianRed;
                        node.EnsureVisible();
                        //memTree.e

                        Dictionary <string, MemberObj> members = Members.GetMembersByTeam(team);
                        List <MemberObj> memberList            = new List <MemberObj>(members.Values);

                        foreach (MemberObj memberPair in memberList)
                        {
                            if (memberPair.Id.Equals(ConfigHelper.Id))
                            {
                                continue;
                            }
                            TreeNode tempNode = memTree.Nodes[nodeNum].Nodes.Add(memberPair.Id, memberPair.Name); //사용자 노드 추가(노드 key=id, value=name)
                            tempNode.ToolTipText        = memberPair.Id;                                          //MouseOver일 경우 나타남
                            tempNode.ForeColor          = Color.Gray;
                            tempNode.Tag                = new MemberObj(team, memberPair.Id, memberPair.Name);    //arg[0];
                            tempNode.ImageIndex         = 0;
                            tempNode.SelectedImageIndex = 0;
                        }
                    }
                }
                memTree.ExpandAll();
                Logger.info(team + " 팀 리스트 생성!");
                //if (!memTree.Nodes[0].IsExpanded) memTree.Nodes[0].Expand();
                //if (team.Equals(this.team.Text)) node.Expand();

                //this.statusBar.Text = "";
            }
            catch (Exception exception)
            {
                Logger.error(exception.ToString());
            }
        }