예제 #1
0
 /// <summary>
 /// 공지사항 리스트에서 텍스트 검색기능
 /// </summary>
 /// <param name="word"></param>
 private void ShowFindText(string word)
 {
     try
     {
         Logger.info("검색 시작");
         FindListForm form = new FindListForm(noticeListViewItems, word);
         form.DisplayFindResult();
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }
예제 #2
0
 /// <summary>
 /// 공지사항 리스트에서 텍스트 검색기능
 /// </summary>
 /// <param name="word"></param>
 private void ShowFindText(string word)
 {
     try
     {
         Logger.info("검색 시작");
         FindListForm form = new FindListForm(noticeListViewItems, word);
         form.DisplayFindResult();
     }
     catch (Exception exception)
     {
         Logger.error(exception.ToString());
     }
 }
예제 #3
0
 /// <summary>
 /// 공지사항 리스트에서 텍스트 검색기능
 /// </summary>
 /// <param name="word"></param>
 private void ShowFindText(string word)
 {
     try
     {
         logWrite("검색 시작");
         FindListForm form = new FindListForm();
         ListView.ListViewItemCollection col = noticelistform.listView.Items;
         int findnum = 0;
         foreach (ListViewItem item in col)
         {
             TextBox box = new TextBox();
             box.Text = item.SubItems[1].Text;
             if (box.Text.Contains(word))
             {
                 string date = item.SubItems[3].Text;
                 form.txtbox_result.AppendText("#################################\r\n\r\n");
                 form.txtbox_result.AppendText("공지일자 : <" + date + ">\r\n\r\n");
                 form.txtbox_result.AppendText(box.Text + "\r\n\r\n");
                 findnum++;
             }
         }
         int indexnum = form.txtbox_result.Text.IndexOf(word);
         form.txtbox_result.Select(indexnum, word.Length);
         form.txtbox_result.KeyDown += new KeyEventHandler(txtbox_result_KeyDown);
         logWrite("찾은 갯수 : " + findnum.ToString());
         if (findnum == 0)
         {
             MessageBox.Show("검색된 결과가 없습니다.", "결과없음", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             form.Show();
             form.TopMost = true;
         }
     }
     catch (Exception exception)
     {
         logWrite(exception.ToString());
     }
 }