Esempio n. 1
0
        /// <summary>
        /// 그룹명 선택 콤보박스 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void groupSelectComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                NCasColumnHeader nCasColumnHeader = this.groupMemberListView.Columns[0];
                nCasColumnHeader.ColumnHide = false;

                for (int i = 0; i < this.groupMemberListView.Items.Count; i++)
                {
                    this.groupMemberListView.Items[i].Checked = false;
                }

                GroupContent tmpContent = new GroupContent();
                GroupInfo    groupInfo  = this.groupSelectComboBox.SelectedItem as GroupInfo;

                foreach (GroupContent content in GroupContentMng.LstGroupContent)
                {
                    if (content.Title == groupInfo.ButtonID) //화면에서 선택한 그룹의 ID에 해당되는 정보가 GroupContentMng에 있으면..
                    {
                        tmpContent = content;
                        break;
                    }
                }

                foreach (GroupContent groupContent in this.lstGroupContent)
                {
                    if (groupContent.Title == tmpContent.Title)
                    {
                        groupContent.LstGroupData = tmpContent.LstGroupData;
                        break;
                    }
                }

                if (tmpContent.LstGroupData.Count > 0)
                {
                    foreach (GroupData groupData in tmpContent.LstGroupData)
                    {
                        NCasListViewItem[] lvi = this.groupMemberListView.Items.Find(groupData.IpAddr, false);

                        foreach (NCasListViewItem eachLvi in lvi)
                        {
                            eachLvi.Checked = true;
                        }
                    }
                }

                this.groupMemberListView.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show("그룹정보를 다시 설정하세요.", "그룹정보 설정", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 단일 그룹 정보 가져오기
        /// </summary>
        /// <param name="title"></param>
        /// <returns></returns>
        public static GroupContent GetGroupContent(string title)
        {
            GroupContent groupContent = new GroupContent();

            foreach (GroupContent eachGroupContent in lstGroupContent.LstGroupContent)
            {
                if (eachGroupContent.Title == title)
                {
                    groupContent = eachGroupContent;
                    break;
                }
            }

            return(groupContent);
        }
Esempio n. 3
0
        /// <summary>
        /// 단일 그룹 정보 저장
        /// </summary>
        /// <param name="groupContent"></param>
        public static void AddGroupContent(GroupContent groupContent)
        {
            foreach (GroupContent Content in lstGroupContent.LstGroupContent)
            {
                if (Content.Title == groupContent.Title) //기존에 있는 그룹이면..
                {
                    Content.LstGroupData.Clear();
                    Content.LstGroupData = groupContent.LstGroupData;
                    SaveGroupContent();
                    return;
                }
            }

            lstGroupContent.LstGroupContent.Add(groupContent);
            SaveGroupContent();
        }
Esempio n. 4
0
        /// <summary>
        /// 기초데이터 초기화
        /// </summary>
        private void Init()
        {
            this.groupBtnList = this.orderView.GetGroupButton();
            GroupContent content = null;

            foreach (NCasButton btn in this.groupBtnList)
            {
                NCasKeyData keyData   = btn.Tag as NCasKeyData;
                GroupInfo   groupInfo = new GroupInfo();
                groupInfo.Title    = keyData.Name;
                groupInfo.ButtonID = keyData.ID.ToString();
                this.groupSelectComboBox.Items.Insert(0, groupInfo);

                content       = new GroupContent();
                content.Title = keyData.ID.ToString();
                this.lstGroupContent.Add(content);
            }

            #region ListView 초기화
            this.groupMemberListView.GridLineStyle      = NCasListViewGridLine.GridBoth;
            this.groupMemberListView.GridDashStyle      = DashStyle.Dot;
            this.groupMemberListView.ScrollType         = NCasListViewScrollType.ScrollBoth;
            this.groupMemberListView.Font               = new Font(NCasPAlmScreenRsc.FontName, 11.0f);
            this.groupMemberListView.ColumnHeight       = 32;
            this.groupMemberListView.ItemHeight         = 29;
            this.groupMemberListView.HideColumnCheckBox = true;

            NCasColumnHeader col = new NCasColumnHeader();
            col.Text       = string.Empty;
            col.Width      = 30;
            col.SortType   = NCasListViewSortType.SortChecked;
            col.TextAlign  = HorizontalAlignment.Center;
            col.ColumnLock = true;
            col.ColumnHide = true;
            col.CheckBoxes = true;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "이름";
            col.Width     = 200;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Left;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "IP";
            col.Width     = 160;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Center;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "소속";
            col.Width     = 150;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Center;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "구분";
            col.Width     = 120;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Center;
            this.groupMemberListView.Columns.Add(col);
            #endregion

            #region ListView Items 셋팅
            foreach (DistInfo distInfo in this.provInfo.LstDists)
            {
                NCasListViewItem lvi = new NCasListViewItem();
                lvi.Name = distInfo.NetIdToString;

                NCasListViewItem.NCasListViewSubItem sub = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = distInfo.Name;
                sub.TextAlign = HorizontalAlignment.Left;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = distInfo.NetIdToString;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = this.provInfo.Name;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = NCASBIZ.NCasUtility.NCasUtilityMng.INCasCommUtility.NCasDefineOrderSource2String(NCasDefineOrderSource.DistCtrlRoom);
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                this.groupMemberListView.Items.Add(lvi);
            }

            foreach (TermInfo termInfo in this.provInfo.LstTerms)
            {
                if (termInfo.UseFlag != NCasDefineUseStatus.Use)
                {
                    continue;
                }

                NCasListViewItem lvi = new NCasListViewItem();
                lvi.Name = termInfo.IpAddrToSring;

                NCasListViewItem.NCasListViewSubItem sub = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = termInfo.Name;
                sub.TextAlign = HorizontalAlignment.Left;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = termInfo.IpAddrToSring;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = termInfo.DistInfo.Name;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = "단말";
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                this.groupMemberListView.Items.Add(lvi);
            }
            #endregion
        }
Esempio n. 5
0
 /// <summary>
 /// 단일 그룹 정보 삭제
 /// </summary>
 /// <param name="groupContent"></param>
 public static void RemoveGroupContent(GroupContent groupContent)
 {
 }