Exemplo n.º 1
0
        private void Form_tjjgckz_Load(object sender, EventArgs e)
        {
            new Common.Common().AddImages(imageList1);
            lv_keyword.SmallImageList = imageList1;
            lv_keyword.StateImageList = imageList1;
            lv_keyword.LargeImageList = imageList1;

            txt_jg.Text = str_jg;

            lv_keyword.Items.Clear();
            //lv_keyword.View = View.SmallIcon;
            DataTable dt = tjjgbiz.Get_TJ_KEYWORD(str_tjlx, str_tjxm);

            foreach (DataRow dr in dt.Rows)
            {
                MyListViewItem item = new MyListViewItem();
                item.Text        = dr["mc"].ToString().Trim();
                item.Str_sfyx    = dr["sfyx"].ToString().Trim();
                item.Str_into_xj = dr["into_xj"].ToString().Trim();
                item.Str_mcjrxj  = dr["mcjrxj"].ToString().Trim();
                item.Str_keyword = dr["keyword"].ToString().Trim();
                item.ImageIndex  = 5;
                lv_keyword.Items.Add(item);
            }
        }
Exemplo n.º 2
0
        private void lv_keyword_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            MyListViewItem item = (MyListViewItem)lv_keyword.GetItemAt(e.X, e.Y);

            if (object.Equals(null, item))
            {
                return;
            }
            if (i == 1)
            {
                txt_jg.Text = item.Text.ToString().Trim();
            }
            else
            {
                txt_jg.Text = txt_jg.Text + item.Text.ToString().Trim();
            }
            i++;
            str_sfyx    = item.Str_sfyx;
            str_into_xj = item.Str_into_xj;
            str_mcjrxj  = item.Str_mcjrxj;
            str_keyword = item.Str_keyword;
            bool_check  = true;//是否选择个值
        }