Exemple #1
0
        private bool MatchingList_Edit(int nSelectIndex, MatchingModel editMatchingModel)
        {
            //추가 성공 여부
            bool bReturn = false;

            if (0 <= nSelectIndex)
            {
                //리스트 갱신
                MatchingModel itemM = this.listMatching[nSelectIndex];
                itemM.Pin          = editMatchingModel.Pin;
                itemM.Action_Key   = editMatchingModel.Action_Key;
                itemM.Action_Shift = editMatchingModel.Action_Shift;
                itemM.Action_Ctrl  = editMatchingModel.Action_Ctrl;
                itemM.Action_Alt   = editMatchingModel.Action_Alt;
                itemM.Explanation  = editMatchingModel.Explanation;

                //UI 갱신
                ListViewItem findLVItem = lvMatching.Items[nSelectIndex];
                string[]     arrItemM   = itemM.ToArray();
                //findLVItem.SubItems[0].Text = arrItemM[0];
                findLVItem.SubItems[1].Text = arrItemM[1];
                findLVItem.SubItems[2].Text = arrItemM[2];

                bReturn = true;
            }
            else
            {//선택지가 없다.
                MessageBox.Show("선택된 데이터가 없습니다.");
            }

            return(bReturn);
        }
Exemple #2
0
        /// <summary>
        /// 리스트 뷰에 추가
        /// </summary>
        /// <param name="matchingModel"></param>
        private void MatchingList_UI_Add(MatchingModel matchingModel)
        {
            //리스트 뷰에 추가
            ListViewItem newLVI
                = new ListViewItem(matchingModel.ToArray());

            lvMatching.Items.Add(newLVI);
        }