private void butModify_Click(object sender, EventArgs e)
        {
            try
            {
                if (listView1.SelectedItems.Count <= 0)
                {
                    return;
                }

                ListViewItem lvi = listView1.SelectedItems[0];

                TestDataItem di = lvi.Tag as TestDataItem;

                di.数据名称 = txtName.Text;
                di.数据类型 = cbxType.Text;
                di.数据内容 = txtValue.Text;

                lvi.Name             = di.数据名称;
                lvi.Text             = di.数据名称;
                lvi.SubItems[1].Text = di.数据类型;
                lvi.SubItems[2].Text = di.数据内容;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        private void AddItemToList(TestDataItem itemInfo)
        {
            ListViewItem itemNew = new ListViewItem(new string[] { itemInfo.数据名称,
                                                                   itemInfo.数据类型,
                                                                   itemInfo.数据内容 }, 0);

            itemNew.Tag  = itemInfo;
            itemNew.Name = itemInfo.数据名称;

            listView1.Items.Add(itemNew);
        }
        private void butAdd_Click(object sender, EventArgs e)
        {
            try
            {
                TestDataItem dataItem = new TestDataItem();

                dataItem.数据名称 = txtName.Text;
                dataItem.数据类型 = cbxType.Text;
                dataItem.数据内容 = txtValue.Text;

                AddItemToList(dataItem);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (listView1.SelectedItems.Count <= 0)
                {
                    return;
                }

                ListViewItem lvi = listView1.SelectedItems[0];

                TestDataItem tdi = lvi.Tag as TestDataItem;

                txtName.Text  = tdi.数据名称;
                cbxType.Text  = tdi.数据类型;
                txtValue.Text = tdi.数据内容;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }