示例#1
0
        private void lstvResult_DoubleClick(object sender, EventArgs e)
        {
            int selectIndex = lstvResult.SelectedIndices[0];
            int itemIndex   = (int)lstvResult.SelectedItems[0].Tag;

            FQueryResult frm = new FQueryResult(this, resultList, itemIndex);

            frm.ShowDialog(this);

            lstvResult.Items[selectIndex].Selected = true;
        }
示例#2
0
        private void btnResultAdd_Click(object sender, EventArgs e)
        {
            int count = resultList.Count;

            FQueryResult frm = new FQueryResult(this, resultList);

            frm.ShowDialog(this);

            if (resultList.Count > count)
            {
                int i = 0;
                foreach (ListViewItem viewItem in lstvResult.Items)
                {
                    if ((int)viewItem.Tag == count)
                    {
                        lstvResult.Items[i].Selected = true;
                        break;
                    }
                    i++;
                }
            }
        }